bs_help.c

Go to the documentation of this file.
00001 /* BotServ core functions
00002  *
00003  * (C) 2003-2007 Anope Team
00004  * Contact us at info@anope.org
00005  *
00006  * Please read COPYING and README for further details.
00007  *
00008  * Based on the original code of Epona by Lara.
00009  * Based on the original code of Services by Andy Church. 
00010  * 
00011  * $Id: bs_help.c 1265 2007-08-26 15:33:06Z geniusdex $
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 }

Generated on Sun Dec 30 09:26:46 2007 for Anope by  doxygen 1.5.1-20070107