diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_help.c | 25 | ||||
-rw-r--r-- | src/core/ns_recover.c | 3 | ||||
-rw-r--r-- | src/core/ns_release.c | 3 | ||||
-rw-r--r-- | src/core/os_help.c | 14 | ||||
-rw-r--r-- | src/core/os_logonnews.c | 2 | ||||
-rw-r--r-- | src/core/os_opernews.c | 4 |
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); |