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

relay: fix KeyError when a local client is kicked from a claimed channel

Fixes #572.
This commit is contained in:
James Lu 2018-02-10 15:12:40 -08:00
parent 18c1a277f5
commit ccbd79a95c

View File

@ -1539,8 +1539,7 @@ def handle_kick(irc, source, command, args):
del relayusers[(irc.name, target)][remoteirc.name]
remoteirc.quit(real_target, 'Left all shared channels.')
if not check_claim(irc, channel, kicker):
if is_relay_client(irc, target) and not check_claim(irc, channel, kicker):
homenet, real_target = get_orig_user(irc, target)
homeirc = world.networkobjects.get(homenet)
homenick = homeirc.users[real_target].nick if homeirc else '<ghost user>'