3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 11:39:25 +01:00

relay: also quit users who aren't on any shared channels after KICK

This commit is contained in:
James Lu 2015-07-24 10:51:16 -07:00
parent 5c3466bf82
commit 71a3464e8a

View File

@ -420,6 +420,12 @@ def handle_kick(irc, source, command, args):
text = "(<unknown kicker>@%s) %s" % (irc.name, text) text = "(<unknown kicker>@%s) %s" % (irc.name, text)
remoteirc.proto.kickServer(remoteirc, remoteirc.sid, remoteirc.proto.kickServer(remoteirc, remoteirc.sid,
remotechan, real_target, text) 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') utils.add_hook(handle_kick, 'KICK')
def handle_chgclient(irc, source, command, args): def handle_chgclient(irc, source, command, args):