# HG changeset patch # User Eric Warmenhoven # Date 972583529 0 # Node ID 740c6f933fe0968f1ebdc319eea2b29f984db30d # Parent e4147c8604cc6ec865ace281cf25e953ebaee7b2 [gaim-migrate @ 1039] So here's why this needed to be fixed: There is a boolean value (stored as int....), is_idle, in each gc. It's used to indicate whether we've told the server that we're idle. You only need to tell the server once. Before this patch, there were two scenarios: X use and Gaim use. If you had idle set to X use, then you were telling the server every 20 seconds how idle you were. If you had idle set to gaim use, then you were never idle, because you would be updating when your last unidle action was every 20 seconds. committer: Tailor Script diff -r e4147c8604cc -r 740c6f933fe0 src/idle.c --- a/src/idle.c Thu Oct 26 11:48:42 2000 +0000 +++ b/src/idle.c Thu Oct 26 18:05:29 2000 +0000 @@ -47,7 +47,7 @@ #endif /* Not idle, really... :) */ - update_all_buddies(); + update_all_buddies(); plugin_event(event_blist_update, 0, 0, 0, 0); @@ -55,12 +55,6 @@ if (report_idle == 0) return TRUE; - /* - if (gc->is_idle) { - fprintf (stderr, "\tgc->is_idle\n"); - return TRUE; - } - */ #ifdef USE_SCREENSAVER if (report_idle == IDLE_SCREENSAVER) { @@ -75,11 +69,14 @@ #endif /* USE_SCREENSAVER */ idle_time = t - gc->lastsent; - if (idle_time > 600) { /* 10 minutes! */ + if (idle_time > 600 && !gc->is_idle) { /* 10 minutes! */ + debug_printf("setting %s idle %d seconds\n", gc->username, idle_time); serv_set_idle(gc, idle_time); gc->is_idle = 1; - } else + } else if (idle_time < 600 && gc->is_idle) { + debug_printf("setting %s unidle\n", gc->username); serv_touch_idle(gc); + } return TRUE;