summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-08 11:37:09 -0400
committerAdam <Adam@anope.org>2017-10-08 11:37:09 -0400
commit20c7bcad55597f17c01089ae2ec0c458bafa705f (patch)
treeb23f8d20ed5caec167592debba920013aba23881 /src
parent85f10a20bb3f59afb0d97e42452f2aea60882551 (diff)
Simplify initial burst of persistent channels
Also don't create/destroy channels as persist is set on and off which no longer makes since with the live database backend
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
-rw-r--r--src/servers.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index aed6b8a24..98b753eb4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -594,6 +594,8 @@ void Anope::Init(int ac, char **av)
EventManager::Get()->Dispatch(&Event::LoadDatabase::OnLoadDatabase);;
Anope::Logger.Log("Databases loaded");
+ EventManager::Get()->Dispatch(&Event::PostInit::OnPostInit);
+
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
it->second->Sync();
}
diff --git a/src/servers.cpp b/src/servers.cpp
index 35f066f4a..f00f925d0 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -129,6 +129,7 @@ void Server::Burst()
ServiceBot *chanserv = Config->GetClient("ChanServ");
+ /* Burst channel state */
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
{
Channel *c = it->second;
@@ -139,6 +140,7 @@ void Server::Burst()
for (Channel::ChanUserList::const_iterator cit = c->users.begin(), cit_end = c->users.end(); cit != cit_end; ++cit)
IRCD->Send<messages::Join>(cit->second->user, c, &cit->second->status);
+ /* Burst b/e/I */
for (Channel::ModeList::const_iterator it2 = c->GetModes().begin(); it2 != c->GetModes().end(); ++it2)
{
ChannelMode *cm = ModeManager::FindChannelModeByName(it2->first);
@@ -151,6 +153,7 @@ void Server::Burst()
if (!c->topic.empty() && !c->topic_setter.empty())
IRCD->Send<messages::Topic>(ci ? ci->WhoSends() : chanserv, c, c->topic, c->topic_ts, c->topic_setter);
+ /* Cause other channel metadata to be synced */
c->syncing = true;
}
}