summaryrefslogtreecommitdiff
path: root/src/core/cs_help.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cs_help.c')
-rw-r--r--src/core/cs_help.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/core/cs_help.c b/src/core/cs_help.c
index 75271b35a..c8c34341f 100644
--- a/src/core/cs_help.c
+++ b/src/core/cs_help.c
@@ -40,35 +40,35 @@ class CSHelp : public Module
**/
int do_help(User * u)
{
- char *cmd = strtok(NULL, "");
+ char *cmd = strtok(NULL, "");
- if (!cmd) {
- notice_help(s_ChanServ, u, CHAN_HELP);
- moduleDisplayHelp(2, u);
- if (CSExpire >= 86400)
- notice_help(s_ChanServ, u, CHAN_HELP_EXPIRES,
- CSExpire / 86400);
- if (is_services_oper(u))
- notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP);
- } else if (stricmp(cmd, "LEVELS DESC") == 0) {
- int i;
- notice_help(s_ChanServ, u, CHAN_HELP_LEVELS_DESC);
- if (!levelinfo_maxwidth) {
- for (i = 0; levelinfo[i].what >= 0; i++) {
- int len = strlen(levelinfo[i].name);
- if (len > levelinfo_maxwidth)
- levelinfo_maxwidth = len;
- }
- }
- for (i = 0; levelinfo[i].what >= 0; i++) {
- notice_help(s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT,
- levelinfo_maxwidth, levelinfo[i].name,
- getstring(u->na, levelinfo[i].desc));
- }
- } else {
- mod_help_cmd(s_ChanServ, u, CHANSERV, cmd);
- }
- return MOD_CONT;
+ if (!cmd) {
+ notice_help(s_ChanServ, u, CHAN_HELP);
+ moduleDisplayHelp(2, u);
+ if (CSExpire >= 86400)
+ notice_help(s_ChanServ, u, CHAN_HELP_EXPIRES,
+ CSExpire / 86400);
+ if (is_services_oper(u))
+ notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP);
+ } else if (stricmp(cmd, "LEVELS DESC") == 0) {
+ int i;
+ notice_help(s_ChanServ, u, CHAN_HELP_LEVELS_DESC);
+ if (!levelinfo_maxwidth) {
+ for (i = 0; levelinfo[i].what >= 0; i++) {
+ int len = strlen(levelinfo[i].name);
+ if (len > levelinfo_maxwidth)
+ levelinfo_maxwidth = len;
+ }
+ }
+ for (i = 0; levelinfo[i].what >= 0; i++) {
+ notice_help(s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT,
+ levelinfo_maxwidth, levelinfo[i].name,
+ getstring(u->na, levelinfo[i].desc));
+ }
+ } else {
+ mod_help_cmd(s_ChanServ, u, CHANSERV, cmd);
+ }
+ return MOD_CONT;
}
MODULE_INIT("cs_help", CSHelp)