plugins/idle.c

changeset 5227
6b44f7901f94
parent 5205
242b8aa81328
child 5314
56ef6a09fb99
equal deleted inserted replaced
5226:13c1a4e0ac89 5227:6b44f7901f94
18 time_t t; 18 time_t t;
19 int tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 0, G_MAXINT); 19 int tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 0, G_MAXINT);
20 if (!gc) { 20 if (!gc) {
21 return; 21 return;
22 } 22 }
23 debug_printf("setting idle time for %s to %d\n", gc->username, tm); 23 gaim_debug(GAIM_DEBUG_INFO, "idle",
24 "setting idle time for %s to %d\n", gc->username, tm);
24 time(&t); 25 time(&t);
25 t -= 60 * tm; 26 t -= 60 * tm;
26 gc->lastsent = t; 27 gc->lastsent = t;
27 serv_set_idle(gc, 60 * tm); 28 serv_set_idle(gc, 60 * tm);
28 gc->is_idle = 0; 29 gc->is_idle = 0;

mercurial