1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 11:23:13 +02:00

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
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2007-08-28 14:20:44 +00:00
parent dbcca23f37
commit d5594b84ee
20 changed files with 386 additions and 236 deletions
+27
View File
@@ -126,6 +126,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
@@ -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;
+1
View File
@@ -65,6 +65,7 @@ void myOperServHelp(User * u)
{
if (is_services_oper(u)) {
notice_lang(s_OperServ, u, OPER_HELP_CMD_AKILL);
notice_lang(s_OperServ, u, HELP_LIMIT_SERV_OPER);
}
}
+1
View File
@@ -59,6 +59,7 @@ void myOperServHelp(User * u)
{
if (is_services_root(u)) {
notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLOAD);
notice_lang(s_OperServ, u, HELP_LIMIT_SERV_ROOT);
}
}
+2
View File
@@ -187,11 +187,13 @@ void notice_lang(char *source, User * dest, int message, ...)
char buf[4096]; /* because messages can be really big */
char *s, *t;
const char *fmt;
if (!dest || !message) {
return;
}
va_start(args, message);
fmt = getstring(dest->na, message);
if (!fmt)
return;
memset(buf, 0, 4096);