summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/cat.l9
-rw-r--r--lang/de.l9
-rw-r--r--lang/en_us.l9
-rw-r--r--lang/es.l9
-rw-r--r--lang/fr.l9
-rw-r--r--lang/gr.l9
-rw-r--r--lang/hun.l9
-rw-r--r--lang/it.l9
-rw-r--r--lang/nl.l9
-rw-r--r--lang/pl.l10
-rw-r--r--lang/pt.l9
-rw-r--r--lang/ru.l9
-rw-r--r--lang/tr.l9
-rw-r--r--src/commands.c18
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
diff --git a/lang/de.l b/lang/de.l
index 239fadf5e..30e9c8a1b 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -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
diff --git a/lang/es.l b/lang/es.l
index 4ae2e62ee..c3276e18e 100644
--- a/lang/es.l
+++ b/lang/es.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
diff --git a/lang/fr.l b/lang/fr.l
index f34c4fb6c..e7d993d22 100644
--- a/lang/fr.l
+++ b/lang/fr.l
@@ -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
diff --git a/lang/gr.l b/lang/gr.l
index e2bdc5421..13d97ea2f 100644
--- a/lang/gr.l
+++ b/lang/gr.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
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
diff --git a/lang/it.l b/lang/it.l
index 4e0e6f1be..9e9ee61ee 100644
--- a/lang/it.l
+++ b/lang/it.l
@@ -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
diff --git a/lang/nl.l b/lang/nl.l
index 90a7bd44f..e4e26b082 100644
--- a/lang/nl.l
+++ b/lang/nl.l
@@ -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
diff --git a/lang/pl.l b/lang/pl.l
index 2da215963..e65fd4314 100644
--- a/lang/pl.l
+++ b/lang/pl.l
@@ -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.
diff --git a/lang/pt.l b/lang/pt.l
index 2a6095472..42a477505 100644
--- a/lang/pt.l
+++ b/lang/pt.l
@@ -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
diff --git a/lang/ru.l b/lang/ru.l
index 33405f1b1..9adb2c484 100644
--- a/lang/ru.l
+++ b/lang/ru.l
@@ -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
diff --git a/lang/tr.l b/lang/tr.l
index 76fdce601..3483c7e64 100644
--- a/lang/tr.l
+++ b/lang/tr.l
@@ -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);
+ }
}
/*************************************************************************/