From f74e7047330b1216c6acb61a3800b48e3d015f2c Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 14 Jul 2015 18:27:26 -0700 Subject: [PATCH] relay: whoops, check for claim properly --- plugins/relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 02023d7..0484412 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -240,7 +240,7 @@ def handle_kick(irc, source, command, args): log.debug('(%s) Relay kick: found %s to correspond to %s.', irc.name, v, k) break log.debug('(%s) Relay kick: kicker_modes are %r', irc.name, kicker_modes) - if irc.name not in db[relay]['links'] and not \ + if irc.name not in db[relay]['claim'] and not \ any([mode in kicker_modes for mode in ('q', 'a', 'o', 'h')]): log.debug('(%s) Relay kick: kicker %s is not opped... We should rejoin the target user %s', irc.name, kicker, real_target) # Home network is not in the channel's claim AND the kicker is not @@ -262,7 +262,7 @@ utils.add_hook(handle_kick, 'KICK') def relayJoins(irc, channel, users, ts, modes): queued_users = [] - for user in users: + for user in users.copy(): try: if irc.users[user].remote: # Is the .remote attribute set? If so, don't relay already