From cadf0a336cd1f876ab5d0f5179cc61caeb9c090d Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 23 Jul 2016 19:06:35 -0700 Subject: [PATCH] relay: limit auto-rejoin-on-part to relay channels --- plugins/relay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index efa96ac..da4801a 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -943,9 +943,10 @@ def handle_part(irc, numeric, command, args): text = args['text'] # Don't allow the PyLink client PARTing to be relayed. if numeric == irc.pseudoclient.uid: - # For clientbot: treat forced parts to the bot as clearchan, and atetmpt to rejoin after. + # For clientbot: treat forced parts to the bot as clearchan, and attempt to rejoin only + # if it affected a relay. if irc.protoname == 'clientbot': - for channel in channels: + for channel in [c for c in channels if getRelay((irc.name, c))]: for user in irc.channels[channel].users: if (not irc.isInternalClient(user)) and (not isRelayClient(irc, user)): irc.callHooks([irc.sid, 'CLIENTBOT_SERVICE_KICKED', {'channel': channel, 'target': user,