plugins/idle.c

changeset 13659
13d0d6abc1d3
parent 12844
e989f8d36628
child 13702
35310965f38a
--- 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);
 }

mercurial