summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-12-02 02:01:39 -0500
committerAdam <Adam@anope.org>2013-12-02 02:01:39 -0500
commit96af354ad55e439be71b82077dd6a411b4746bbb (patch)
tree7b0a6d5b524f14535f2bff20ca349d5e9b26742d
parentb5966cf99e2b1ffd578e0aa371803cb17013956f (diff)
Send channel topics on initial burst, sync chanels after db load, and try to after unserializing persist on
-rw-r--r--modules/commands/cs_set.cpp9
-rw-r--r--src/init.cpp3
-rw-r--r--src/servers.cpp2
3 files changed, 11 insertions, 3 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 463318436..9db73decf 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -511,6 +511,8 @@ class CommandCSSetPersist : public Command
ChannelStatus status(BotModes());
ci->bi->Join(c, &status);
}
+ if (created)
+ c->Sync();
}
/* Set the perm mode */
@@ -1165,14 +1167,15 @@ class CSSet : public Module
if (ChanServ)
ChanServ->Assign(NULL, ci);
}
- if (!ci->bi)
- return;
- if (!c->FindUser(ci->bi))
+ if (ci->bi && !c->FindUser(ci->bi))
{
ChannelStatus status(BotModes());
ci->bi->Join(c, &status);
}
+
+ if (created)
+ c->Sync();
}
} persist;
diff --git a/src/init.cpp b/src/init.cpp
index fae776f9b..489f3b264 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -477,6 +477,9 @@ void Anope::Init(int ac, char **av)
static_cast<void>(MOD_RESULT);
Log() << "Databases loaded";
+ for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
+ it->second->Sync();
+
Serialize::CheckTypes();
}
diff --git a/src/servers.cpp b/src/servers.cpp
index 713e4a66e..ef7e221bd 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -123,6 +123,8 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano
continue;
ModeManager::StackerAdd(c->ci->WhoSends(), c, cm, true, it2->second);
}
+
+ IRCD->SendTopic(c->ci->WhoSends(), c);
}
}
}