# HG changeset patch # User Mikael Berthe # Date 1486840776 -3600 # Node ID e26c7709e0232b39967e0de98efb71ae18d1d63b # Parent e00ae0763468ccee500277531bcf350e70ea15b0 Let "::stuff" be treated as ":say :stuff" in chat mode diff -r e00ae0763468 -r e26c7709e023 mcabber/mcabber/commands.c --- a/mcabber/mcabber/commands.c Sat Feb 11 12:40:43 2017 +0100 +++ b/mcabber/mcabber/commands.c Sat Feb 11 20:19:36 2017 +0100 @@ -550,17 +550,22 @@ return; } - if (*line != COMMAND_CHAR) { - // This isn't a command - if (scr_get_multimode()) - scr_append_multiline(line); - else - say_cmd((char*)line, 0); - return; + if (*line == COMMAND_CHAR && scr_get_multimode() != 2) { + if (*(line+1) != COMMAND_CHAR) { + /* It is a command */ + process_command(line, FALSE); + return; + } else { + /* Skip the first COMMAND_CHAR */ + line++; + } } - /* It is _probably_ a command -- except for verbatim multi-line mode */ - process_command(line, FALSE); + // This isn't a command + if (scr_get_multimode()) + scr_append_multiline(line); + else + say_cmd((char*)line, 0); } // Helper routine for buffer item_{lock,unlock,toggle_lock}