comparison src/server.c @ 9237:fac583b4ecdf

[gaim-migrate @ 10035] Make sure that the buddy we're emitting buddy-idle-changed for is indeed online and idle. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 08 Jun 2004 02:20:14 +0000
parents e8d86fd68552
children 7a8aa87164ae
comparison
equal deleted inserted replaced
9236:e8d86fd68552 9237:fac583b4ecdf
1073 static guint idle_buddy_timeout_id = 0; 1073 static guint idle_buddy_timeout_id = 0;
1074 1074
1075 static gboolean 1075 static gboolean
1076 idle_timeout_cb(void) 1076 idle_timeout_cb(void)
1077 { 1077 {
1078 GList *l; 1078 GList *l, *l_next;
1079 1079
1080 for (l = idle_buddies; l != NULL; l = l->next) 1080 for (l = idle_buddies; l != NULL; l = l_next)
1081 { 1081 {
1082 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated", 1082 GaimBuddy *buddy = (GaimBuddy *)l->data;
1083 l->data); 1083
1084 l_next = l->next;
1085
1086 if (!GAIM_BUDDY_IS_ONLINE(buddy) || buddy->idle <= 0)
1087 {
1088 remove_idle_buddy(buddy);
1089 }
1090 else
1091 {
1092 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated",
1093 l->data);
1094 }
1084 } 1095 }
1085 1096
1086 return TRUE; 1097 return TRUE;
1087 } 1098 }
1088 1099