Anope IRC Services  Version 1.8
os_help.c
Go to the documentation of this file.
1 /* OperServ core functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
13 /*************************************************************************/
14 
15 #include "module.h"
16 
17 static int do_help(User * u);
18 
25 int AnopeInit(int argc, char **argv)
26 {
27  Command *c;
28 
29  moduleAddAuthor("Anope");
30  moduleAddVersion(VERSION_STRING);
32  c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
34 
35  return MOD_CONT;
36 }
37 
41 void AnopeFini(void)
42 {
43 
44 }
45 
46 
47 
53 static int do_help(User * u)
54 {
55  const char *cmd = strtok(NULL, "");
56 
57  if (!cmd) {
58  notice_help(s_OperServ, u, OPER_HELP);
59  moduleDisplayHelp(5, u);
60  notice_help(s_OperServ, u, OPER_HELP_LOGGED);
61  } else {
63  }
64  return MOD_CONT;
65 }
int AnopeInit(int argc, char **argv)
Definition: os_help.c:25
MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[], const char *cmd)
Definition: commands.c:266
void AnopeFini(void)
Definition: os_help.c:41
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
MDE void moduleSetType(MODType type)
Definition: modules.c:818
#define OPERSERV
Definition: modules.h:62
E char * s_OperServ
Definition: extern.h:289
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
MDE void moduleDisplayHelp(int service, User *u)
Definition: modules.c:2162
Command * c
Definition: ns_recover.c:17
E void notice_help(char *source, User *dest, int message,...)
Definition: send.c:220
#define MOD_CONT
Definition: modules.h:54
Definition: modules.h:99
MDE Command * createCommand(const char *name, int(*func)(User *u), int(*has_priv)(User *u), int help_all, int help_reg, int help_oper, int help_admin, int help_root)
Definition: modules.c:987
static int do_help(User *u)
Definition: os_help.c:53
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1082
#define MOD_UNIQUE
Definition: module.h:11