mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 22:24:20 +01:00
Fixed exceptions raised by relaywhois.
This commit is contained in:
parent
e18bc38676
commit
38e63c6e84
@ -121,6 +121,10 @@ class Relay(callbacks.Privmsg):
|
|||||||
irc.callbacks[:] = []
|
irc.callbacks[:] = []
|
||||||
irc.die()
|
irc.die()
|
||||||
|
|
||||||
|
def do376(self, irc, msg):
|
||||||
|
if self.channels:
|
||||||
|
irc.queueMsg(ircmsgs.joins(self.channels))
|
||||||
|
|
||||||
def startrelay(self, irc, msg, args):
|
def startrelay(self, irc, msg, args):
|
||||||
"""<network abbreviation for current server>
|
"""<network abbreviation for current server>
|
||||||
|
|
||||||
@ -258,6 +262,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
nickAtNetwork = privmsgs.getArgs(args)
|
nickAtNetwork = privmsgs.getArgs(args)
|
||||||
try:
|
try:
|
||||||
(nick, network) = nickAtNetwork.split('@', 1)
|
(nick, network) = nickAtNetwork.split('@', 1)
|
||||||
|
nick = ircutils.toLower(nick)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
if network not in self.ircs:
|
if network not in self.ircs:
|
||||||
@ -287,7 +292,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
def do311(self, irc, msg):
|
def do311(self, irc, msg):
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
irc = irc.getRealIrc()
|
irc = irc.getRealIrc()
|
||||||
nick = msg.args[1]
|
nick = ircutils.toLower(msg.args[1])
|
||||||
if (irc, nick) not in self.whois:
|
if (irc, nick) not in self.whois:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
@ -300,7 +305,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
def do318(self, irc, msg):
|
def do318(self, irc, msg):
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
irc = irc.getRealIrc()
|
irc = irc.getRealIrc()
|
||||||
nick = msg.args[1]
|
nick = ircutils.toLower(msg.args[1])
|
||||||
if (irc, nick) not in self.whois:
|
if (irc, nick) not in self.whois:
|
||||||
return
|
return
|
||||||
(replyIrc, replyMsg, d) = self.whois[(irc, nick)]
|
(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' % \
|
s = '%s (%s) has been online since %s (idle for %s) and is on %s' % \
|
||||||
(user, hostmask, signon, idle, channels)
|
(user, hostmask, signon, idle, channels)
|
||||||
replyIrc.reply(replyMsg, s)
|
replyIrc.reply(replyMsg, s)
|
||||||
del self.whois[(replyIrc, nick)]
|
del self.whois[(irc, nick)]
|
||||||
|
|
||||||
def _formatPrivmsg(self, nick, network, msg):
|
def _formatPrivmsg(self, nick, network, msg):
|
||||||
# colorize nicks
|
# colorize nicks
|
||||||
|
Loading…
Reference in New Issue
Block a user