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

relay: fix "RuntimeError: dictionary changed size during iteration" in handle_part

This commit is contained in:
James Lu 2015-07-18 12:21:46 -07:00
parent ccf759679b
commit d30890c5cd

View File

@ -242,7 +242,7 @@ utils.add_hook(handle_nick, 'NICK')
def handle_part(irc, numeric, command, args):
channel = args['channel']
text = args['text']
for netname, user in relayusers.copy()[(irc.name, numeric)].items():
for netname, user in relayusers[(irc.name, numeric)].copy().items():
remoteirc = utils.networkobjects[netname]
remotechan = findRemoteChan(irc, remoteirc, channel)
remoteirc.proto.partClient(remoteirc, user, remotechan, text)