3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

nefarious: fix wrong variable in "/join 0" handling causing crashes

(cherry picked from commit 5cb550afd9)
This commit is contained in:
James Lu 2016-06-25 11:33:56 -07:00
parent 0fbf9e165c
commit b1e138d9c5

View File

@ -1033,9 +1033,10 @@ class P10Protocol(Protocol):
if args[0] == '0' and command == 'JOIN':
# /join 0; part the user from all channels
oldchans = self.irc.users[numeric].channels.copy()
oldchans = self.irc.users[source].channels.copy()
log.debug('(%s) Got /join 0 from %r, channel list is %r',
self.irc.name, numeric, oldchans)
self.irc.name, source, oldchans)
for channel in oldchans:
self.irc.channels[channel].users.discard(source)
self.irc.users[source].channels.discard(channel)