#include "module.h"
#define AUTHOR "Tom65789"
#define VERSION "0.1"
/********************* About ***********************
* Module: bs_kiss
*
* This Module adds fantasy !kiss to BotServ Bots.
*
****************************************************
* Version History:
*
* 0.1 -
* Completed Code.
*
****************************************************/
/****************** Configuration ******************/
// No Configuration Options
/************** End Of Configuration! **************/
int do_kiss(int argc, char **argv);
int AnopeInit(int argc, char **argv)
{
EvtHook *hook = NULL;
int status;
hook = createEventHook(EVENT_BOT_FANTASY_NO_ACCESS, do_kiss);
status = moduleAddEventHook(hook);
moduleAddAuthor(AUTHOR);
moduleAddVersion(VERSION);
return MOD_CONT;
}
/**
* Unload the module
**/
void AnopeFini(void)
{
}
/**
* command to be called when a EVENT_BOT_FANTASY & EVENT_BOT_FANTASY_NO_ACCESS event is recived.
* @param argc The paramater count for this event.
* @param argv[0] The cmd used.
* @param argv[1] The nick of the command user.
* @param argv[2] The channel name the command was used in.
* @param argv[3] The Target User.
* @return MOD_CONT or MOD_STOP
**/
int do_kiss(int argc, char **argv) {
ChannelInfo *ci;
User *u2;
char *target = NULL;
if(argc>=4) { /* We need at least 4 arguments */
target = myStrGetToken(argv[3], ' ', 0);
}
if(stricmp(argv[0],"kiss")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s kisses %s lir so ta jub jub... ouy sweet mess lok... %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"wb")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s welcome back %s to join %s %c",1,argv[1],argv[2],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"hug")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s hugged %s klang klang mes tech dach kjol koun ke tov?... %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"love")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s mean deng ort? tha %s ja lagn neak klang nas na... %c",1,target,argv[1],1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"vai")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s vai %s 3 dai pang! pang! pang! zoul eh... %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"rape")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s rape %s . Tov hoav police ouy mor jab sen... %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
/**/
if(stricmp(argv[0],"bouch")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s bouch sok %s pa jras tov krouy. ngai krouy kom lang. %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"theak")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s theak %s 3 jerng ouch! chir ort ah oun heheheh... %c",1,argv[1],target,1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
if(stricmp(argv[0],"rose")==0) { /* is it meant for us? */
if((ci = cs_findchan(argv[2]))) { /* channel should always exist */
if(stricmp(target, ci->bi->nick)) {
u2 = finduser(target);
anope_cmd_privmsg(ci->bi->nick, ci->name, "%cACTION %s eh %s ouy rose you ma toung ness --<--<--<{@ ja art ort pov? %c",1,target,argv[1],1);
return MOD_STOP; /* We've dealt with it, dont let others */
}
}
}
return MOD_CONT; /* guess it wasnt for us, pass it on */
}
/* EOF */
this is module that bro Tom65789 wrote it for me. now i want to add more command but it got error. please help me to correct it.
Thanks.