changeset 19191:0ac6c0fbc102

merge of '373e35d7a5ab723079d492a3479c77ff7be8463e' and '54be75e14dfb3952f1587b2b072b47ba67f7a94a'
author Kevin Stange <kevin@simguy.net>
date Sat, 11 Aug 2007 21:26:43 +0000
parents 07413ddcd49c (diff) eef82b050c21 (current diff)
children 33fed83f56c8
files
diffstat 3 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Sat Aug 11 21:08:27 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Sat Aug 11 21:26:43 2007 +0000
@@ -3819,16 +3819,12 @@
 		return;
 	}
 
-	/* Step 1:  Add buddy to new group. */
-	pkt = yahoo_packet_new(YAHOO_SERVICE_ADDBUDDY, YAHOO_STATUS_AVAILABLE, 0);
-	yahoo_packet_hash(pkt, "ssss", 1, purple_connection_get_display_name(gc),
-	                  7, who, 65, gpn, 14, "");
+	pkt = yahoo_packet_new(YAHOO_SERVICE_CHGRP_15, YAHOO_STATUS_AVAILABLE, 0);
+	yahoo_packet_hash(pkt, "ssssssss", 1, purple_connection_get_display_name(gc),
+	                  302, "240", 300, "240", 7, who, 224, gpo, 264, gpn, 301,
+	                  "240", 303, "240");
 	yahoo_packet_send_and_free(pkt, yd);
 
-	/* Step 2:  Remove buddy from old group */
-	pkt = yahoo_packet_new(YAHOO_SERVICE_REMBUDDY, YAHOO_STATUS_AVAILABLE, 0);
-	yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 65, gpo);
-	yahoo_packet_send_and_free(pkt, yd);
 	g_free(gpn);
 	g_free(gpo);
 }
--- a/libpurple/protocols/yahoo/yahoo_packet.c	Sat Aug 11 21:08:27 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.c	Sat Aug 11 21:26:43 2007 +0000
@@ -223,6 +223,11 @@
 	GSList *l = pkt->hash;
 	int pos = 0;
 
+	/* This is only called from one place, and the list is
+	 * always backwards */
+
+	l = g_slist_reverse(l);
+
 	while (l) {
 		struct yahoo_pair *pair = l->data;
 		gchar buf[100];
--- a/libpurple/protocols/yahoo/yahoo_packet.h	Sat Aug 11 21:08:27 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.h	Sat Aug 11 21:26:43 2007 +0000
@@ -98,6 +98,7 @@
 	YAHOO_SERVICE_AVATAR_UPDATE = 0xc7,
 	YAHOO_SERVICE_VERIFY_ID_EXISTS = 0xc8,
 	YAHOO_SERVICE_AUDIBLE = 0xd0,
+	YAHOO_SERVICE_CHGRP_15 = 0xe7,
 	YAHOO_SERVICE_STATUS_15 = 0xf0,
 	YAHOO_SERVICE_LIST_15 = 0Xf1,
 	YAHOO_SERVICE_WEBLOGIN = 0x0226,