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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user