Gave a proper error message for a relaywhois is a nick that isn't online.

This commit is contained in:
Jeremy Fincher 2003-08-26 17:55:30 +00:00
parent 58d444b571
commit 5491d97704

View File

@ -377,6 +377,16 @@ class Relay(callbacks.Privmsg):
replyIrc.reply(replyMsg, s) replyIrc.reply(replyMsg, s)
del self.whois[(irc, nick)] del self.whois[(irc, nick)]
def do402(self, irc, msg):
if not isinstance(irc, irclib.Irc):
irc = irc.getRealIrc()
nick = ircutils.toLower(msg.args[1])
if (irc, nick) not in self.whois:
return
(replyIrc, replyMsg, d) = self.whois[(irc, nick)]
s = 'There is no %s on %s.' % (nick, self.abbreviations[irc])
replyIrc.reply(replyMsg, s)
def _formatPrivmsg(self, nick, network, msg): def _formatPrivmsg(self, nick, network, msg):
# colorize nicks # colorize nicks
if self.color >= 1: if self.color >= 1: