Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: please correct this one for me  (Read 2605 times)

0 Members and 1 Guest are viewing this topic.

steven_elvisda

  • Guest
please correct this one for me
« on: April 28, 2006, 09:59:44 AM »

#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.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #1 on: April 28, 2006, 01:32:16 PM »

"i got error".... not a lot to go on
and without tabs or spaces it s no use reading it, but it sure looks like you got way to many }'s
think you just copied the end of one function and pasted it below it, without starting a new one, just a guess though
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #2 on: April 28, 2006, 10:28:13 PM »

copying and pasting what i did will not work lol. i'll touch it up a bit

EDIT: here it is http://www.area51designz.com/c/anope/bs_fantasy_mini.c
Pages: [1]   Go Up