From 85bd530a88bdb1e6d50e538c9f2235de6c209612 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 5 Feb 2005 17:39:48 +0000 Subject: Away check is now customizable (with new irc_away_check option) --- src/gui/curses/gui-input.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/gui/curses/gui-input.c') diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c index cb222f9fb..ad43813db 100644 --- a/src/gui/curses/gui-input.c +++ b/src/gui/curses/gui-input.c @@ -659,10 +659,12 @@ gui_main_loop () gui_draw_buffer_infobar (gui_current_window->buffer, 1); } - /* second has changed ? => count down time for infobar, if needed */ + /* second has changed ? */ if (local_time->tm_sec != old_sec) { old_sec = local_time->tm_sec; + + /* infobar count down */ if (gui_infobar && gui_infobar->remaining_time > 0) { gui_infobar->remaining_time--; @@ -672,11 +674,16 @@ gui_main_loop () gui_draw_buffer_infobar (gui_current_window->buffer, 1); } } - check_away++; - if (check_away >= CHECK_AWAY_DELAY) + + /* away check */ + if (cfg_irc_away_check != 0) { - check_away = 0; - server_check_away (); + check_away++; + if (check_away >= (cfg_irc_away_check * 60)) + { + check_away = 0; + server_check_away (); + } } } -- cgit v1.2.3