Network: Fix @whois to work with multiple 319 messages per whois.

This commit is contained in:
Valentin Lorentz 2014-05-20 10:49:23 +00:00
parent 5312136803
commit 66d0a7acdd
1 changed files with 7 additions and 1 deletions

View File

@ -158,6 +158,10 @@ class Network(callbacks.Plugin):
nick = ircutils.toLower(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
elif msg.command == '319':
if '319' not in self._whois[(irc, nick)][2]:
self._whois[(irc, nick)][2][msg.command] = []
self._whois[(irc, nick)][2][msg.command].append(msg)
else: else:
self._whois[(irc, nick)][2][msg.command] = msg self._whois[(irc, nick)][2][msg.command] = msg
@ -179,7 +183,9 @@ class Network(callbacks.Plugin):
hostmask = '@'.join(d[START_CODE].args[2:4]) hostmask = '@'.join(d[START_CODE].args[2:4])
user = d[START_CODE].args[-1] user = d[START_CODE].args[-1]
if '319' in d: if '319' in d:
channels = d['319'].args[-1].split() channels = []
for msg in d['319']:
channels.extend(msg.args[-1].split())
ops = [] ops = []
voices = [] voices = []
normal = [] normal = []