From e5c7d438b1253e416a53c5aebec8579e854a3161 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 14 Aug 2015 19:05:07 -0700 Subject: [PATCH] relay: in handle_kick, only remove the target from the user cache after the kick has been relayed to all networks --- plugins/relay.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index f4777de..130af99 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -389,7 +389,7 @@ def handle_kick(irc, source, command, args): # they originate from the same network. We won't have # to filter this; the uplink IRCd will handle it appropriately, # and we'll just follow. - real_target = getRemoteUser(irc, remoteirc, target) + real_target = getRemoteUser(irc, remoteirc, target, spawnIfMissing=False) log.debug('(%s) Relay kick: real target for %s is %s', irc.name, target, real_target) else: log.debug('(%s) Relay kick: target %s is an internal client, going to look up the real user', irc.name, target) @@ -431,10 +431,10 @@ def handle_kick(irc, source, command, args): remoteirc.proto.kickServer(remoteirc, remoteirc.sid, remotechan, real_target, text) - if target != irc.pseudoclient.uid and not irc.users[target].channels: - irc.proto.quitClient(irc, target, 'Left all shared channels.') - remoteuser = getLocalUser(irc, target) - del relayusers[remoteuser][irc.name] + if target != irc.pseudoclient.uid and not irc.users[target].channels: + irc.proto.quitClient(irc, target, 'Left all shared channels.') + remoteuser = getLocalUser(irc, target) + del relayusers[remoteuser][irc.name] utils.add_hook(handle_kick, 'KICK')