1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 06:26:37 +02:00

Clarify the message when users try to lock modes they don't have access to lock

This commit is contained in:
Adam
2011-11-01 01:11:26 -04:00
parent 22b7d9fbee
commit 302989bed1
+7 -1
View File
@@ -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);