comparison src/server.c @ 5786:f8bee920b14e

[gaim-migrate @ 6211] Matthew Hall (mthz) writes: " In server.c, "plugin_event(event_buddy_idle, gc, b->name);" gets fired to the plugins BEFORE the call to "gaim_blist_update_buddy_idle(b, idle);" is made a few lines later to update the the buddy struct's idle member. So, if a plugin catches event_buddy_idle and attempts to figure out the buddy's idle time, it will not be correct (in some cases when one first signs on, it will even be completely blank, as it is still zeroed). As far as I can tell, there is nothing wrong with reversing the order of the calls. Attached to this is a patch for the latest CVS... as of 4-9-03 Noon." because he put the patch in the bugs tracker, it took me this long to find it. patches should be in the patch tracker. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 07 Jun 2003 03:42:16 +0000
parents 147f4c25af15
children 995e63fb1a5a
comparison
equal deleted inserted replaced
5785:5419c37a6b0c 5786:f8bee920b14e
1062 if (strcmp(name, b->name)) { 1062 if (strcmp(name, b->name)) {
1063 gaim_blist_rename_buddy(b, name); 1063 gaim_blist_rename_buddy(b, name);
1064 gaim_blist_save(); 1064 gaim_blist_save();
1065 } 1065 }
1066 1066
1067 gaim_blist_update_buddy_idle(b, idle);
1068
1067 if (!b->idle && idle) { 1069 if (!b->idle && idle) {
1068 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE); 1070 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE);
1069 gaim_event_broadcast(event_buddy_idle, gc, b->name); 1071 gaim_event_broadcast(event_buddy_idle, gc, b->name);
1070 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE); 1072 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE);
1071 } 1073 }
1073 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE_RETURN); 1075 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE_RETURN);
1074 gaim_event_broadcast(event_buddy_unidle, gc, b->name); 1076 gaim_event_broadcast(event_buddy_unidle, gc, b->name);
1075 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE); 1077 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE);
1076 } 1078 }
1077 1079
1078 gaim_blist_update_buddy_idle(b, idle);
1079 gaim_blist_update_buddy_evil(b, evil); 1080 gaim_blist_update_buddy_evil(b, evil);
1080 1081
1081 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { 1082 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) {
1082 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_AWAY_RETURN); 1083 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_AWAY_RETURN);
1083 system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY); 1084 system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY);