From 591846d11511d556fd205ce2b4b5d356d7aa6654 Mon Sep 17 00:00:00 2001 From: pk910 Date: Sun, 21 Aug 2011 08:07:31 +0200 Subject: [PATCH] really use parameters when passed with bind_set_parameters --- modcmd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) { -- 2.20.1