comparison plugins/yay/yay.c @ 1496:d33bf6548543

[gaim-migrate @ 1506] hrm. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 22 Feb 2001 00:42:55 +0000
parents ff023d798372
children de0b946e86a4
comparison
equal deleted inserted replaced
1495:3d1c4e5f375b 1496:d33bf6548543
85 struct yahoo_idstatus *rec = pkt->idstatus[i]; 85 struct yahoo_idstatus *rec = pkt->idstatus[i];
86 gboolean online = rec->in_pager || rec->in_chat || rec->in_game; 86 gboolean online = rec->in_pager || rec->in_chat || rec->in_game;
87 87
88 b = find_buddy(gc, rec->id); 88 b = find_buddy(gc, rec->id);
89 if (!b) continue; 89 if (!b) continue;
90 time(&tmptime);
91 if (b->signon == 0) b->signon = tmptime;
92 if (!online) 90 if (!online)
93 serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0); 91 serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0);
94 else { 92 else {
95 if (rec->status == YAHOO_STATUS_AVAILABLE) 93 if (rec->status == YAHOO_STATUS_AVAILABLE)
96 serv_got_update(gc, b->name, 1, 0, b->signon, 0, UC_NORMAL, 0); 94 serv_got_update(gc, b->name, 1, 0, 0, 0, UC_NORMAL, 0);
97 else if (rec->status == YAHOO_STATUS_IDLE) 95 else if (rec->status == YAHOO_STATUS_IDLE) {
98 serv_got_update(gc, b->name, 1, 0, b->signon, tmptime - 600, 96 time(&tmptime);
97 serv_got_update(gc, b->name, 1, 0, 0, tmptime - 600,
99 (rec->status << 5) | UC_NORMAL, 0); 98 (rec->status << 5) | UC_NORMAL, 0);
100 else 99 } else
101 serv_got_update(gc, b->name, 1, 0, b->signon, 0, 100 serv_got_update(gc, b->name, 1, 0, 0, 0,
102 (rec->status << 5) | UC_UNAVAILABLE, 0); 101 (rec->status << 5) | UC_UNAVAILABLE, 0);
103 if (rec->status == YAHOO_STATUS_CUSTOM) { 102 if (rec->status == YAHOO_STATUS_CUSTOM) {
104 gpointer val = g_hash_table_lookup(yd->hash, b->name); 103 gpointer val = g_hash_table_lookup(yd->hash, b->name);
105 if (val) 104 if (val)
106 g_free(val); 105 g_free(val);