- // Load only when there are no linked servers - we set the TS of the channels we
- // create to the current time, this can lead to desync because spanningtree has
- // no way of knowing what we do
- ProtoServerList serverlist;
- ServerInstance->PI->GetServerList(serverlist);
- if (serverlist.size() < 2)
- LoadDatabase();
- }
-
- CullResult cull()
- {
- /*
- * DelMode can't remove the +P mode on empty channels, or it will break
- * merging modes with remote servers. Remove the empty channels now as
- * we know this is not the case.
- */
- chan_hash::iterator iter = ServerInstance->chanlist->begin();
- while (iter != ServerInstance->chanlist->end())
- {
- Channel* c = iter->second;
- if (c->GetUserCounter() == 0)
- {
- chan_hash::iterator at = iter;
- iter++;
- FOREACH_MOD(I_OnChannelDelete, OnChannelDelete(c));
- ServerInstance->chanlist->erase(at);
- ServerInstance->GlobalCulls.AddItem(c);
- }
- else
- iter++;
- }
- ServerInstance->Modes->DelMode(&p);
- return Module::cull();
- }
-
- virtual void OnRehash(User *user)
- {
- permchannelsconf = ServerInstance->Config->ConfValue("permchanneldb")->getString("filename");