mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
unreal: actually return the hook data for NICK & KILL
This commit is contained in:
parent
44dc856ffa
commit
10be962318
@ -65,7 +65,8 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
|
|
||||||
for idx, arg in enumerate(args[:-1]):
|
for idx, arg in enumerate(args[:-1]):
|
||||||
# Look at every arg except the last one, which is usually message
|
# Look at every arg except the last one, which is usually message
|
||||||
# text or whatnot.
|
# text or whatnot. For each, check if the argument is in the user
|
||||||
|
# DB and has a @ in it, since we reserve those for PUIDs.
|
||||||
if arg in self.irc.users and '@' in arg:
|
if arg in self.irc.users and '@' in arg:
|
||||||
args[idx] = self.irc.users[arg].nick
|
args[idx] = self.irc.users[arg].nick
|
||||||
msg = ' '.join(args)
|
msg = ' '.join(args)
|
||||||
@ -610,11 +611,11 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
|
|
||||||
log.debug('(%s) translating legacy NICK args to: %s', self.irc.name, ' '.join(new_args))
|
log.debug('(%s) translating legacy NICK args to: %s', self.irc.name, ' '.join(new_args))
|
||||||
|
|
||||||
self.handle_uid(numeric, 'UID_LEGACY', new_args)
|
return self.handle_uid(numeric, 'UID_LEGACY', new_args)
|
||||||
else:
|
else:
|
||||||
# Normal NICK change, just let ts6_common handle it.
|
# Normal NICK change, just let ts6_common handle it.
|
||||||
# :70MAAAAAA NICK GL-devel 1434744242
|
# :70MAAAAAA NICK GL-devel 1434744242
|
||||||
super().handle_nick(numeric, command, args)
|
return super().handle_nick(numeric, command, args)
|
||||||
|
|
||||||
def handle_mode(self, numeric, command, args):
|
def handle_mode(self, numeric, command, args):
|
||||||
# <- :unreal.midnight.vpn MODE #test +bb test!*@* *!*@bad.net
|
# <- :unreal.midnight.vpn MODE #test +bb test!*@* *!*@bad.net
|
||||||
@ -830,6 +831,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
"""Handles incoming KILLs."""
|
"""Handles incoming KILLs."""
|
||||||
# <- :GL| KILL GLolol :hidden-1C620195!GL| (test)
|
# <- :GL| KILL GLolol :hidden-1C620195!GL| (test)
|
||||||
# Use ts6_common's handle_kill, but coerse UIDs to nicks first.
|
# Use ts6_common's handle_kill, but coerse UIDs to nicks first.
|
||||||
super().handle_kill(numeric, command, [self._getNick(args[0]), *args[1:]])
|
return super().handle_kill(numeric, command, [self._getNick(args[0]), *args[1:]])
|
||||||
|
|
||||||
Class = UnrealProtocol
|
Class = UnrealProtocol
|
||||||
|
Loading…
Reference in New Issue
Block a user