3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

relay: only reverse modes for CLAIM if there are any to reverse

This commit is contained in:
James Lu 2016-06-21 20:29:36 -07:00
parent 3e19e9c3f1
commit cfa2cda885

View File

@ -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: