I have next problem: in my module to eggdrop i need a list of logfiles currently attached to bot (i.e. with the command "logfile" in config file). when I try to use next code:
another question: there is function (for use in tcl scripts) with name "logfile", declared in tclmisc.c, is there way to call such tcl functions in my module, and to get result of this functions back to my module?
(i've tried to use "do_tcl" but it wasn't work, perhaps i've done somthing wrong?)
(is it all clear with my sequence of tenses? )
Now, this Bell tolling softly for another, saies to me, Thou must die.
demond wrote:the solution is to patch eggdrop to export max_logs for module use (i.e. adding max_logs to global_table in src/modules.c and src/mod/module.h)
and will my module be working if i decide to export only *.so (or *.dll for win platform) module without a source code?
Now, this Bell tolling softly for another, saies to me, Thou must die.
demond wrote:the solution is to patch eggdrop to export max_logs for module use (i.e. adding max_logs to global_table in src/modules.c and src/mod/module.h)
and will my module be working if i decide to export only *.so (or *.dll for win platform) module without a source code?
I don't get that, seems you are somewhat confused about the whole module thing and programming in general
Shmupsik wrote:another question: there is function (for use in tcl scripts) with name "logfile", declared in tclmisc.c, is there way to call such tcl functions in my module, and to get result of this functions back to my module?
(i've tried to use "do_tcl" but it wasn't work, perhaps i've done somthing wrong?)
(is it all clear with my sequence of tenses? )
do_tcl() should work, it's properly exported in modules.c and mod/module.h, but you can't get the result back to you; use Tcl_Eval() family of functions (and Tcl_SetVar()) to invoke a TCL command and get the result