summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-29 20:29:41 -0500
committerAdam <Adam@anope.org>2012-12-29 20:29:41 -0500
commit326f1a9c8bfe0024883b5dd0da66ec7b9f1ac36f (patch)
treea129c46c40f1d5068bcbeba9030e24412e38fd8d /modules
parent793c4382868744f6a9522bd1a1865ffff1dbdb70 (diff)
Cleanup after mode locks, badwords, akick, access, if destructed
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/cs_register.cpp14
-rw-r--r--modules/protocol/inspircd12.cpp2
2 files changed, 6 insertions, 10 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())
{
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index 53ca4ec62..89540b6f4 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -847,7 +847,7 @@ struct IRCDMessageFJoin : IRCDMessage
}
time_t ts = Anope::string(params[1]).is_pos_number_only() ? convertTo<time_t>(params[1]) : Anope::CurTime;
- Message::Join::SJoin(source, params[0], ts, "", users);
+ Message::Join::SJoin(source, params[0], ts, modes, users);
}
};