3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

unreal: fix last commit (actually map the hook & set modes on RIGHT target)

This commit is contained in:
James Lu 2015-11-11 18:55:05 -08:00
parent 6601071d35
commit 6f9feb46b1

View File

@ -19,7 +19,8 @@ class UnrealProtocol(TS6BaseProtocol):
self.casemapping = 'ascii' self.casemapping = 'ascii'
self.proto_ver = 3999 self.proto_ver = 3999
self.min_proto_ver = 3999 self.min_proto_ver = 3999
self.hook_map = {'UMODE2': 'MODE', 'SVSKILL': 'KILL'} self.hook_map = {'UMODE2': 'MODE', 'SVSKILL': 'KILL', 'SVSMODE': 'MODE',
'SVS2MODE': 'MODE'}
self.uidgen = {} self.uidgen = {}
self.caps = {} self.caps = {}
@ -444,10 +445,10 @@ class UnrealProtocol(TS6BaseProtocol):
def handle_svsmode(self, numeric, command, args): def handle_svsmode(self, numeric, command, args):
"""Handle SVSMODE/SVS2MODE, used for setting user modes on others (services).""" """Handle SVSMODE/SVS2MODE, used for setting user modes on others (services)."""
# <- :source SVSMODE target +usermodes # <- :source SVSMODE target +usermodes
target = args[0] target = self._getNick(args[0])
modes = args[1:] modes = args[1:]
parsedmodes = utils.parseModes(self.irc, numeric, modes) parsedmodes = utils.parseModes(self.irc, target, modes)
utils.applyModes(self.irc, numeric, parsedmodes) utils.applyModes(self.irc, target, parsedmodes)
return {'target': numeric, 'modes': parsedmodes} return {'target': numeric, 'modes': parsedmodes}
handle_svs2mode = handle_svsmode handle_svs2mode = handle_svsmode