Anope IRC Services

Anope Development => Modules => Topic started by: ben on July 23, 2007, 10:39:49 PM

Title: Module lists
Post by: ben on July 23, 2007, 10:39:49 PM
yes your wiki thing did a great job explaining the basics of the module making process however it didnt really list the options

for example:
    EvtMessage *msg;

    msg = createEventHandler("Name", moduleEventHandler);
the "Name" is what im confused about is there some list of things you can put in it or is it activated by such aliases
/kick = "KICK"
and etc..

also...
for Event hooks they use av[?] alot
however is it possible to get things off of it like: host, ip, hostmask, address, realname?
and if so how?

is there an timer option that you can do something every 6 hours or something?
Title:
Post by: katsklaw on July 24, 2007, 12:51:07 AM
you will need to see the doxy site as well but at the time of this writting is offline.
Title:
Post by: Trystan Scott Lee on July 24, 2007, 02:49:09 PM
createEventHandler : is from when anope sends out a IRCD command, NICK, SERVER etc.. KICK would be the command if services were sending a KICK to the upstream server, do not confuse createEventHandler with createEventHook

the Events are passed an array.. from the array you can get more details, so if we are talking about kick being done

    EVENT_CHAN_KICK
        Someone has just been kicked from a channel.
        av[0]  The nick of the user that has been kicked.
        av[1]  The channel the user has been kicked from.

then you take the 0 index of the array, and call finduser() on it and then you have the user struct to play with which has all this info