Anope IRC Services

Anope Development => Modules => Topic started by: ben on July 23, 2007, 04:00:23 AM

Title: error compiling :[
Post by: ben on July 23, 2007, 04:00:23 AM
i type in make modules (in anope-1.7.19)
and it says:
ircd_netserv.c:6: error: syntax error before '{' token

--------------
Error:
int AnopeInit(int argc, char **argv)
{
    EvtHook *hook;
--------------

File:

#include <module.h>

int my_save(int ac, char **av)

int AnopeInit(int argc, char **argv)
{
    EvtHook *hook;

    hook = createEventHook(EVENT_NEWNICK, my_save);
    if (moduleAddEventHook(hook) != MOD_ERR_OK) {
        alog("Can't hook to EVENT_NEWNICK event");
        return MOD_STOP;
     }
    return MOD_CONT;
}

note: this is only a little part of the file
i have the rest of the:
int my_save(int ac, char **av)
done

i have the event hook set to notice new nick but i didnt think it would work but the problem is not this surpiringly
Title:
Post by: ben on July 23, 2007, 04:58:50 AM
nevermind i figured it out along with a bunch of other errors and for the record connection noticing is very hard to see i sugest if you want to do something like this you use privmsg
Title:
Post by: katsklaw on July 23, 2007, 12:19:36 PM
or just use LOGONNEWS since that is exactly what it's designed for.
Title:
Post by: ben on July 23, 2007, 09:56:31 PM
well actually theres nothing really about it, its a welcome message not a new item :[
does it really matter, its just a test run so i can learn how to do anope modules :D
by the way, it works

p.s. you might want to lock/delete this topic because it has no further use if the problem has been solved without the solution being posted