summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-18 15:47:16 -0500
committerAdam <Adam@anope.org>2012-02-18 15:47:16 -0500
commitf2ce9cd85ce831ba291f3a6353b308802f327e87 (patch)
tree44e784d9d54b83701e0c5f5d2b6d75cf8cb1fd20 /modules
parentee5cd8493e34a1c049066ead25e9094b30cd49b5 (diff)
Made mode lock del check status of the mode lock before removing it
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/cs_mode.cpp4
-rw-r--r--modules/commands/cs_set_persist.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index e0dda5524..c2b9c7de4 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -136,7 +136,7 @@ class CommandCSMode : public Command
source.Reply(_("Missing parameter for mode %c."), cm->ModeChar);
else
{
- if (ci->RemoveMLock(cm, mode_param))
+ if (ci->RemoveMLock(cm, adding, mode_param))
{
if (!mode_param.empty())
mode_param = " " + mode_param;
@@ -144,7 +144,7 @@ class CommandCSMode : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to unlock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
}
else
- source.Reply(_("%c is not locked on %s."), cm->ModeChar, ci->name.c_str());
+ source.Reply(_("%c%c is not locked on %s."), adding == 1 ? '+' : '-', cm->ModeChar, ci->name.c_str());
}
}
}
diff --git a/modules/commands/cs_set_persist.cpp b/modules/commands/cs_set_persist.cpp
index 4136a2fa2..4a1d676dd 100644
--- a/modules/commands/cs_set_persist.cpp
+++ b/modules/commands/cs_set_persist.cpp
@@ -99,7 +99,7 @@ class CommandCSSetPersist : public Command
if (ci->c && ci->c->HasMode(CMODE_PERM))
ci->c->RemoveMode(NULL, cm);
/* Remove from mlock */
- ci->RemoveMLock(cm);
+ ci->RemoveMLock(cm, true);
}
/* No channel mode, no BotServ, but using ChanServ as the botserv bot