# HG changeset patch # User Evan Schoenberg # Date 1145395005 0 # Node ID 788580688610f98701e8678c39e21bac6b946d50 # Parent f9b24d282c91c89c6aa6ba791cc4d8a15810a037 [gaim-migrate @ 16060] We can pass 0 for the idle time to gaim_presence_set_idle() if 'idle' is FALSE, skipping a needless call to time() committer: Tailor Script diff -r f9b24d282c91 -r 788580688610 plugins/idle.c --- a/plugins/idle.c Tue Apr 18 21:15:56 2006 +0000 +++ b/plugins/idle.c Tue Apr 18 21:16:45 2006 +0000 @@ -72,7 +72,10 @@ "setting idle time for %s to %d\n", gaim_account_get_username(acct), mins_idle); - t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ + if (mins_idle) + t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ + else + t = 0; /* time idle is irrelevant */ gaim_presence_set_idle(presence, mins_idle ? TRUE : FALSE, t); }