summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-08 20:26:45 -0400
committerAdam <Adam@anope.org>2013-05-08 20:26:45 -0400
commit735e234c2c7a984b01295f86045545ed8d9838ce (patch)
tree87d7cce721eaa7a34d71b17c73f317750d87caef /src/servers.cpp
parent735f0ba6cf5602396bc2cabd6ceca0e92a0edd00 (diff)
Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/servers.cpp b/src/servers.cpp
index 6c017f08e..0c1019216 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -254,35 +254,39 @@ void Server::Sync(bool sync_links)
{
bool created;
ci->c = Channel::FindOrCreate(ci->name, created, ci->time_registered);
+
if (ModeManager::FindChannelModeByName("PERM") != NULL)
{
- ci->c->SetMode(NULL, "PERM");
if (created)
IRCD->SendChannel(ci->c);
+ ci->c->SetMode(NULL, "PERM");
}
else
{
if (!ci->bi)
ci->WhoSends()->Assign(NULL, ci);
if (ci->c->FindUser(ci->bi) == NULL)
- ci->bi->Join(ci->c);
+ {
+ ChannelStatus status(Config->GetModule("botserv")->Get<const Anope::string>("botmodes"));
+ ci->bi->Join(ci->c, &status);
+ }
}
}
}
FOREACH_MOD(I_OnPreUplinkSync, OnPreUplinkSync(this));
- IRCD->SendEOB();
- Me->Sync(false);
-
- FOREACH_MOD(I_OnUplinkSync, OnUplinkSync(this));
-
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
{
Channel *c = it->second;
c->Sync();
}
+ IRCD->SendEOB();
+ Me->Sync(false);
+
+ FOREACH_MOD(I_OnUplinkSync, OnUplinkSync(this));
+
if (!Anope::NoFork && Anope::AtTerm())
{
Log(LOG_TERMINAL) << "Successfully linked, launching into background...";