mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 21:22:36 +01:00
nefarious: don't confuse the TS argument with the user list, if a BURST is sent with only bans
This commit is contained in:
parent
fd909395ff
commit
9f454402d2
@ -927,8 +927,6 @@ class P10Protocol(Protocol):
|
|||||||
# Remove this argument from the args list.
|
# Remove this argument from the args list.
|
||||||
args = args[:-1]
|
args = args[:-1]
|
||||||
|
|
||||||
userlist = args[-1].split(',')
|
|
||||||
|
|
||||||
# Then, we can make the modestring just encompass all the text until the end of the string.
|
# Then, we can make the modestring just encompass all the text until the end of the string.
|
||||||
# If no modes are given, this will simply be empty.
|
# If no modes are given, this will simply be empty.
|
||||||
modestring = args[2:-1]
|
modestring = args[2:-1]
|
||||||
@ -947,6 +945,9 @@ class P10Protocol(Protocol):
|
|||||||
log.debug('(%s) handle_sjoin: got userlist %r for %r', self.irc.name, userlist, channel)
|
log.debug('(%s) handle_sjoin: got userlist %r for %r', self.irc.name, userlist, channel)
|
||||||
|
|
||||||
prefixes = ''
|
prefixes = ''
|
||||||
|
|
||||||
|
userlist = args[-1].split(',')
|
||||||
|
if args[-1] != args[1]: # Make sure the userlist is the right argument (not the TS).
|
||||||
for userpair in userlist:
|
for userpair in userlist:
|
||||||
# This is given in the form UID1,UID2:prefixes. However, when one userpair is given
|
# This is given in the form UID1,UID2:prefixes. However, when one userpair is given
|
||||||
# with a certain prefix, it implicitly applies to all other following UIDs, until
|
# with a certain prefix, it implicitly applies to all other following UIDs, until
|
||||||
@ -972,6 +973,7 @@ class P10Protocol(Protocol):
|
|||||||
utils.applyModes(self.irc, channel, [('+%s' % mode, user) for mode in prefixes])
|
utils.applyModes(self.irc, channel, [('+%s' % mode, user) for mode in prefixes])
|
||||||
|
|
||||||
self.irc.channels[channel].users.add(user)
|
self.irc.channels[channel].users.add(user)
|
||||||
|
|
||||||
return {'channel': channel, 'users': namelist, 'modes': parsedmodes, 'ts': their_ts}
|
return {'channel': channel, 'users': namelist, 'modes': parsedmodes, 'ts': their_ts}
|
||||||
|
|
||||||
def handle_join(self, source, command, args):
|
def handle_join(self, source, command, args):
|
||||||
|
Loading…
Reference in New Issue
Block a user