Anope IRC Services
Anope Development => Modules => Topic started by: n00bie 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:
Fixed :P
[Edited on 8-7-2006 by n00bie]
-
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]
-
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
-
if (*av[0] == '#') {
return MOD_CONT;
}
thanks a lot Trystan, now, ive got my first clue.
[Edited on 31-8-2006 by n00bie]