1
0
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:
Adam
2013-12-19 07:31:49 -05:00
parent ae5da11389
commit c4d4107412
+3 -1
View File
@@ -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();
}