diff options
author | James Booth <boothj5@gmail.com> | 2014-08-04 22:21:53 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-08-04 22:21:53 +0100 |
commit | e38ebe8a85e53a11a38b83f4dca1d586c499bb5c (patch) | |
tree | 5c7fb3fc2cd043a26e95158c88536d57d262c6b2 /src/command | |
parent | cd9b1449b506774dc083e7df3ac84c4380c14563 (diff) | |
download | profani-tty-e38ebe8a85e53a11a38b83f4dca1d586c499bb5c.tar.gz |
Check for unknown commands and show message in console
fixes #390
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 7 |
1 files changed, 7 insertions, 0 deletions
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: |