From cfa2cda88554486f7a212605ad1ad45c0950c72a Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 21 Jun 2016 20:29:36 -0700 Subject: [PATCH] relay: only reverse modes for CLAIM if there are any to reverse --- plugins/relay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index c22c87e..3c9c378 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -1132,7 +1132,8 @@ def handle_mode(irc, numeric, command, args): reversed_modes = irc.reverseModes(target, modes, oldobj=oldchan) log.debug('(%s) relay.handle_mode: Reversing mode changes of %r with %r (CLAIM).', irc.name, modes, reversed_modes) - irc.proto.mode(irc.sid, target, reversed_modes) + if reversed_modes: + irc.proto.mode(irc.sid, target, reversed_modes) break else: