From a1db4932e1ce16cdb59c1d2794fe5ae946b52ad2 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 15 Aug 2015 06:05:12 -0700 Subject: [PATCH] relay: Don't allow kicks/parts to the PyLink client to be relayed. --- plugins/relay.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index 66f12d4..d62c8ed 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -293,6 +293,9 @@ utils.add_hook(handle_nick, 'NICK') def handle_part(irc, numeric, command, args): channels = args['channels'] text = args['text'] + # Don't allow the PyLink client PARTing to be relayed. + if numeric == irc.pseudoclient.uid: + return for channel in channels: for netname, user in relayusers[(irc.name, numeric)].copy().items(): remoteirc = utils.networkobjects[netname] @@ -370,7 +373,8 @@ def handle_kick(irc, source, command, args): kicker = source kicker_modes = getPrefixModes(irc, irc, channel, kicker) relay = findRelay((irc.name, channel)) - if relay is None: + # Don't allow kicks to the PyLink client to be relayed. + if relay is None or target == irc.pseudoclient.uid: return for name, remoteirc in utils.networkobjects.items(): if irc.name == name or not remoteirc.connected.is_set():