Skip to content

Commit

Permalink
Network: Fix @whois to work with multiple 319 messages per whois.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed May 20, 2014
1 parent 5312136 commit 66d0a7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/Network/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def do311(self, irc, msg):
nick = ircutils.toLower(msg.args[1])
if (irc, nick) not in self._whois:
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:
self._whois[(irc, nick)][2][msg.command] = msg

Expand All @@ -179,7 +183,9 @@ def do318(self, irc, msg):
hostmask = '@'.join(d[START_CODE].args[2:4])
user = d[START_CODE].args[-1]
if '319' in d:
channels = d['319'].args[-1].split()
channels = []
for msg in d['319']:
channels.extend(msg.args[-1].split())
ops = []
voices = []
normal = []
Expand Down

0 comments on commit 66d0a7a

Please sign in to comment.