pidgin: f286f2cf: This will fix adding, removing MSN conta...

sulabh at soc.pidgin.im sulabh at soc.pidgin.im
Mon Aug 24 18:31:22 EDT 2009


-----------------------------------------------------------------
Revision: f286f2cfdfedd1e075eafa24e669794f1c19044c
Ancestor: b80f1afaa189723b6c4156ce603406e9350b5a9a
Author: sulabh at soc.pidgin.im
Date: 2009-08-24T22:27:18
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f286f2cfdfedd1e075eafa24e669794f1c19044c

Modified files:
        libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

This will fix adding, removing MSN contacts on yahoo's deny list

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	89c8001e85bc52254c4fc5b28de2460526215024
+++ libpurple/protocols/yahoo/libymsg.c	702969c9c8e78fbb3fbc4bc0e48e6c7e51f70dcb
@@ -4774,6 +4774,7 @@ void yahoo_add_deny(PurpleConnection *gc
 void yahoo_add_deny(PurpleConnection *gc, const char *who) {
 	YahooData *yd = (YahooData *)gc->proto_data;
 	struct yahoo_packet *pkt;
+	gboolean msn = FALSE;
 
 	if (!yd->logged_in)
 		return;
@@ -4781,15 +4782,21 @@ void yahoo_add_deny(PurpleConnection *gc
 	if (!who || who[0] == '\0')
 		return;
 
+	msn = !g_ascii_strncasecmp(who, "msn/", 4);
 	pkt = yahoo_packet_new(YAHOO_SERVICE_IGNORECONTACT, YAHOO_STATUS_AVAILABLE, yd->session_id);
-	yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc),
-	                  7, who, 13, "1");
+
+	if(msn)
+		yahoo_packet_hash(pkt, "ssss", 1, purple_connection_get_display_name(gc), 7, who+4, 241, "2", 13, "1");
+	else
+		yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "1");
+
 	yahoo_packet_send_and_free(pkt, yd);
 }
 
 void yahoo_rem_deny(PurpleConnection *gc, const char *who) {
 	YahooData *yd = (YahooData *)gc->proto_data;
 	struct yahoo_packet *pkt;
+	gboolean msn = FALSE;
 
 	if (!yd->logged_in)
 		return;
@@ -4797,8 +4804,14 @@ void yahoo_rem_deny(PurpleConnection *gc
 	if (!who || who[0] == '\0')
 		return;
 
+	msn = !g_ascii_strncasecmp(who, "msn/", 4);
 	pkt = yahoo_packet_new(YAHOO_SERVICE_IGNORECONTACT, YAHOO_STATUS_AVAILABLE, yd->session_id);
-	yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2");
+
+	if(msn)
+		yahoo_packet_hash(pkt, "ssss", 1, purple_connection_get_display_name(gc), 7, who+4, 241, "2", 13, "2");
+	else
+		yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2");
+	
 	yahoo_packet_send_and_free(pkt, yd);
 }
 


More information about the Commits mailing list