summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/commands/cs_set.cpp2
-rw-r--r--src/modes.cpp20
2 files changed, 19 insertions, 3 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 9db73decf..d32669701 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -523,7 +523,7 @@ class CommandCSSetPersist : public Command
/* Add it to the channels mlock */
ModeLocks *ml = ci->Require<ModeLocks>("modelocks");
if (ml)
- ml->SetMLock(cm, true);
+ ml->SetMLock(cm, true, "", source.GetNick());
}
/* No botserv bot, no channel mode, give them ChanServ.
* Yes, this works fine with no BotServ.
diff --git a/src/modes.cpp b/src/modes.cpp
index 55ce2b506..d82b367dc 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -570,14 +570,30 @@ void ModeManager::ProcessModes()
}
}
+template<typename T>
+static void StackerDel(std::map<T *, StackerInfo *> &map, T *obj)
+{
+ typename std::map<T *, StackerInfo *>::iterator it = map.find(obj);
+ if (it != map.end())
+ {
+ StackerInfo *si = it->second;
+ std::list<Anope::string> ModeStrings = BuildModeStrings(si);
+ for (std::list<Anope::string>::iterator lit = ModeStrings.begin(), lit_end = ModeStrings.end(); lit != lit_end; ++lit)
+ IRCD->SendMode(si->bi, obj, lit->c_str());
+
+ delete si;
+ map.erase(it);
+ }
+}
+
void ModeManager::StackerDel(User *u)
{
- UserStackerObjects.erase(u);
+ ::StackerDel(UserStackerObjects, u);
}
void ModeManager::StackerDel(Channel *c)
{
- ChannelStackerObjects.erase(c);
+ ::StackerDel(ChannelStackerObjects, c);
}
void ModeManager::StackerDel(Mode *m)