mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-26 04:04:22 +01:00
unreal: normalize whitespace in SJOIN as well
Sometimes there is an extra space after the mode list, so the query looks like <- :000 SJOIN 1234567890 #channel +ntf [10t]:5 :000AAAAAA 000AAAAAB instead of <- :000 SJOIN 1234567890 #channel +ntf [10t]:5 :000AAAAAA 000AAAAAB
This commit is contained in:
parent
4a519832e0
commit
945fc8f0f9
@ -578,7 +578,11 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
parsedmodes = []
|
parsedmodes = []
|
||||||
try:
|
try:
|
||||||
if args[2].startswith('+'):
|
if args[2].startswith('+'):
|
||||||
parsedmodes = self.irc.parseModes(channel, args[2:-1] or args[2])
|
modestring = args[2:-1] or args[2]
|
||||||
|
# Strip extra spaces between the mode argument and the user list, if
|
||||||
|
# there are any. XXX: report this as a bug in unreal's s2s protocol?
|
||||||
|
modestring = [m for m in modestring if m]
|
||||||
|
parsedmodes = self.irc.parseModes(channel, modestring)
|
||||||
changedmodes = set(parsedmodes)
|
changedmodes = set(parsedmodes)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
@ -679,7 +683,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
channel = self.irc.toLower(args[0])
|
channel = self.irc.toLower(args[0])
|
||||||
oldobj = self.irc.channels[channel].deepcopy()
|
oldobj = self.irc.channels[channel].deepcopy()
|
||||||
|
|
||||||
modes = list(filter(None, args[1:])) # normalize whitespace
|
modes = [arg for arg in args[1:] if arg] # normalize whitespace
|
||||||
parsedmodes = self.irc.parseModes(channel, modes)
|
parsedmodes = self.irc.parseModes(channel, modes)
|
||||||
|
|
||||||
if parsedmodes:
|
if parsedmodes:
|
||||||
|
Loading…
Reference in New Issue
Block a user