diff options
author | Adam <Adam@anope.org> | 2012-12-29 20:29:41 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-29 20:29:41 -0500 |
commit | 326f1a9c8bfe0024883b5dd0da66ec7b9f1ac36f (patch) | |
tree | a129c46c40f1d5068bcbeba9030e24412e38fd8d /modules/commands/cs_register.cpp | |
parent | 793c4382868744f6a9522bd1a1865ffff1dbdb70 (diff) |
Cleanup after mode locks, badwords, akick, access, if destructed
Diffstat (limited to 'modules/commands/cs_register.cpp')
-rw-r--r-- | modules/commands/cs_register.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index d1ada3c19..92c5ec6f9 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -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()) { |