From 302989bed13ee11bca08d8f7997d03f44d492c8a Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 1 Nov 2011 01:11:26 -0400 Subject: [PATCH] Clarify the message when users try to lock modes they don't have access to lock --- modules/commands/cs_mode.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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);