src/protocols/rendezvous/rendezvous.c

changeset 9289
dabe5f77e994
parent 8993
41f67bceab41
child 9308
4ea759d72d37
equal deleted inserted replaced
9288:a19f73556084 9289:dabe5f77e994
143 return; 143 return;
144 144
145 serv_got_update(gc, b->name, 0, 0, 0, 0, 0); 145 serv_got_update(gc, b->name, 0, 0, 0, 0, 0);
146 gaim_blist_remove_buddy(b); 146 gaim_blist_remove_buddy(b);
147 /* XXX - This results in incorrect group counts--needs to be fixed in the core */ 147 /* XXX - This results in incorrect group counts--needs to be fixed in the core */
148 /* XXX - We also need to call remove_idle_buddy() in server.c for idle buddies */
148 149
149 /* 150 /*
150 * XXX - Instead of removing immediately, wait 10 seconds and THEN remove 151 * XXX - Instead of removing immediately, wait 10 seconds and THEN remove
151 * them. If you do it immediately you don't see the door close icon. 152 * them. If you do it immediately you don't see the door close icon.
152 */ 153 */
250 rb->status = 0; 251 rb->status = 0;
251 } else if (!strcmp(node1->value, "away")) { 252 } else if (!strcmp(node1->value, "away")) {
252 /* Idle */ 253 /* Idle */
253 node2 = mdns_txt_find(rdata, "away"); 254 node2 = mdns_txt_find(rdata, "away");
254 if ((node2 != NULL) && (node2->value)) { 255 if ((node2 != NULL) && (node2->value)) {
256 /* Time is seconds since January 1st 2001 GMT */
255 rb->idle = atoi(node2->value); 257 rb->idle = atoi(node2->value);
256 gaim_debug_error("XXX", "User has been idle since %d\n", rb->idle); 258 rb->idle += 978307200; /* convert to seconds-since-epoch */
257 } 259 }
258 rb->status = UC_IDLE; 260 rb->status = UC_IDLE;
259 } else if (!strcmp(node1->value, "dnd")) { 261 } else if (!strcmp(node1->value, "dnd")) {
260 /* Away */ 262 /* Away */
261 rb->status = UC_UNAVAILABLE; 263 rb->status = UC_UNAVAILABLE;
262 } 264 }
263 serv_got_update(gc, name, 1, 0, 0, 0, rb->status); 265 serv_got_update(gc, name, 1, 0, 0, rb->idle, rb->status);
264 } 266 }
265 267
266 node1 = mdns_txt_find(rdata, "msg"); 268 node1 = mdns_txt_find(rdata, "msg");
267 if ((node1 != NULL) && (node1->value != NULL)) { 269 if ((node1 != NULL) && (node1->value != NULL)) {
268 g_free(rb->msg); 270 g_free(rb->msg);

mercurial