From: pk910 Date: Sun, 21 Aug 2011 06:07:31 +0000 (+0200) Subject: really use parameters when passed with bind_set_parameters X-Git-Tag: v5.3~504 X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=591846d11511d556fd205ce2b4b5d356d7aa6654 really use parameters when passed with bind_set_parameters --- diff --git a/modcmd.c b/modcmd.c index 03e56ac..37b0fee 100644 --- a/modcmd.c +++ b/modcmd.c @@ -450,7 +450,16 @@ void free_modcmd() { } void bind_set_parameters(int botid, char *cmd, char *parameters) { - + int bind_index = get_binds_index(cmd[0]); + struct cmd_binding *cbind; + for(cbind = cmd_binds[bind_index]; cbind; cbind = cbind->next) { + if(cbind->botid == botid && strcmp(cbind->cmd, cmd) == 0) { + if(cbind->parameters) + free(cbind->parameters); + cbind->parameters = strdup(parameters); + return; + } + } } void bind_set_gaccess(int botid, char *cmd, int gaccess) {