[IRCServices Coding] module programming questions
Andrew Church
achurch at achurch.org
Sat Aug 13 12:04:32 PDT 2005
Apologies for the delay in replying; I've been busy lately.
>1. I saw in the memoserv module an array (static Command cmds[]), which
>(i think) used to declare the commands, which users can use on irc. I
>searched for the definition of Command structure, and found it in
>commands.h but can't understand what the variables does. Can anybody
>explain me what (*has_priv)(User *u), helpmsg_all, etc does to the
>module? Or can i write a fully functional modul without using functions
>and structures in command.c or .h?
The commands.[ch] files are intended to help with processing
pseudoclient commands, by letting you provide a list of commands available
which can then be searched by the functions in commands.c. It's not
necessary, however.
>2. When I compile a module, which provides a new pseudoclient, will it
>be available after rehashing, or i need to restart services?
The module itself will be loaded after a REHASH (I've clarified this
in the documentation), so as long as your init_module() function introduces
the nickname, it'll be available.
>3. Is there any list with some description about available functions
>like get_user, is_oper, send_cmd, etc etc... I know the definitions are
>in extern.h and i can find the functions in the .c files, but there
>aren't and description what the functions actually does. If there aren't
>any documentation i will try to find it out from the source, i know,
>it's an alternative, but it would be better to have docs :)
A design document detailing all of this information is something I'm
hoping to have done for version 5.1. (I'd actually hoped to have it for
5.0, but you can see how well that plan worked out...)
--Andrew Church
achurch at achurch.org
http://achurch.org/