Mercurial > hg > nnchat
changeset 457:69ce77696c5d
Fix command precedence.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 26 May 2012 05:31:36 +0300 |
parents | bb65460c7aa2 |
children | 6eef0dc83f0a |
files | main.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Sat May 26 05:20:37 2012 +0300 +++ b/main.c Sat May 26 05:31:36 2012 +0300 @@ -1203,7 +1203,11 @@ if (!th_strncasecmp(buf, cmd->name, cmd->len)) { - char *nbuf = str_trim_left(buf + cmd->len); + char *nbuf; + if (buf[cmd->len] != 0 && !th_isspace(buf[cmd->len])) + continue; + + nbuf = str_trim_left(buf + cmd->len); switch (cmd->flags) {