From 38e63c6e8482a3c819a377c4aeaa208d38f48324 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 23 Aug 2003 12:12:04 +0000 Subject: [PATCH] Fixed exceptions raised by relaywhois. --- plugins/Relay.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/Relay.py b/plugins/Relay.py index 1478dead2..1e6a86a55 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -121,6 +121,10 @@ class Relay(callbacks.Privmsg): irc.callbacks[:] = [] irc.die() + def do376(self, irc, msg): + if self.channels: + irc.queueMsg(ircmsgs.joins(self.channels)) + def startrelay(self, irc, msg, args): """ @@ -258,6 +262,7 @@ class Relay(callbacks.Privmsg): nickAtNetwork = privmsgs.getArgs(args) try: (nick, network) = nickAtNetwork.split('@', 1) + nick = ircutils.toLower(nick) except ValueError: raise callbacks.ArgumentError if network not in self.ircs: @@ -287,7 +292,7 @@ class Relay(callbacks.Privmsg): def do311(self, irc, msg): if not isinstance(irc, irclib.Irc): irc = irc.getRealIrc() - nick = msg.args[1] + nick = ircutils.toLower(msg.args[1]) if (irc, nick) not in self.whois: return else: @@ -300,7 +305,7 @@ class Relay(callbacks.Privmsg): def do318(self, irc, msg): if not isinstance(irc, irclib.Irc): irc = irc.getRealIrc() - nick = msg.args[1] + nick = ircutils.toLower(msg.args[1]) if (irc, nick) not in self.whois: return (replyIrc, replyMsg, d) = self.whois[(irc, nick)] @@ -320,7 +325,7 @@ class Relay(callbacks.Privmsg): s = '%s (%s) has been online since %s (idle for %s) and is on %s' % \ (user, hostmask, signon, idle, channels) replyIrc.reply(replyMsg, s) - del self.whois[(replyIrc, nick)] + del self.whois[(irc, nick)] def _formatPrivmsg(self, nick, network, msg): # colorize nicks