Mercurial > pidgin
comparison plugins/idle.c @ 12272:3ef381cdc47e
[gaim-migrate @ 14574]
This should fix idle time reporting for all accounts. Previously it would
only work for one account because I'm dumb.
We're also doing one idleness check every 5 seconds instead of checking
for each account every 20 seconds.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 30 Nov 2005 06:03:49 +0000 |
parents | aadf61b30056 |
children | 5907fb1e58a0 |
comparison
equal
deleted
inserted
replaced
12271:3c6675e1400e | 12272:3ef381cdc47e |
---|---|
24 | 24 |
25 #include "internal.h" | 25 #include "internal.h" |
26 | 26 |
27 #include "connection.h" | 27 #include "connection.h" |
28 #include "debug.h" | 28 #include "debug.h" |
29 #include "idle.h" | |
29 #include "notify.h" | 30 #include "notify.h" |
30 #include "plugin.h" | 31 #include "plugin.h" |
31 #include "request.h" | 32 #include "request.h" |
32 #include "server.h" | 33 #include "server.h" |
33 #include "status.h" | 34 #include "status.h" |
60 gaim_debug_info("idle", | 61 gaim_debug_info("idle", |
61 "setting idle time for %s to %d\n", | 62 "setting idle time for %s to %d\n", |
62 gaim_account_get_username(acct), mins_idle); | 63 gaim_account_get_username(acct), mins_idle); |
63 | 64 |
64 t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ | 65 t = time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */ |
65 gc->last_sent_time = t; | 66 gaim_idle_set(t); |
66 | 67 |
67 gaim_presence_set_idle(presence, mins_idle ? TRUE : FALSE, t); | 68 gaim_presence_set_idle(presence, mins_idle ? TRUE : FALSE, t); |
68 } | 69 } |
69 | 70 |
70 static void | 71 static void |