projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f09df14
)
really use parameters when passed with bind_set_parameters
author
pk910
<philipp@zoelle1.de>
Sun, 21 Aug 2011 06:07:31 +0000
(08:07 +0200)
committer
pk910
<philipp@zoelle1.de>
Sun, 21 Aug 2011 06:07:31 +0000
(08:07 +0200)
modcmd.c
patch
|
blob
|
history
diff --git
a/modcmd.c
b/modcmd.c
index 03e56ac0bc6282ea2bccca3b2f59c905db5fb0c5..37b0fee23d1ce07601ef9fbf065606e82ceef5e6 100644
(file)
--- a/
modcmd.c
+++ b/
modcmd.c
@@
-450,7
+450,16
@@
void free_modcmd() {
}
void bind_set_parameters(int botid, char *cmd, char *parameters) {
}
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) {
}
void bind_set_gaccess(int botid, char *cmd, int gaccess) {