diff options
-rw-r--r-- | lang/cat.l | 9 | ||||
-rw-r--r-- | lang/de.l | 9 | ||||
-rw-r--r-- | lang/en_us.l | 9 | ||||
-rw-r--r-- | lang/es.l | 9 | ||||
-rw-r--r-- | lang/fr.l | 9 | ||||
-rw-r--r-- | lang/gr.l | 9 | ||||
-rw-r--r-- | lang/hun.l | 9 | ||||
-rw-r--r-- | lang/it.l | 9 | ||||
-rw-r--r-- | lang/nl.l | 9 | ||||
-rw-r--r-- | lang/pl.l | 10 | ||||
-rw-r--r-- | lang/pt.l | 9 | ||||
-rw-r--r-- | lang/ru.l | 9 | ||||
-rw-r--r-- | lang/tr.l | 9 | ||||
-rw-r--r-- | src/commands.c | 18 |
14 files changed, 136 insertions, 0 deletions
diff --git a/lang/cat.l b/lang/cat.l index 42c8d7bc3..03f606ed8 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -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 diff --git a/lang/en_us.l b/lang/en_us.l index 5af737e02..b2d3201a0 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -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 diff --git a/lang/hun.l b/lang/hun.l index 6e01c1668..e5a50bda3 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -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 diff --git a/src/commands.c b/src/commands.c index a564b644e..a3ba87e1c 100644 --- a/src/commands.c +++ b/src/commands.c @@ -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); + } } /*************************************************************************/ |