[IRCServices Coding] srvcs 5

Andrew Church achurch at achurch.org
Mon Dec 17 07:34:29 PST 2001


> A note about callbacks:
>
>Callbacks are nice when someone wants to add another function to services, 
>but are no good, when someone wants to extend an existing one. 

     Don't use callbacks for this, use the command system (commands.[ch]).
The next alpha will have a `next' pointer in the command record which gets
filled in when you call register_commands(), so you can call the original
command's function directly.

>I was trying to make nickserv to send one more line for the INFO command.
>It is possible to return the line at the begining but not at the end.
>I bypassed the strtok() problem, by duplicating the buffer to something l
>ike: 
>"A INFO nick" and then calling strtok once, for this one. 
>This way successive calls to strtok whould return the "INFO nick" part.
>But it is not possible to call my function *AFTER* do_info. I tried to 
>register my function with a higher priority and then call do_info from my
> 
>function, but it was no good. get_module_symbol() cannot find do_info() 
>(neither nickserv() ). I believe this is because of the static decleratio
>n of 
>the functions.
>
>Using "nm -g" it seems that those functions are not exported from the 
>nickserv module. 
>
>Is this going to change, or we should prepare for patching the main servi
>ces 
>code ?
>
><<V13>>
>------------------------------------------------------------------
>To unsubscribe or change your subscription options, visit:
>http://www.ircservices.za.net/mailman/listinfo/ircservices-coding

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/