mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
nefarious: fix wrong variable in "/join 0" handling causing crashes
(cherry picked from commit 5cb550afd9
)
This commit is contained in:
parent
0fbf9e165c
commit
b1e138d9c5
@ -1033,9 +1033,10 @@ class P10Protocol(Protocol):
|
|||||||
|
|
||||||
if args[0] == '0' and command == 'JOIN':
|
if args[0] == '0' and command == 'JOIN':
|
||||||
# /join 0; part the user from all channels
|
# /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',
|
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:
|
for channel in oldchans:
|
||||||
self.irc.channels[channel].users.discard(source)
|
self.irc.channels[channel].users.discard(source)
|
||||||
self.irc.users[source].channels.discard(channel)
|
self.irc.users[source].channels.discard(channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user