diff options
author | Adam <Adam@anope.org> | 2013-11-16 09:38:13 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-11-16 09:38:13 -0500 |
commit | 51a9f64adb2e5fb3c3d9ab1adabd44644727c5b1 (patch) | |
tree | 5da437bbe95e9a50a179de9ffaeb173b4243b81a /src/servers.cpp | |
parent | 332fd239278fe1a80c500a1ea01763e84783057c (diff) |
Use the source's sync state and not mine when processing sjoins to determine whether or not to sync the channel on creation, instead sync it when the server syncs.
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index d4c76a217..4bd9746c3 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -257,16 +257,22 @@ void Server::Sync(bool sync_links) this->links[i]->Sync(true); } - if (this->GetUplink() && this->GetUplink() == Me) + bool me = this->GetUplink() && this->GetUplink() == Me; + + if (me) { FOREACH_MOD(OnPreUplinkSync, (this)); + } - for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) - { - Channel *c = it->second; + for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) + { + Channel *c = it->second; + if (c->syncing) c->Sync(); - } + } + if (me) + { IRCD->SendEOB(); Me->Sync(false); |