summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-03 19:55:36 +0000
committerviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-03 19:55:36 +0000
commit482a8aa766c9e1a96ff63b44ed319fe51588c35c (patch)
tree0fa77c006e553e8b9154bb7d1dcf649428394a96 /src/core
parent6846e75cc883f690ab4bfa83bdd398d83df5c0c9 (diff)
BUILD : 1.7.21 (1425) BUGS : 873 NOTES : We now show config variables in the help.
git-svn-id: svn://svn.anope.org/anope/trunk@1425 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1140 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ns_help.c25
-rw-r--r--src/core/ns_recover.c3
-rw-r--r--src/core/ns_release.c3
-rw-r--r--src/core/os_help.c14
-rw-r--r--src/core/os_logonnews.c2
-rw-r--r--src/core/os_opernews.c4
6 files changed, 43 insertions, 8 deletions
diff --git a/src/core/ns_help.c b/src/core/ns_help.c
index ce004ab3a..39a943799 100644
--- a/src/core/ns_help.c
+++ b/src/core/ns_help.c
@@ -64,12 +64,35 @@ int do_help(User * u)
notice_help(s_NickServ, u, NICK_HELP_EXPIRES,
NSExpire / 86400);
notice_help(s_NickServ, u, NICK_HELP_FOOTER);
- } else if (stricmp(cmd, "SET LANGUAGE") == 0) {
+ } else if ((stricmp(cmd, "SET LANGUAGE") == 0) &&
+ findModule("ns_set")) {
int i;
+ Command *c = findCommand(NICKSERV, cmd);
+
notice_help(s_NickServ, u, NICK_HELP_SET_LANGUAGE);
for (i = 0; i < NUM_LANGS && langlist[i] >= 0; i++)
notice_user(s_NickServ, u, " %2d) %s", i + 1,
langnames[langlist[i]]);
+ do_help_limited(s_NickServ, u, c);
+ } else if ((stricmp(cmd, "RECOVER") == 0) &&
+ findModule("ns_recover")) {
+ char relstr[192];
+ Command *c = findCommand(NICKSERV, cmd);
+
+ /* Convert NSReleaseTimeout seconds to string format */
+ duration(u->na, relstr, sizeof(relstr), NSReleaseTimeout);
+ notice_help(s_NickServ, u, NICK_HELP_RECOVER, relstr);
+ do_help_limited(s_NickServ, u, c);
+
+ } else if ((stricmp(cmd, "RELEASE") == 0) &&
+ findModule("ns_release")) {
+ char relstr[192];
+ Command *c = findCommand(NICKSERV, cmd);
+
+ /* Convert NSReleaseTimeout seconds to string format */
+ duration(u->na, relstr, sizeof(relstr), NSReleaseTimeout);
+ notice_help(s_NickServ, u, NICK_HELP_RELEASE, relstr);
+ do_help_limited(s_NickServ, u, c);
} else {
mod_help_cmd(s_NickServ, u, NICKSERV, cmd);
}
diff --git a/src/core/ns_recover.c b/src/core/ns_recover.c
index 40e0fa301..67e311b42 100644
--- a/src/core/ns_recover.c
+++ b/src/core/ns_recover.c
@@ -32,8 +32,7 @@ int AnopeInit(int argc, char **argv)
moduleAddVersion("$Id$");
moduleSetType(CORE);
- c = createCommand("RECOVER", do_recover, NULL, NICK_HELP_RECOVER, -1,
- -1, -1, -1);
+ c = createCommand("RECOVER", do_recover, NULL, -1, -1, -1, -1, -1);
moduleAddCommand(NICKSERV, c, MOD_UNIQUE);
moduleSetNickHelp(myNickServHelp);
diff --git a/src/core/ns_release.c b/src/core/ns_release.c
index 31eb1a530..03f96e3cd 100644
--- a/src/core/ns_release.c
+++ b/src/core/ns_release.c
@@ -32,8 +32,7 @@ int AnopeInit(int argc, char **argv)
moduleAddVersion("$Id$");
moduleSetType(CORE);
- c = createCommand("RELEASE", do_release, NULL, NICK_HELP_RELEASE, -1,
- -1, -1, -1);
+ c = createCommand("RELEASE", do_release, NULL, -1, -1, -1, -1, -1);
moduleAddCommand(NICKSERV, c, MOD_UNIQUE);
moduleSetNickHelp(myNickServHelp);
diff --git a/src/core/os_help.c b/src/core/os_help.c
index 822d1dcd0..5d837e6f3 100644
--- a/src/core/os_help.c
+++ b/src/core/os_help.c
@@ -59,6 +59,20 @@ int do_help(User * u)
notice_help(s_OperServ, u, OPER_HELP);
moduleDisplayHelp(5, u);
notice_help(s_OperServ, u, OPER_HELP_LOGGED);
+ } else if ((stricmp(cmd, "LOGONNEWS") == 0) &&
+ findModule("os_logonnews")) {
+ Command *c = findCommand(OPERSERV, cmd);
+
+ notice_help(s_OperServ, u, NEWS_HELP_LOGON, NewsCount);
+ do_help_limited(s_OperServ, u, c);
+
+ } else if ((stricmp(cmd, "OPERNEWS") == 0) &&
+ findModule("os_opernews")) {
+ Command *c = findCommand(OPERSERV, cmd);
+
+ notice_help(s_OperServ, u, NEWS_HELP_OPER, NewsCount);
+ do_help_limited(s_OperServ, u, c);
+
} else {
mod_help_cmd(s_OperServ, u, OPERSERV, cmd);
}
diff --git a/src/core/os_logonnews.c b/src/core/os_logonnews.c
index e4194c5f7..91cf86ba6 100644
--- a/src/core/os_logonnews.c
+++ b/src/core/os_logonnews.c
@@ -36,7 +36,7 @@ int AnopeInit(int argc, char **argv)
* we can look at moving it here later
**/
c = createCommand("LOGONNEWS", do_logonnews, is_services_admin,
- NEWS_HELP_LOGON, -1, -1, -1, -1);
+ -1, -1, -1, -1, -1);
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
moduleSetOperHelp(myOperServHelp);
diff --git a/src/core/os_opernews.c b/src/core/os_opernews.c
index 4f76bafae..59dc8b82b 100644
--- a/src/core/os_opernews.c
+++ b/src/core/os_opernews.c
@@ -35,8 +35,8 @@ int AnopeInit(int argc, char **argv)
* For some unknown reason, do_opernews is actaully defined in news.c
* we can look at moving it here later
**/
- c = createCommand("OPERNEWS", do_opernews, is_services_admin,
- NEWS_HELP_OPER, -1, -1, -1, -1);
+ c = createCommand("OPERNEWS", do_opernews, is_services_admin,
+ -1, -1, -1, -1, -1);
moduleAddCommand(OPERSERV, c, MOD_UNIQUE);
moduleSetOperHelp(myOperServHelp);