From e38ebe8a85e53a11a38b83f4dca1d586c499bb5c Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 4 Aug 2014 22:21:53 +0100 Subject: [PATCH] Check for unknown commands and show message in console fixes #390 --- src/command/command.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/command/command.c b/src/command/command.c index 61f81c8f..ed2708c4 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1397,6 +1397,13 @@ cmd_execute_default(const char * const inp) jabber_conn_status_t status = jabber_get_connection_status(); char *recipient = ui_current_recipient(); + // handle unknown commands + if ((inp[0] == '/') && (!g_str_has_prefix(inp, "/me "))) { + cons_show("Unknown command: %s", inp); + cons_alert(); + return TRUE; + } + switch (win_type) { case WIN_MUC: