mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 14:16:21 +00:00
Allow escaping commands using double slash "//"
This commit is contained in:
@@ -1391,14 +1391,18 @@ cmd_execute_alias(const char * const inp, gboolean *ran)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
cmd_execute_default(const char * const inp)
|
cmd_execute_default(const char * inp)
|
||||||
{
|
{
|
||||||
win_type_t win_type = ui_current_win_type();
|
win_type_t win_type = ui_current_win_type();
|
||||||
jabber_conn_status_t status = jabber_get_connection_status();
|
jabber_conn_status_t status = jabber_get_connection_status();
|
||||||
char *recipient = ui_current_recipient();
|
char *recipient = ui_current_recipient();
|
||||||
|
|
||||||
|
// handle escaped commands - treat as normal message
|
||||||
|
if (g_str_has_prefix(inp, "//")) {
|
||||||
|
inp++;
|
||||||
|
|
||||||
// handle unknown commands
|
// handle unknown commands
|
||||||
if ((inp[0] == '/') && (!g_str_has_prefix(inp, "/me "))) {
|
} else if ((inp[0] == '/') && (!g_str_has_prefix(inp, "/me "))) {
|
||||||
cons_show("Unknown command: %s", inp);
|
cons_show("Unknown command: %s", inp);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user