3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

relay: fix RuntimeError on handle_part for clientbot networks

This commit is contained in:
James Lu 2017-11-05 01:18:42 -08:00
parent 509c2e52c4
commit b6af6dddc5

View File

@ -1220,7 +1220,7 @@ def handle_part(irc, numeric, command, args):
# if it affected a relay.
if not irc.has_cap('can-spawn-clients'):
for channel in [c for c in channels if get_relay(irc, c)]:
for user in irc.channels[channel].users:
for user in irc.channels[channel].users.copy():
if (not irc.is_internal_client(user)) and (not is_relay_client(irc, user)):
irc.call_hooks([irc.sid, 'CLIENTBOT_SERVICE_KICKED', {'channel': channel, 'target': user,
'text': 'Clientbot was force parted (Reason: %s)' % text or 'None',