mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +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
|
||||
target = args[0]
|
||||
modestrings = args[1:]
|
||||
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
|
||||
changedmodes = utils.parseModes(self.irc, target, modestrings)
|
||||
utils.applyModes(self.irc, target, changedmodes)
|
||||
return {'target': target, 'modes': changedmodes}
|
||||
|
||||
|
@ -547,7 +547,7 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
|
||||
target = args[0]
|
||||
modestrings = args[1:]
|
||||
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
|
||||
changedmodes = utils.parseModes(self.irc, target, modestrings)
|
||||
utils.applyModes(self.irc, target, changedmodes)
|
||||
# Call the OPERED UP hook if +o is being set.
|
||||
if ('+o', None) in changedmodes:
|
||||
|
Loading…
Reference in New Issue
Block a user