don't show sub-sub-commands in linker overview
authorpk910 <philipp@zoelle1.de>
Sat, 7 Jan 2012 00:41:05 +0000 (01:41 +0100)
committerpk910 <philipp@zoelle1.de>
Sat, 7 Jan 2012 00:41:05 +0000 (01:41 +0100)
src/modcmd.c

index 78b04c810df89b08c37f82d5a986a9d93fc21a2b..18483ed63887f77cc09cebe55dfc735940c2b1ab 100644 (file)
@@ -170,6 +170,7 @@ static struct cmd_binding *modcmd_linker_command(struct ClientSocket *client, st
         int subcompos = 0;
         for(cbind = cmd_binds[bind_index]; cbind; cbind = cbind->next) {
             if(cbind->botid == client->botid && (cbind->botid || cbind->clientid == client->clientid) && stricmplen(cbind->cmd, command, commandlen) == 0) {
+                if(strstr(cbind->cmd + commandlen, " ")) continue; //ignore if there is another space in the command (sub-sub-command :D)
                 subcompos += sprintf(subcommands + subcompos, (subcompos ? ", %s" : "%s"), cbind->cmd + commandlen);
             }
         }