00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "module.h"
00017
00018 int do_help(User * u);
00019
00026 int AnopeInit(int argc, char **argv)
00027 {
00028 Command *c;
00029
00030 moduleAddAuthor("Anope");
00031 moduleAddVersion("$Id: bs_help.c 1265 2007-08-26 15:33:06Z geniusdex $");
00032 moduleSetType(CORE);
00033 c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
00034 moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
00035
00036
00037 return MOD_CONT;
00038 }
00039
00043 void AnopeFini(void)
00044 {
00045
00046 }
00047
00048
00049
00055 int do_help(User * u)
00056 {
00057 char *cmd = strtok(NULL, "");
00058
00059 if (!cmd) {
00060 notice_help(s_BotServ, u, BOT_HELP);
00061 moduleDisplayHelp(4, u);
00062 notice_help(s_BotServ, u, BOT_HELP_FOOTER, BSMinUsers);
00063 } else {
00064 mod_help_cmd(s_BotServ, u, BOTSERV, cmd);
00065 }
00066 return MOD_CONT;
00067 }