changeset 25111:9398f0f2cdc6

Buddies on both the Allow and Block list are now automatically removed from the Allow list. Users with this problem will now no longer receive an ADL 241 error. The problematic buddy should now appear on the buddy list and can be removed or unblocked as desired. Fixes #6702.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 17 Feb 2009 03:07:10 +0000
parents b096f7fb6899
children de01d4aa4571
files ChangeLog libpurple/protocols/msn/notification.c
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Feb 17 00:27:34 2009 +0000
+++ b/ChangeLog	Tue Feb 17 03:07:10 2009 +0000
@@ -47,6 +47,10 @@
 	* We no longer try to send empty messages.  This could happen when a
 	  message contained only formatting and that formatting was not supported
 	  on MSN.
+	* Buddies on both the Allow and Block list are now automatically
+	  removed from the Allow list.  Users with this problem will now no
+	  longer receive an ADL 241 error.  The problematic buddy should now
+	  appear on the buddy list and can be removed or unblocked as desired.
 
 	XMPP:
 	* Resources using __HOSTNAME__ substitution will now grab only the short
--- a/libpurple/protocols/msn/notification.c	Tue Feb 17 00:27:34 2009 +0000
+++ b/libpurple/protocols/msn/notification.c	Tue Feb 17 03:07:10 2009 +0000
@@ -623,6 +623,18 @@
 		if (user->passport && !strcmp(user->passport, "messenger@microsoft.com"))
 			continue;
 
+		if ((user->list_op & MSN_LIST_OP_MASK) == (MSN_LIST_AL_OP | MSN_LIST_BL_OP)) {
+			/* The server will complain if we send it a user on both the
+			   Allow and Block lists. So assume they're on the Block list
+			   and remove them from the Allow list in the membership lists to
+			   stop this from happening again. */
+			purple_debug_warning("msn",
+			                     "User %s is on both Allow and Block list,"
+			                     "removing from Allow list.\n",
+			                     user->passport);
+			msn_userlist_rem_buddy_from_list(session->userlist, user->passport, MSN_LIST_AL);
+		}
+
 		msn_add_contact_xml(session, adl_node, user->passport,
 			user->list_op & MSN_LIST_OP_MASK, user->networkid);