helpserv.c

Go to the documentation of this file.
00001 /* HelpServ 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: helpserv.c 1265 2007-08-26 15:33:06Z geniusdex $ 
00012  *
00013  */
00014 
00015 /*************************************************************************/
00016 #include "services.h"
00017 #include "pseudo.h"
00018 
00019 void moduleAddHelpServCmds(void);
00020 
00021 /*************************************************************************/
00022 
00027 void moduleAddHelpServCmds(void)
00028 {
00029     modules_core_init(HelpServCoreNumber, HelpServCoreModules);
00030 }
00031 
00032 /*************************************************************************/
00033 
00038 void helpserv_init(void)
00039 {
00040     moduleAddHelpServCmds();
00041 }
00042 
00043 /*************************************************************************/
00044 
00051 void helpserv(User * u, char *buf)
00052 {
00053     char *cmd, *s;
00054 
00055     cmd = strtok(buf, " ");
00056 
00057     if (!cmd) {
00058         return;
00059     } else if (stricmp(cmd, "\1PING") == 0) {
00060         if (!(s = strtok(NULL, ""))) {
00061             s = "";
00062         }
00063         anope_cmd_ctcp(s_HelpServ, u->nick, "PING %s", s);
00064     } else {
00065         mod_run_cmd(s_HelpServ, u, HELPSERV, cmd);
00066     }
00067 }
00068 
00069 /*************************************************************************/

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