diff options
author | Adam <Adam@anope.org> | 2011-11-01 01:11:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-11-01 01:11:26 -0400 |
commit | 302989bed13ee11bca08d8f7997d03f44d492c8a (patch) | |
tree | c5dbee3870042f8117882adb17ea0b7e7f8865e3 /modules/commands/cs_mode.cpp | |
parent | 22b7d9fbeebe67467427fcb3d015e1aa74aafd80 (diff) |
Clarify the message when users try to lock modes they don't have access to lock
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r-- | modules/commands/cs_mode.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index a36e68690..916cb8d02 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -68,11 +68,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_STATUS || cm->Type == MODE_LIST) && !sep.GetToken(mode_param)) || (cm->Type == MODE_PARAM && adding && !sep.GetToken(mode_param))) source.Reply(_("Missing parameter for mode %c."), cm->ModeChar); |