From ddbfad50862e4d6f9c539f2860578a8a90efac0f Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Sun, 3 Aug 2014 13:58:49 +0200 Subject: [PATCH] Add do352 back for IRCds which do not support WHOX --- src/irclib.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index 0fbd29161..b2c5378f6 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -481,16 +481,23 @@ class IrcState(IrcCommandDispatcher): else: self.supported[arg] = None - def do354(self, irc, msg): + def do352(self, irc, msg): # WHO reply. - (_, user, host, nick, __) = msg.args + (nick, user, host) = (msg.args[5], msg.args[2], msg.args[3]) + hostmask = '%s!%s@%s' % (nick, user, host) + self.nicksToHostmasks[nick] = hostmask + + def do354(self, irc, msg): + # WHOX reply. + + (__, user, host, nick, ___) = msg.args hostmask = '%s!%s@%s' % (nick, user, host) self.nicksToHostmasks[nick] = hostmask def do353(self, irc, msg): # NAMES reply. - (_, type, channel, names) = msg.args + (__, type, channel, names) = msg.args if channel not in self.channels: self.channels[channel] = ChannelState() c = self.channels[channel]