changeset 19358:b3901a15147a

Fully fix #2654 by parsing the yahoo stealth information from the buddy list at logon time.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 21 Aug 2007 18:30:58 +0000
parents 0e1a2b80fc68
children 2401b5f0a91d
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Tue Aug 21 07:12:51 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Tue Aug 21 18:30:58 2007 +0000
@@ -568,6 +568,11 @@
 				purple_debug_info("yahoo", "Setting protocol to %d\n", f->protocol);
 			}
 			break;
+		case 317: /* Stealth Setting */
+			if (f && (strtol(pair->value, NULL, 10) == 2)) {
+				f->presence = YAHOO_PRESENCE_PERM_OFFLINE;
+			}
+			break;
 		/* case 242: */ /* this seems related to 241 */
 			/* break; */
 		}
@@ -964,7 +969,7 @@
 	yahoo_packet_hash(pkt, "ssiii", 1, add_req->id, 5, add_req->who, 241, add_req->protocol,
 	                  13, 1, 334, 0);
 	yahoo_packet_send_and_free(pkt, yd);
-	
+
 	g_free(add_req->id);
 	g_free(add_req->who);
 	g_free(add_req->msg);
@@ -2265,7 +2270,7 @@
 		break;
 	case YAHOO_SERVICE_AUTH_REQ_15:
 		yahoo_buddy_auth_req_15(gc, pkt);
-		break;	       
+		break;
 	case YAHOO_SERVICE_ADDBUDDY:
 		yahoo_process_addbuddy(gc, pkt);
 		break;
@@ -3734,7 +3739,7 @@
 		return;
 
 	f = yahoo_friend_find(gc, purple_buddy_get_name(buddy));
-	
+
 	if (foo)
 		group = foo->name;
 	if (!group) {