Hi noob here working on my first mod.
I can kind of see how commands are added to the bind table but how does eggdrop know what arguments to pass to my functions when the command is issued?
Thanks.
Code: Select all
/* The actual C function that will be mapped to the tcl namespace
* Compared to the tcl "bind dcc", having "handle idx text" as arguments
*/
static void cmd_pls_chan(struct userrec *u, int idx, char *par)
{
char *chname;
struct chanset_t *chan;
...
}
/* Now to map the function into a dcc partyline command
* DCC CHAT COMMANDS
*
* Function call should be:
* int cmd_whatever(idx,"parameters");
*
* NOTE: As with msg commands, the function is responsible for any logging.
*/
static cmd_t C_dcc_irc[] = {
...
{"+chan", "n", (Function) cmd_pls_chan, NULL},
...
{NULL, NULL, NULL, NULL}
};