Mercurial > hg > nnchat
comparison main.c @ 457:69ce77696c5d
Fix command precedence.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 26 May 2012 05:31:36 +0300 |
parents | bb65460c7aa2 |
children | 75ed7be2cfe8 |
comparison
equal
deleted
inserted
replaced
456:bb65460c7aa2 | 457:69ce77696c5d |
---|---|
1201 { | 1201 { |
1202 nn_usercmd_t *cmd = curr->data; | 1202 nn_usercmd_t *cmd = curr->data; |
1203 | 1203 |
1204 if (!th_strncasecmp(buf, cmd->name, cmd->len)) | 1204 if (!th_strncasecmp(buf, cmd->name, cmd->len)) |
1205 { | 1205 { |
1206 char *nbuf = str_trim_left(buf + cmd->len); | 1206 char *nbuf; |
1207 if (buf[cmd->len] != 0 && !th_isspace(buf[cmd->len])) | |
1208 continue; | |
1209 | |
1210 nbuf = str_trim_left(buf + cmd->len); | |
1207 | 1211 |
1208 switch (cmd->flags) | 1212 switch (cmd->flags) |
1209 { | 1213 { |
1210 case CMDARG_NICK: | 1214 case CMDARG_NICK: |
1211 case CMDARG_STRING: | 1215 case CMDARG_STRING: |