changeset 9289:a2792c5f3ffd

[gaim-migrate @ 10092] Yay for working idle times on rendezvous. Thanks to proton (Andrew Wellington, no?) of http://www.wiretapped.net/~proton/rendezvous/ committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 15 Jun 2004 04:53:34 +0000
parents ab845c8e2afe
children 2e5faf12a24c
files src/protocols/rendezvous/rendezvous.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/rendezvous/rendezvous.c	Tue Jun 15 04:37:12 2004 +0000
+++ b/src/protocols/rendezvous/rendezvous.c	Tue Jun 15 04:53:34 2004 +0000
@@ -145,6 +145,7 @@
 	serv_got_update(gc, b->name, 0, 0, 0, 0, 0);
 	gaim_blist_remove_buddy(b);
 	/* XXX - This results in incorrect group counts--needs to be fixed in the core */
+	/* XXX - We also need to call remove_idle_buddy() in server.c for idle buddies */ 
 
 	/*
 	 * XXX - Instead of removing immediately, wait 10 seconds and THEN remove
@@ -252,15 +253,16 @@
 			/* Idle */
 			node2 = mdns_txt_find(rdata, "away");
 			if ((node2 != NULL) && (node2->value)) {
+				/* Time is seconds since January 1st 2001 GMT */
 				rb->idle = atoi(node2->value);
-				gaim_debug_error("XXX", "User has been idle since %d\n", rb->idle);
+				rb->idle += 978307200; /* convert to seconds-since-epoch */
 			}
 			rb->status = UC_IDLE;
 		} else if (!strcmp(node1->value, "dnd")) {
 			/* Away */
 			rb->status = UC_UNAVAILABLE;
 		}
-		serv_got_update(gc, name, 1, 0, 0, 0, rb->status);
+		serv_got_update(gc, name, 1, 0, 0, rb->idle, rb->status);
 	}
 
 	node1 = mdns_txt_find(rdata, "msg");