summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-08-28 14:20:44 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-08-28 14:20:44 +0000
commitd5594b84ee2b6ef9370bdee6b727ed82f0370d30 (patch)
treeafcb3db2fe36fc67b3abcc772bfde38843f755dc /src/commands.c
parentdbcca23f378ea8e19fbffd8b2b8c39a8c678961d (diff)
BUILD : 1.7.19 (1282) BUGS : 729 NOTES : Changed the "Limited to ..." lines in help replies to automatically appended lines
git-svn-id: svn://svn.anope.org/anope/trunk@1282 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1000 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c
index 4deecb0c1..4460678db 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -127,6 +127,31 @@ void do_run_cmd(char *service, User * u, Command * c, const char *cmd)
/*************************************************************************/
/**
+ * Output the 'Limited to' line for the given command
+ * @param service Services Client
+ * @param u User Struct
+ * @param c Command Struct
+ * @return void
+ */
+void do_help_limited(char *service, User * u, Command * c)
+{
+ if (c->has_priv == is_services_oper)
+ notice_lang(service, u, HELP_LIMIT_SERV_OPER);
+ else if (c->has_priv == is_services_admin)
+ notice_lang(service, u, HELP_LIMIT_SERV_ADMIN);
+ else if (c->has_priv == is_services_root)
+ notice_lang(service, u, HELP_LIMIT_SERV_ROOT);
+ else if (c->has_priv == is_oper)
+ notice_lang(service, u, HELP_LIMIT_IRC_OPER);
+ else if (c->has_priv == is_host_setter)
+ notice_lang(service, u, HELP_LIMIT_HOST_SETTER);
+ else if (c->has_priv == is_host_remover)
+ notice_lang(service, u, HELP_LIMIT_HOST_REMOVER);
+}
+
+/*************************************************************************/
+
+/**
* Print a help message for the given command.
* @param services Services Client
* @param u User Struct
@@ -202,6 +227,8 @@ void do_help_cmd(char *service, User * u, Command * c, const char *cmd)
}
if (has_had_help == 0) {
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
+ } else {
+ do_help_limited(service, u, c);
}
mod_current_module = calling_module;