mirror of
https://github.com/anope/anope.git
synced 2026-07-08 07:23:14 +02:00
Channel::Sync can delete the channel, so safely iterate them when syncing from a server burst
This commit is contained in:
+3
-1
@@ -269,9 +269,11 @@ void Server::Sync(bool sync_links)
|
||||
FOREACH_MOD(OnPreUplinkSync, (this));
|
||||
}
|
||||
|
||||
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
|
||||
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end;)
|
||||
{
|
||||
Channel *c = it->second;
|
||||
++it;
|
||||
|
||||
if (c->syncing)
|
||||
c->Sync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user