first, use explicit time.strftime() instead of time.ctime, since ctime() leaves an extra space between month and date, if date is
single-digit.
second, use stftime('%Z') for timezone, old code was a bug which always displayed the daylight saving timezone name, even when it wasn't
in effect. time.daylight is not a dst flag, it is a flag for whether a dst timezone is /defined/, not if it is in effect.
rs.internic.net seems to be broken and using $tld.whois-servers.net looks to
be working for everything.
Also need to update the line termination string to use '\r\n' instead of '\n'
since some servers are strict about receiving the former.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Also update commands.urlSnarfer to do the same, which allows us to revert
"Don't bother snarfing URLs from non-Action CTCP messages."
This reverts commit 3282e3407e.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
The 319 message that indicates which channel(s) a user is in prefix the
channel name with the modes (@, +, !, etc.) applied to that user. These need
to be stripped from the channel name before we feed it to
irc.state.channels.get(), otherwise when irc.state.channels.get() returns None
we assume the channel can't be private and leak information.
It's better to force people to use an RFC nick and change it after they
connect than to let non-RFC nicks get used and not be able to connect to the
network.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Set snarfThrottle to 0 while testing since we know there's nothing other than
the test input that could be causing us to snarf. Fixes some intermittent
test failures due to fast snarf responses.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This is deprecated in 2.6 and supybot.utils already handles adding sets.Set to
__builtins__ if we're running with Python < 2.4.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This gives back the ability to generate a banmask based on the global banmask
settings instead of per-channel settings.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Since every plugin has a log method (to do actual logging), the log command
was conflicting with that. The attempted workaround was overly complicated
and broken. Simply renaming the command to logmark simplifies everything.
Closes Sf #2889709
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
It was never fully fleshed out. If someone wants to finish it, they can
rewrite it or dig it out of the history and finish it.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Factoids.format makes use of registry.TemplatedString so the user can specify
excactly how they want the factoid reply to be formed.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>