channel.users changes during iteration. copy() it

This commit is contained in:
jesopo 2020-02-22 08:03:31 +00:00
parent db2f27a771
commit 9c1b98ef29

View file

@ -106,7 +106,7 @@ def part(events, event):
user=user, server=event["server"])
else:
event["server"].channels.remove(channel)
for user in channel.users:
for user in channel.users.copy():
event["server"].part_user(channel, user)
events.on("self.part").call(channel=channel, reason=reason,