mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-25 19:54:25 +01:00
nefarious: don't send empty mode lists to parseModes
Doing so raises assertionerror, which causes the link to fail!
This commit is contained in:
parent
3c8c6f2027
commit
b9e568c962
@ -477,12 +477,17 @@ class P10Protocol(Protocol):
|
|||||||
# 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]
|
||||||
parsedmodes = utils.parseModes(self.irc, channel, modestring)
|
if modestring:
|
||||||
|
parsedmodes = utils.parseModes(self.irc, channel, modestring)
|
||||||
|
else:
|
||||||
|
parsedmodes = []
|
||||||
|
|
||||||
# Add the ban list to the list of modes to process.
|
# Add the ban list to the list of modes to process.
|
||||||
parsedmodes.extend([('+b', host) for host in bans])
|
parsedmodes.extend([('+b', host) for host in bans])
|
||||||
|
|
||||||
utils.applyModes(self.irc, channel, parsedmodes)
|
if parsedmodes:
|
||||||
|
utils.applyModes(self.irc, channel, parsedmodes)
|
||||||
|
|
||||||
namelist = []
|
namelist = []
|
||||||
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)
|
||||||
for userpair in userlist:
|
for userpair in userlist:
|
||||||
|
Loading…
Reference in New Issue
Block a user