summaryrefslogtreecommitdiff
path: root/modules/commands/cs_mode.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-11-04 17:55:14 -0400
committerAdam <Adam@anope.org>2011-11-04 17:55:14 -0400
commita42cafbf69ac2753cb891f87664d1218b00a1bcf (patch)
tree039c2cfb75d96adce264cb9647ba7699c865d9cf /modules/commands/cs_mode.cpp
parent066e5b3fc08b6b85311e29aad6e78f12aba1a30e (diff)
Store flags for memos, fixed the expiring very soon message, fixed /os session view when a session exception is added at a lower limit than th default
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r--modules/commands/cs_mode.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 916cb8d02..7c0f09e63 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -88,6 +88,7 @@ class CommandCSMode : public Command
if (!mode_param.empty())
mode_param = " " + mode_param;
source.Reply(_("%c%c%s locked on %s"), adding ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
+ Log(LOG_COMMAND, u, this, ci) << "to lock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
}
}
}
@@ -117,11 +118,17 @@ class CommandCSMode : public Command
if (adding == -1)
break;
ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]);
- if (!cm || !cm->CanSet(u))
+ if (!cm)
{
source.Reply(_("Unknown mode character %c ignored."), modes[i]);
break;
}
+ else if (!cm->CanSet(u))
+ {
+ source.Reply(_("You may not (un)lock mode %c."), modes[i]);
+ break;
+ }
+
Anope::string mode_param;
if (!cm->Type == MODE_REGULAR && !sep.GetToken(mode_param))
source.Reply(_("Missing parameter for mode %c."), cm->ModeChar);
@@ -132,6 +139,7 @@ class CommandCSMode : public Command
if (!mode_param.empty())
mode_param = " " + mode_param;
source.Reply(_("%c%c%s has been unlocked from %s."), adding == 1 ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
+ Log(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());