X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodcmd.c;h=8ec2517ef9c640bcbeb3f909a306980c02800d94;hp=fd71523edfd64869f47cb60a0913c7f0bc762656;hb=HEAD;hpb=1ec245405118cf7b3724b97c407104a75f5277c9 diff --git a/src/modcmd.c b/src/modcmd.c index fd71523..8ec2517 100644 --- a/src/modcmd.c +++ b/src/modcmd.c @@ -194,17 +194,21 @@ static struct cmd_binding *modcmd_sub_linker_command(struct ClientSocket *client args++; } sprintf(command, "%s %s", parent_bind->cmd, subcmd); + if(args) + args[-1] = ' '; for(cbind = cmd_binds[bind_index]; cbind; cbind = cbind->next) { if(cbind->botid == client->botid && (cbind->botid || cbind->clientid == client->clientid) && stricmp(cbind->cmd, command) == 0) break; } - *args_ptr = args; - if(cbind && cbind->func->func == modcmd_linker) { - return modcmd_linker_command(client, textclient, user, cbind, bind_index, args_ptr); + if(cbind) { + *args_ptr = args; + if(cbind->func->func == modcmd_linker) + parent_bind = modcmd_linker_command(client, textclient, user, cbind, bind_index, args_ptr); + else + parent_bind = cbind; } - return (cbind ? cbind : parent_bind); - } else - return parent_bind; + } + return parent_bind; } static void handle_command(struct ClientSocket *client, struct UserNode *user, struct ChanNode *chan, char *message) {