3
0
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:
James Lu 2016-01-19 21:23:07 -08:00
parent cad3e3d5f5
commit 06d22722dc
2 changed files with 2 additions and 2 deletions

View File

@ -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}

View File

@ -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: