Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Can anyone fixed this code...  (Read 4108 times)

0 Members and 1 Guest are viewing this topic.

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
Can anyone fixed this code...
« on: March 05, 2006, 07:57:38 AM »

Hello, first of all i am a newbie in anope module coding and stuff. After reading through the example demos provided by anope, i decided to learn and write my own module. So here is one. But, i got a problem on the code and if anyone could fixed these code for me, i will be very thankful:

Quote
Fixed :P



[Edited on 8-7-2006 by n00bie]
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

dragoonkain

  • Guest
(No subject)
« Reply #1 on: March 05, 2006, 11:49:47 PM »

I'll admit I didn't read through it, but if you could would you please tell us where you're having problems? I.E: Are you compiling the code and getting compile errors? Is KissServ not replying with the proper message? Not replying at all?

Thanks

PS:

int do_kiss(User * u)
{
ChannelInfo *ci;
char *chan = strtok(NULL, " ");
char *text = strtok(NULL, " ");
...

You shouldn't use strtok(NULL, " "); for Anope 1.7.x if that's what you're aiming for. Try:

[oopsie - slashed by Trystan]

[Edited on 6-3-2006 by dragoonkain]
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #2 on: March 06, 2006, 12:47:00 AM »

You can't use moduleGetLastBuffer() if your using a custom psdeuo client. Since the core looks to see if the person being asked for is one of theirs (core only) services and sets the last buffer correctly, otherwise it is just ignored and the last buffer is worthless

Also the above code will ONLY work if you privmsg the bot..

if (*av[0] == '#') {
return MOD_CONT;
}

that tells it to ignore all privmsg seen that are to a channel

To tired to point out the rest of the issues with this code
Logged
my God my tourniquet, return to me salvation

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #3 on: March 06, 2006, 08:01:10 AM »

Code: [Select]
if (*av[0] == '#') {
return MOD_CONT;
}

thanks a lot Trystan, now, ive got my first clue.

[Edited on 31-8-2006 by n00bie]
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.
Pages: [1]   Go Up