From 8465edd5af812eba3b1876c28a61fb1b8ffba4a6 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 1 Apr 2017 12:26:08 -0700 Subject: [PATCH] ts6_common: fix outbound kicks to PUIDS not updating the state This was previously trying to update the state based on the user's nick, but we use PUIDs internally. In other words, make sure that we don't replace the internal target when sending the outgoing text... --- protocols/ts6_common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 996a5a3..176d95d 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -144,9 +144,9 @@ class TS6BaseProtocol(IRCS2SProtocol): reason = 'No reason given' # Mangle kick targets for IRCds that require it. - target = self._expandPUID(target) + real_target = self._expandPUID(target) - self._send(numeric, 'KICK %s %s :%s' % (channel, target, reason)) + self._send(numeric, 'KICK %s %s :%s' % (channel, real_target, reason)) # We can pretend the target left by its own will; all we really care about # is that the target gets removed from the channel userlist, and calling @@ -377,6 +377,7 @@ class TS6BaseProtocol(IRCS2SProtocol): except IndexError: reason = '' + log.debug('(%s) Removing kick target %s from %s', self.irc.name, kicked, channel) self.handle_part(kicked, 'KICK', [channel, reason]) return {'channel': channel, 'target': kicked, 'text': reason}