# HG changeset patch # User Matti Hamalainen # Date 1337848734 -10800 # Node ID c2e4d7b4e0ae56644e9bc820c4b88b450ff186c1 # Parent 143fd51048a98cc2c4f3d4fe85757bbc946d9f1c Fix server-side commands. diff -r 143fd51048a9 -r c2e4d7b4e0ae main.c --- a/main.c Thu May 24 11:38:34 2012 +0300 +++ b/main.c Thu May 24 11:38:54 2012 +0300 @@ -1193,9 +1193,9 @@ for (i = 0; i < nuserCmds; i++) { nn_usercmd_t *cmd = &userCmds[i]; - if (!th_strncasecmp(buf, cmd->cmd, cmd->len)) + if (!th_strncasecmp(buf + 1, cmd->cmd, cmd->len)) { - char *nbuf = str_trim_left(buf + cmd->len); + char *nbuf = str_trim_left(buf + 1 + cmd->len); switch (cmd->flags) { @@ -1263,7 +1263,7 @@ // Check for commands if (buf[0] == '/') - return nn_handle_command(conn, buf + 1); + return nn_handle_command(conn, buf); // If current window is not the main room window, send private if (currWin != chatWindows[0])