From 1b88da45aac4880cb3a0df0e39b94476ae5b99af Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 1 Nov 2012 00:20:02 +0000 Subject: [PATCH] Ignore lines starting with '/' when sending state --- src/input_win.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/input_win.c b/src/input_win.c index 759b857e..27f42d22 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -137,6 +137,13 @@ inp_get_char(int *ch, char *input, int *size) noecho(); *ch = wgetch(inp_win); + gboolean in_command = FALSE; + + if ((*size >= 1 && input[0] == '/') || + (*size == 0 && *ch == '/')) { + in_command = TRUE; + } + if (prefs_get_states()) { // if not got char, and in chat window, flag as no activity @@ -161,7 +168,7 @@ inp_get_char(int *ch, char *input, int *size) } // if got char and in chat window, chat session active - if (prefs_get_outtype() && (*ch != ERR) && win_in_chat()) { + if (prefs_get_outtype() && (*ch != ERR) && win_in_chat() && !in_command) { char *recipient = win_get_recipient(); chat_session_set_composing(recipient); if (!chat_session_get_sent(recipient) ||