Anope IRC Services  Version 1.8
hs_help.c
Go to the documentation of this file.
1 /* HostServ 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 
33  c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
35 
36  return MOD_CONT;
37 }
38 
42 void AnopeFini(void)
43 {
44 
45 }
46 
47 
48 
54 static int do_help(User * u)
55 {
56  char *cmd = strtok(NULL, "");
57 
58  if (!cmd) {
59  notice_help(s_HostServ, u, HOST_HELP, s_HostServ);
60  moduleDisplayHelp(6, u);
61  } else {
63  }
64  return MOD_CONT;
65 }
MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[], const char *cmd)
Definition: commands.c:266
void AnopeFini(void)
Definition: hs_help.c:42
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
#define HOSTSERV
Definition: modules.h:56
MDE void moduleSetType(MODType type)
Definition: modules.c:818
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
E char * s_HostServ
Definition: extern.h:303
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: hs_help.c:54
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1082
int AnopeInit(int argc, char **argv)
Definition: hs_help.c:25
#define MOD_UNIQUE
Definition: module.h:11