mirror of
https://github.com/anope/anope.git
synced 2026-07-02 19:43:13 +02:00
Add messages at the bottom of HELP telling you if you can/cant use the command and why, and what permission is required if there is one
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2487 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -135,6 +135,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -152,6 +152,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -134,6 +134,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -134,6 +134,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -140,6 +140,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -134,6 +134,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -142,6 +142,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Különbözõ hiba üzenetek.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -136,6 +136,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -136,6 +136,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -146,6 +146,16 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
B³±d wewnêtrzny - nie mogê obs³u¿yæ ¿±dania.
|
||||
|
||||
@@ -144,6 +144,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -140,6 +140,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -138,6 +138,15 @@ STRFTIME_MONTHS_LONG
|
||||
COMMA_SPACE
|
||||
,
|
||||
|
||||
# Command help replies
|
||||
COMMAND_REQUIRES_PERM
|
||||
Access to this command requires the permission %s to be present in your opertype.
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
You need to be identified to use this command.
|
||||
COMMAND_CANNOT_USE
|
||||
You cannot use this command.
|
||||
COMMAND_CAN_USE
|
||||
You can use this command.
|
||||
|
||||
# Various error messages.
|
||||
USER_RECORD_NOT_FOUND
|
||||
|
||||
@@ -199,6 +199,24 @@ void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[], const char
|
||||
|
||||
if (!c || !c->OnHelp(u, subcommand))
|
||||
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
|
||||
else
|
||||
{
|
||||
u->SendMessage(service, " ");
|
||||
|
||||
/* Inform the user what permission is required to use the command */
|
||||
if (!c->permission.empty())
|
||||
notice_lang(service, u, COMMAND_REQUIRES_PERM, c->permission.c_str());
|
||||
|
||||
/* User isn't identified and needs to be to use this command */
|
||||
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !nick_identified(u))
|
||||
notice_lang(service, u, COMMAND_IDENTIFY_REQUIRED);
|
||||
/* User doesn't have the proper permission to use this command */
|
||||
else if (!c->permission.empty() && (!u->nc || (!u->nc->HasCommand(c->permission))))
|
||||
notice_lang(service, u, COMMAND_CANNOT_USE);
|
||||
/* User can use this command */
|
||||
else
|
||||
notice_lang(service, u, COMMAND_CAN_USE);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user