mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
protocols: parse modes on the TARGET, not the sender
This fixes crashes on AssertionError when the sender of a MODE is a server.
This commit is contained in:
parent
cad3e3d5f5
commit
06d22722dc
@ -532,7 +532,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
|
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
|
||||||
target = args[0]
|
target = args[0]
|
||||||
modestrings = args[1:]
|
modestrings = args[1:]
|
||||||
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
|
changedmodes = utils.parseModes(self.irc, target, modestrings)
|
||||||
utils.applyModes(self.irc, target, changedmodes)
|
utils.applyModes(self.irc, target, changedmodes)
|
||||||
return {'target': target, 'modes': changedmodes}
|
return {'target': target, 'modes': changedmodes}
|
||||||
|
|
||||||
|
@ -547,7 +547,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
|
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
|
||||||
target = args[0]
|
target = args[0]
|
||||||
modestrings = args[1:]
|
modestrings = args[1:]
|
||||||
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
|
changedmodes = utils.parseModes(self.irc, target, modestrings)
|
||||||
utils.applyModes(self.irc, target, changedmodes)
|
utils.applyModes(self.irc, target, changedmodes)
|
||||||
# Call the OPERED UP hook if +o is being set.
|
# Call the OPERED UP hook if +o is being set.
|
||||||
if ('+o', None) in changedmodes:
|
if ('+o', None) in changedmodes:
|
||||||
|
Loading…
Reference in New Issue
Block a user