channel.users changes during iteration. copy() it
This commit is contained in:
parent
db2f27a771
commit
9c1b98ef29
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ def part(events, event):
|
||||||
user=user, server=event["server"])
|
user=user, server=event["server"])
|
||||||
else:
|
else:
|
||||||
event["server"].channels.remove(channel)
|
event["server"].channels.remove(channel)
|
||||||
for user in channel.users:
|
for user in channel.users.copy():
|
||||||
event["server"].part_user(channel, user)
|
event["server"].part_user(channel, user)
|
||||||
|
|
||||||
events.on("self.part").call(channel=channel, reason=reason,
|
events.on("self.part").call(channel=channel, reason=reason,
|
||||||
|
|
Loading…
Reference in a new issue