1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 15:03:13 +02:00

Cleanup after mode locks, badwords, akick, access, if destructed

This commit is contained in:
Adam
2012-12-29 20:29:41 -05:00
parent 793c438286
commit 326f1a9c8b
7 changed files with 103 additions and 52 deletions
+5 -9
View File
@@ -54,16 +54,12 @@ class CommandCSRegister : public Command
{
ci = new ChannelInfo(chan);
ci->SetFounder(nc);
if (!chdesc.empty())
ci->desc = chdesc;
ci->desc = chdesc;
for (ChannelInfo::ModeList::iterator it = ModeManager::DefaultModeLocks.begin(), it_end = ModeManager::DefaultModeLocks.end(); it != it_end; ++it)
{
ModeLock *ml = new ModeLock(*it->second);
ml->setter = source.GetNick();
ml->ci = ci;
ci->mode_locks->insert(std::make_pair(it->first, ml));
}
for (std::list<std::pair<ChannelModeName, Anope::string> >::const_iterator it = ModeManager::ModeLockOn.begin(), it_end = ModeManager::ModeLockOn.end(); it != it_end; ++it)
ci->SetMLock(ModeManager::FindChannelModeByName(it->first), true, it->second, source.GetNick());
for (std::list<ChannelModeName>::const_iterator it = ModeManager::ModeLockOff.begin(), it_end = ModeManager::ModeLockOff.end(); it != it_end; ++it)
ci->SetMLock(ModeManager::FindChannelModeByName(*it), false, "", source.GetNick());
if (c && !c->topic.empty())
{