3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-26 04:32:51 +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): def handle_part(irc, numeric, command, args):
channel = args['channel'] channel = args['channel']
text = args['text'] 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] remoteirc = utils.networkobjects[netname]
remotechan = findRemoteChan(irc, remoteirc, channel) remotechan = findRemoteChan(irc, remoteirc, channel)
remoteirc.proto.partClient(remoteirc, user, remotechan, text) remoteirc.proto.partClient(remoteirc, user, remotechan, text)