From 8fe7d7e4e83022dd072d39fe0f0577b41f595aa5 Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 9 Dec 2003 14:35:54 +0000 Subject: [PATCH] Add identified status and away message to Relay.whois --- plugins/Relay.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/plugins/Relay.py b/plugins/Relay.py index 305b59845..3bcf530ed 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -394,9 +394,11 @@ class Relay(callbacks.Privmsg, configurable.Mixin): else: self._whois[(irc, nick)][-1][msg.command] = msg + do301 = do311 do312 = do311 do317 = do311 do319 = do311 + do320 = do311 def do318(self, irc, msg): if not isinstance(irc, irclib.Irc): @@ -447,8 +449,20 @@ class Relay(callbacks.Privmsg, configurable.Mixin): server = d['312'].args[2] else: server = '' - s = '%s (%s) has been on server %s since %s (idle for %s) and %s.' % \ - (user, hostmask, server, signon, idle, channels) + if '301' in d: + away = ' %s is away: %s.' % (user, d['301'].args[2]) + else: + away = '' + if '320' in d: + if d['320'].args[2]: + identify = ' identified' + else: + identify = '' + else: + identify = '' + s = '%s (%s) has been%s on server %s since %s (idle for %s) and '\ + '%s.%s' % (user, hostmask, identify, server, signon, idle, + channels, away) replyIrc.reply(replyMsg, s) del self._whois[(irc, nick)]