3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 18:54:05 +01:00

relay: whoops, check for claim properly

This commit is contained in:
James Lu 2015-07-14 18:27:26 -07:00
parent 28f1d4ba19
commit f74e704733

View File

@ -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) log.debug('(%s) Relay kick: found %s to correspond to %s.', irc.name, v, k)
break break
log.debug('(%s) Relay kick: kicker_modes are %r', irc.name, kicker_modes) 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')]): 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) 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 # 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): def relayJoins(irc, channel, users, ts, modes):
queued_users = [] queued_users = []
for user in users: for user in users.copy():
try: try:
if irc.users[user].remote: if irc.users[user].remote:
# Is the .remote attribute set? If so, don't relay already # Is the .remote attribute set? If so, don't relay already