From f453e84436dc6e452b1f1be40611d1b11c57051d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 19 Feb 2001 04:33:39 +0000 Subject: /NETSPLIT prints nicks now sorted and prints @ or + before channel if user was opped/voiced before split. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1251 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-windows.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/fe-text') diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c index 6dfaa084..d591c69f 100644 --- a/src/fe-text/gui-windows.c +++ b/src/fe-text/gui-windows.c @@ -977,11 +977,10 @@ void gui_window_resize(WINDOW_REC *window, int ychange, int xchange) } } -static int window_remove_linecache(void *key, LINE_CACHE_REC *cache, gpointer nowp) +static int window_remove_linecache(void *key, LINE_CACHE_REC *cache, + time_t *now) { - time_t now = (time_t) GPOINTER_TO_INT(nowp); - - if (cache->last_access+LINE_CACHE_KEEP_TIME > now) + if (cache->last_access+LINE_CACHE_KEEP_TIME > *now) return FALSE; line_cache_destroy(NULL, cache); @@ -991,12 +990,15 @@ static int window_remove_linecache(void *key, LINE_CACHE_REC *cache, gpointer no static int sig_check_linecache(void) { GSList *tmp; + time_t now; + now = time(NULL); for (tmp = windows; tmp != NULL; tmp = tmp->next) { WINDOW_REC *rec = tmp->data; - g_hash_table_foreach_remove(WINDOW_GUI(rec)->line_cache, (GHRFunc) window_remove_linecache, - GINT_TO_POINTER((int) time(NULL))); + g_hash_table_foreach_remove(WINDOW_GUI(rec)->line_cache, + (GHRFunc) window_remove_linecache, + &now); } return 1; } -- cgit v1.2.3