From 71a3464e8a34967dbaa17e82fcbbcf96b8ea1567 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 24 Jul 2015 10:51:16 -0700 Subject: [PATCH] relay: also quit users who aren't on any shared channels after KICK --- plugins/relay.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/relay.py b/plugins/relay.py index 186e352..733c9fc 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -420,6 +420,12 @@ def handle_kick(irc, source, command, args): text = "(@%s) %s" % (irc.name, text) 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] + utils.add_hook(handle_kick, 'KICK') def handle_chgclient(irc, source, command, args):