changeset 23519:7bceac816e19

The great MSN debug message cleanup! Threw in a few whitespace fixes, too, as I saw them. Nothing to see here, move along...
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 12 Jul 2008 04:42:24 +0000
parents 186af522f14d
children 9acfa387c0a2
files libpurple/protocols/msn/contact.c libpurple/protocols/msn/msn.c libpurple/protocols/msn/msnutils.c libpurple/protocols/msn/nexus.c libpurple/protocols/msn/notification.c libpurple/protocols/msn/oim.c libpurple/protocols/msn/state.c libpurple/protocols/msn/switchboard.c libpurple/protocols/msn/user.c libpurple/protocols/msn/userlist.c
diffstat 10 files changed, 178 insertions(+), 180 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/contact.c	Sat Jul 12 04:42:24 2008 +0000
@@ -203,10 +203,10 @@
 msn_create_address_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data)
 {
 	if (resp && xmlnode_get_child(resp->xml, "Body/Fault") == NULL) {
-		purple_debug_info("msnab", "Address Book successfully created!\n");
+		purple_debug_info("msn", "Address Book successfully created!\n");
 		msn_get_address_book((MsnSession *)data, MSN_PS_INITIAL, NULL, NULL);
 	} else {
-		purple_debug_info("msnab", "Address Book creation failed!\n");
+		purple_debug_info("msn", "Address Book creation failed!\n");
 	}
 }
 
@@ -219,7 +219,7 @@
 	g_return_if_fail(session->user != NULL);
 	g_return_if_fail(session->user->passport != NULL);
 	
-	purple_debug_info("msnab","Creating an Address Book.\n");
+	purple_debug_info("msn", "Creating an Address Book.\n");
 
 	body = g_markup_printf_escaped(MSN_ADD_ADDRESSBOOK_TEMPLATE,
 		msn_nexus_get_token_str(session->nexus, MSN_AUTH_CONTACTS),
@@ -243,7 +243,7 @@
 	char *member_id = xmlnode_get_data(xmlnode_get_child(member, "MembershipId"));
 	MsnUser *user = msn_userlist_find_add_user(session->userlist, passport, NULL);
 
-	purple_debug_info("msncl","%s name: %s, Type: %s, MembershipID: %s\n",
+	purple_debug_info("msn", "CL: %s name: %s, Type: %s, MembershipID: %s\n",
 		node, passport, type, member_id == NULL ? "(null)" : member_id);
 
 	if (member_id) {
@@ -272,7 +272,7 @@
 			char *lastchange_str = xmlnode_get_data(lastchange);
 			xmlnode *membership;
 
-			purple_debug_info("msncl","last change: %s\n", lastchange_str);
+			purple_debug_info("msn", "CL last change: %s\n", lastchange_str);
 			purple_account_set_string(session->account,	"CLLastChange",
 				lastchange_str);
 
@@ -285,7 +285,7 @@
 				MsnListId list = msn_get_memberrole(role_str);
 				xmlnode *member;
 
-				purple_debug_info("msncl", "MemberRole role: %s, list: %d\n",
+				purple_debug_info("msn", "CL MemberRole role: %s, list: %d\n",
 					role_str, list);
 
 				for (member = xmlnode_get_child(membership, "Members/Member");
@@ -327,7 +327,7 @@
 	if ((fault = xmlnode_get_child(node, "Body/Fault"))) {
 		if ((faultnode = xmlnode_get_child(fault, "faultstring"))) {
 			char *faultstring = xmlnode_get_data(faultnode);
-			purple_debug_info("msncl", "Retrieving contact list failed: %s\n",
+			purple_debug_info("msn", "Retrieving contact list failed: %s\n",
 				faultstring);
 			g_free(faultstring);
 		}
@@ -368,7 +368,7 @@
 		const char *abLastChange;
 		const char *dynamicItemLastChange;
 
-		purple_debug_misc("msncl","Got the contact list!\n");
+		purple_debug_misc("msn", "Got the contact list!\n");
 
 		msn_parse_contact_list(session, resp->xml);
 		abLastChange = purple_account_get_string(session->account,
@@ -401,10 +401,10 @@
 	GetContactListCbData cb_data = { session, partner_scenario };
 	const gchar *partner_scenario_str = MsnSoapPartnerScenarioText[partner_scenario];
 
-	purple_debug_misc("MSNCL","Getting Contact List.\n");
+	purple_debug_misc("msn", "Getting Contact List.\n");
 
-	if ( update_time != NULL ) {
-		purple_debug_info("MSNCL","Last update time: %s\n",update_time);
+	if (update_time != NULL) {
+		purple_debug_info("msn", "CL Last update time: %s\n", update_time);
 		update_str = g_strdup_printf(MSN_GET_CONTACT_UPDATE_XML,update_time);
 	}
 
@@ -427,7 +427,7 @@
 {
 	xmlnode *group;
 
-	purple_debug_info("MSNAB","msn_parse_addressbook_groups()\n");
+	purple_debug_info("msn", "msn_parse_addressbook_groups()\n");
 
 	for(group = xmlnode_get_child(node, "Group"); group;
 					group = xmlnode_get_next_twin(group)){
@@ -447,7 +447,7 @@
 			continue;
 		}
 
-		purple_debug_info("MsnAB","group_id: %s, name: %s\n", group_id, group_name ? group_name : "(null)");
+		purple_debug_info("msn", "AB group_id: %s, name: %s\n", group_id, group_name ? group_name : "(null)");
 		if ((purple_find_group(group_name)) == NULL){
 			PurpleGroup *g = purple_group_new(group_name);
 			purple_blist_add_group(g, NULL);
@@ -552,7 +552,7 @@
 		}
 
 		/* ignore non-messenger contacts */
-		if((messenger_user = xmlnode_get_child(contactInfo, "isMessengerUser"))) {
+		if ((messenger_user = xmlnode_get_child(contactInfo, "isMessengerUser"))) {
 			char *is_messenger_user = xmlnode_get_data(messenger_user);
 
 			if(is_messenger_user && !strcmp(is_messenger_user, "false")) {
@@ -577,7 +577,7 @@
 				/*TODO:  need to support the Mobile type*/
 				continue;
 			}
-			for(contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail"); contactEmailNode;
+			for (contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail"); contactEmailNode;
 					contactEmailNode = xmlnode_get_next_twin(contactEmailNode) ){
 				if (!(messengerEnabledNode = xmlnode_get_child(contactEmailNode, "isMessengerEnabled"))) {
 					/* XXX: Should this be a continue instead of a break? It seems like it'd cause unpredictable results otherwise. */
@@ -591,15 +591,15 @@
 					passport = xmlnode_get_data(emailNode);
 				}
 
-				if(msnEnabled && !strcmp(msnEnabled, "true")) {
+				if (msnEnabled && !strcmp(msnEnabled, "true")) {
 					/*Messenger enabled, Get the Passport*/
-					purple_debug_info("MsnAB", "Yahoo User %s\n", passport ? passport : "(null)");
+					purple_debug_info("msn", "AB Yahoo User %s\n", passport ? passport : "(null)");
 					networkId = MSN_NETWORK_YAHOO;
 					g_free(msnEnabled);
 					break;
 				} else {
 					/*TODO maybe we can just ignore it in Purple?*/
-					purple_debug_info("MSNAB", "Other type user\n");
+					purple_debug_info("msn", "AB Other type user\n");
 				}
 
 				g_free(msnEnabled);
@@ -627,7 +627,7 @@
 
 		mobile = msn_parse_addressbook_mobile(contactInfo, &mobile_number);
 
-		purple_debug_misc("MsnAB","passport:{%s} uid:{%s} display:{%s} alias: {%s} mobile:{%s} mobile number:{%s}\n",
+		purple_debug_misc("msn", "AB passport:{%s} uid:{%s} display:{%s} alias: {%s} mobile:{%s} mobile number:{%s}\n",
 			passport, uid ? uid : "(null)", Name ? Name : "(null)", alias ? alias : "(null)",
 			mobile ? "true" : "false", mobile_number ? mobile_number : "(null)");
 
@@ -639,10 +639,10 @@
 		groupIds = xmlnode_get_child(contactInfo, "groupIds");
 		if (groupIds) {
 			for (guid = xmlnode_get_child(groupIds, "guid"); guid;
-							guid = xmlnode_get_next_twin(guid)){
+							guid = xmlnode_get_next_twin(guid)) {
 				char *group_id = xmlnode_get_data(guid);
 				msn_user_add_group_id(user, group_id);
-				purple_debug_misc("MsnAB", "guid:%s\n", group_id ? group_id : "(null)");
+				purple_debug_misc("msn", "AB guid:%s\n", group_id ? group_id : "(null)");
 				g_free(group_id);
 			}
 		} else {
@@ -653,7 +653,7 @@
 
 		msn_got_lst_user(session, user, MSN_LIST_FL_OP, NULL);
 
-		if(mobile && user)
+		if (mobile && user)
 		{
 			user->mobile = TRUE;
 			purple_prpl_got_user_status(session->account, user->passport, "mobile", NULL);
@@ -684,14 +684,14 @@
 
 		if ((faultnode = xmlnode_get_child(fault, "faultstring"))) {
 			gchar *faultstring = xmlnode_get_data(faultnode);
-			purple_debug_info("MSNAB","Faultstring: %s\n", faultstring);
+			purple_debug_info("msn", "AB Faultstring: %s\n", faultstring);
 			g_free(faultstring);
 		}
 
 		if ((faultnode = xmlnode_get_child(fault, "detail/errorcode"))) {
 			gchar *errorcode = xmlnode_get_data(faultnode);
 
-			purple_debug_info("MSNAB", "Error Code: %s\n", errorcode);
+			purple_debug_info("msn", "AB Error Code: %s\n", errorcode);
 
 			if (g_str_equal(errorcode, "ABDoesNotExist")) {
 				g_free(errorcode);
@@ -704,15 +704,15 @@
 	}
 
 	result = xmlnode_get_child(node, "Body/ABFindAllResponse/ABFindAllResult");
-	if(result == NULL){
-		purple_debug_misc("MSNAB","receive no address book update\n");
+	if (result == NULL) {
+		purple_debug_misc("msn", "Received no address book update\n");
 		return TRUE;
 	}
 
 	/* I don't see this "groups" tag documented on msnpiki, need to find out
 	   if they are really there, and update msnpiki */
 	/*Process Group List*/
-	groups = xmlnode_get_child(result,"groups");
+	groups = xmlnode_get_child(result, "groups");
 	if (groups != NULL) {
 		msn_parse_addressbook_groups(session, groups);
 	}
@@ -720,7 +720,7 @@
 	/*add a default No group to set up the no group Membership*/
 	msn_group_new(session->userlist, MSN_INDIVIDUALS_GROUP_ID,
 				  MSN_INDIVIDUALS_GROUP_NAME);
-	purple_debug_misc("MSNAB","group_id:%s name:%s\n",
+	purple_debug_misc("msn", "AB group_id:%s name:%s\n",
 					  MSN_INDIVIDUALS_GROUP_ID, MSN_INDIVIDUALS_GROUP_NAME);
 	if ((purple_find_group(MSN_INDIVIDUALS_GROUP_NAME)) == NULL){
 		PurpleGroup *g = purple_group_new(MSN_INDIVIDUALS_GROUP_NAME);
@@ -729,33 +729,33 @@
 
 	/*add a default No group to set up the no group Membership*/
 	msn_group_new(session->userlist, MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
-	purple_debug_misc("MSNAB","group_id:%s name:%s\n", MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
-	if ((purple_find_group(MSN_NON_IM_GROUP_NAME)) == NULL){
+	purple_debug_misc("msn", "AB group_id:%s name:%s\n", MSN_NON_IM_GROUP_ID, MSN_NON_IM_GROUP_NAME);
+	if ((purple_find_group(MSN_NON_IM_GROUP_NAME)) == NULL) {
 		PurpleGroup *g = purple_group_new(MSN_NON_IM_GROUP_NAME);
 		purple_blist_add_group(g, NULL);
 	}
 
 	/*Process contact List*/
-	purple_debug_info("MSNAB","process contact list...\n");
-	contacts =xmlnode_get_child(result,"contacts");
+	purple_debug_info("msn", "Process contact list...\n");
+	contacts = xmlnode_get_child(result, "contacts");
 	if (contacts != NULL) {
 		msn_parse_addressbook_contacts(session, contacts);
 	}
 
-	abNode =xmlnode_get_child(result,"ab");
-	if(abNode != NULL){
+	abNode = xmlnode_get_child(result, "ab");
+	if (abNode != NULL) {
 		xmlnode *node2;
 		char *tmp = NULL;
 
 		if ((node2 = xmlnode_get_child(abNode, "lastChange")))
 			tmp = xmlnode_get_data(node2);
-		purple_debug_info("MSNAB"," lastchanged Time:{%s}\n", tmp ? tmp : "(null)");
+		purple_debug_info("msn", "AB lastchanged Time:{%s}\n", tmp ? tmp : "(null)");
 		purple_account_set_string(session->account, "ablastChange", tmp);
 
 		g_free(tmp); tmp = NULL;
 		if ((node2 = xmlnode_get_child(abNode, "DynamicItemLastChanged")))
 			tmp = xmlnode_get_data(node2);
-		purple_debug_info("MsnAB"," DynamicItemLastChanged :{%s}\n", tmp ? tmp : "(null)");
+		purple_debug_info("msn", "AB DynamicItemLastChanged :{%s}\n", tmp ? tmp : "(null)");
 		purple_account_set_string(session->account, "DynamicItemLastChanged", tmp);
 		g_free(tmp);
 	}
@@ -773,7 +773,7 @@
 
 	g_return_if_fail(session != NULL);
 
-	purple_debug_misc("MSNAB", "Got the Address Book!\n");
+	purple_debug_misc("msn", "Got the Address Book!\n");
 
 	if (msn_parse_addressbook(session, resp->xml)) {
 		if (!session->logged_in) {
@@ -801,7 +801,7 @@
 {
 	char *body, *update_str = NULL;
 
-	purple_debug_misc("MSNAB","Getting Address Book\n");
+	purple_debug_misc("msn", "Getting Address Book\n");
 
 	/*build SOAP and POST it*/
 	if (dynamicItemLastChange != NULL)
@@ -866,7 +866,7 @@
 	char *faultcode_str;
 
 	if (resp == NULL) {
-		purple_debug_error("MSNCL",
+		purple_debug_error("msn",
 		                   "Operation {%s} failed. No response received from server.\n",
 		                   msn_contact_operation_str(state->action));
 		return;
@@ -885,7 +885,7 @@
 	faultcode_str = xmlnode_get_data(faultcode);
 
 	if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) {
-		purple_debug_info("MSNCL",
+		purple_debug_info("msn",
 		                  "Contact Operation {%s} failed because of bad token."
 		                  " Updating token now and retrying operation.\n",
 		                  msn_contact_operation_str(state->action));
@@ -898,7 +898,7 @@
 		/* We don't know how to respond to this faultcode, so just log it */
 		/* XXX: Probably should notify the user or undo the change or something? */
 		char *str = xmlnode_to_str(xmlnode_get_child(resp->xml, "Body/Fault"), NULL);
-		purple_debug_error("MSNCL", "Operation {%s} Failed, SOAP Fault was: %s\n",
+		purple_debug_error("msn", "Operation {%s} Failed, SOAP Fault was: %s\n",
 		                   msn_contact_operation_str(state->action), str);
 		g_free(str);
 		msn_callback_state_free(state);
@@ -937,7 +937,7 @@
 
 	userlist = session->userlist;
 
-	purple_debug_info("MSNCL","Contact added successfully\n");
+	purple_debug_info("msn", "Contact added successfully\n");
 
 	// the code this block is replacing didn't send ADL for yahoo contacts,
 	// but i haven't confirmed this is WLM's behaviour wrt yahoo contacts
@@ -971,7 +971,7 @@
 	contact_xml = g_strdup_printf(MSN_XML_ADD_CONTACT, escaped_displayname, passport);
 #endif
 
-	purple_debug_info("MSNCL","Adding contact %s to contact list\n", passport);
+	purple_debug_info("msn", "Adding contact %s to contact list\n", passport);
 
 	contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport);
 	body = g_strdup_printf(MSN_ADD_CONTACT_TEMPLATE, contact_xml);
@@ -999,9 +999,9 @@
 
 	if (msn_userlist_add_buddy_to_group(userlist, state->who,
 			state->new_group_name)) {
-		purple_debug_info("MSNCL", "Contact %s added to group %s successfully!\n", state->who, state->new_group_name);
+		purple_debug_info("msn", "Contact %s added to group %s successfully!\n", state->who, state->new_group_name);
 	} else {
-		purple_debug_info("MSNCL","Contact %s added to group %s successfully on server, but failed in the local list\n", state->who, state->new_group_name);
+		purple_debug_info("msn", "Contact %s added to group %s successfully on server, but failed in the local list\n", state->who, state->new_group_name);
 	}
 
 	if (state->action & MSN_ADD_BUDDY) {
@@ -1056,12 +1056,12 @@
 		return;
 	}
 
-	purple_debug_info("MSNCL", "Adding user %s to group %s\n", passport,
+	purple_debug_info("msn", "Adding user %s to group %s\n", passport,
 			  msn_userlist_find_group_name(userlist, groupId));
 
 	user = msn_userlist_find_user(userlist, passport);
 	if (user == NULL) {
-		purple_debug_warning("MSNCL", "Unable to retrieve user %s from the userlist!\n", passport);
+		purple_debug_warning("msn", "Unable to retrieve user %s from the userlist!\n", passport);
 		msn_callback_state_free(state);
 		return; /* guess this never happened! */
 	}
@@ -1092,7 +1092,7 @@
 	MsnUserList *userlist = state->session->userlist;
 	MsnUser *user = msn_userlist_find_user_with_id(userlist, state->uid);
 
-	purple_debug_info("MSNCL","Delete contact successful\n");
+	purple_debug_info("msn", "Delete contact successful\n");
 
 	if (user != NULL) {
 		msn_userlist_remove_user(userlist, user);
@@ -1114,7 +1114,7 @@
 	msn_callback_state_set_uid(state, contactId);
 
 	/* build SOAP request */
-	purple_debug_info("MSNCL","Deleting contact with contactId: %s\n", contactId);
+	purple_debug_info("msn", "Deleting contact with contactId: %s\n", contactId);
 	body = g_strdup_printf(MSN_DEL_CONTACT_TEMPLATE, contact_id_xml);
 
 	state->body = xmlnode_from_str(body, -1);
@@ -1135,9 +1135,9 @@
 
 	if (msn_userlist_rem_buddy_from_group(state->session->userlist,
 			state->who, state->old_group_name)) {
-		purple_debug_info("MSNCL", "Contact %s deleted successfully from group %s\n", state->who, state->old_group_name);
+		purple_debug_info("msn", "Contact %s deleted successfully from group %s\n", state->who, state->old_group_name);
 	} else {
-		purple_debug_info("MSNCL", "Contact %s deleted successfully from group %s in the server, but failed in the local list\n", state->who, state->old_group_name);
+		purple_debug_info("msn", "Contact %s deleted successfully from group %s in the server, but failed in the local list\n", state->who, state->old_group_name);
 	}
 }
 
@@ -1158,16 +1158,16 @@
 
 	groupId = msn_userlist_find_group_id(userlist, group_name);
 	if (groupId != NULL) {
-		purple_debug_info("MSNCL", "Deleting user %s from group %s\n", passport, group_name);
+		purple_debug_info("msn", "Deleting user %s from group %s\n", passport, group_name);
 	} else {
-		purple_debug_warning("MSNCL", "Unable to retrieve group id from group %s !\n", group_name);
+		purple_debug_warning("msn", "Unable to retrieve group id from group %s !\n", group_name);
 		return;
 	}
 
 	user = msn_userlist_find_user(userlist, passport);
 
 	if (user == NULL) {
-		purple_debug_warning("MSNCL", "Unable to retrieve user from passport %s!\n", passport);
+		purple_debug_warning("msn", "Unable to retrieve user from passport %s!\n", passport);
 		return;
 	}
 
@@ -1199,7 +1199,7 @@
 msn_update_contact_read_cb(MsnSoapMessage *req, MsnSoapMessage *resp,
 	gpointer data)
 {
-	purple_debug_info("MSN CL","Contact updated successfully\n");
+	purple_debug_info("msn", "Contact updated successfully\n");
 }
 
 /* Update a contact's info */
@@ -1211,9 +1211,9 @@
 	xmlnode *contact_info;
 	xmlnode *changes;
 
-	purple_debug_info("MSN CL","Update contact information with new %s: %s\n",
+	purple_debug_info("msn", "Update contact information with new %s: %s\n",
 		type==MSN_UPDATE_DISPLAY ? "display name" : "alias", value);
-	purple_debug_info("msncl", "passport=%s\n", passport);
+	purple_debug_info("msn", "passport=%s\n", passport);
 	g_return_if_fail(passport != NULL);
 	contact_info = xmlnode_new("contactInfo");
 	changes = xmlnode_new("propertiesChanged");
@@ -1277,7 +1277,7 @@
 	MsnCallbackState *state = data;
 	MsnSession *session = state->session;
 
-	purple_debug_info("MSN CL", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
+	purple_debug_info("msn", "Contact %s deleted successfully from %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
 
 	if (state->list_id == MSN_LIST_PL) {
 		MsnUser *user = msn_userlist_find_user(session->userlist, state->who);
@@ -1310,7 +1310,7 @@
 	g_return_if_fail(passport != NULL);
 	g_return_if_fail(list < 5);
 
-	purple_debug_info("MSN CL", "Deleting contact %s from %s list\n", passport, MsnMemberRole[list]);
+	purple_debug_info("msn", "Deleting contact %s from %s list\n", passport, MsnMemberRole[list]);
 
 	if (state == NULL) {
 		state = msn_callback_state_new(session);
@@ -1355,7 +1355,7 @@
 	g_return_if_fail(state != NULL);
 	g_return_if_fail(state->session != NULL);
 
-	purple_debug_info("MSN CL", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
+	purple_debug_info("msn", "Contact %s added successfully to %s list on server!\n", state->who, MsnMemberRole[state->list_id]);
 
 	if (state->list_id == MSN_LIST_RL) {
 		MsnUser *user = msn_userlist_find_user(state->session->userlist, state->who);
@@ -1385,7 +1385,7 @@
 	g_return_if_fail(passport != NULL);
 	g_return_if_fail(list < 5);
 
-	purple_debug_info("MSN CL", "Adding contact %s to %s list\n", passport, MsnMemberRole[list]);
+	purple_debug_info("msn", "Adding contact %s to %s list\n", passport, MsnMemberRole[list]);
 
 	if (state == NULL) {
 		state = msn_callback_state_new(session);
@@ -1415,7 +1415,7 @@
 static void
 msn_gleams_read_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data)
 {
-	purple_debug_info("MSNP14","Gleams read done\n");
+	purple_debug_info("msn", "Gleams read done\n");
 }
 
 /*get the gleams info*/
@@ -1424,7 +1424,7 @@
 {
 	MsnSoapReq *soap_request;
 
-	purple_debug_info("MSNP14","msn get gleams info...\n");
+	purple_debug_info("msn", "msn get gleams info...\n");
 
 	state = msn_callback_state_new(session);
 	state->body = xmlnode_from_str(MSN_GLEAMS_TEMPLATE, -1);
@@ -1447,7 +1447,7 @@
 	MsnSession *session;
 	MsnUserList *userlist;
 
-	purple_debug_info("MSNCL", "Group request successful.\n");
+	purple_debug_info("msn", "Group request successful.\n");
 
 	g_return_if_fail(state->session != NULL);
 	g_return_if_fail(state->session->userlist != NULL);
@@ -1472,7 +1472,7 @@
 			char *guid = xmlnode_get_data(guid_node);
 
 			/* create and add the new group to the userlist */
-			purple_debug_info("MSNCL", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid);
+			purple_debug_info("msn", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid);
 			msn_group_new(session->userlist, guid, state->new_group_name);
 
 			if (state->action & MSN_ADD_BUDDY) {
@@ -1488,7 +1488,7 @@
 			}
 			g_free(guid);
 		} else {
-			purple_debug_info("MSNCL", "Adding group %s failed\n",
+			purple_debug_info("msn", "Adding group %s failed\n",
 				state->new_group_name);
 		}
 	}
@@ -1513,7 +1513,7 @@
 	g_return_if_fail(session != NULL);
 	g_return_if_fail(group_name != NULL);
 
-	purple_debug_info("MSNCL","Adding group %s to contact list.\n", group_name);
+	purple_debug_info("msn", "Adding group %s to contact list.\n", group_name);
 
 	if (state == NULL) {
 		state = msn_callback_state_new(session);
@@ -1549,7 +1549,7 @@
 	g_return_if_fail(session != NULL);
 
 	g_return_if_fail(group_name != NULL);
-	purple_debug_info("MSNCL","Deleting group %s from contact list\n", group_name);
+	purple_debug_info("msn", "Deleting group %s from contact list\n", group_name);
 
 	guid = msn_userlist_find_group_id(session->userlist, group_name);
 
@@ -1557,7 +1557,7 @@
 	*  we need to delete nothing
 	*/
 	if (guid == NULL) {
-		purple_debug_info("MSNCL", "Group %s guid not found, returning.\n", group_name);
+		purple_debug_info("msn", "Group %s guid not found, returning.\n", group_name);
 		return;
 	}
 
@@ -1595,7 +1595,7 @@
 	g_return_if_fail(old_group_name != NULL);
 	g_return_if_fail(new_group_name != NULL);
 
-	purple_debug_info("MSN CL", "Renaming group %s to %s.\n", old_group_name, new_group_name);
+	purple_debug_info("msn", "Renaming group %s to %s.\n", old_group_name, new_group_name);
 
 	guid = msn_userlist_find_group_id(session->userlist, old_group_name);
 	if (guid == NULL)
--- a/libpurple/protocols/msn/msn.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/msn.c	Sat Jul 12 04:42:24 2008 +0000
@@ -1102,7 +1102,7 @@
 	char *msgtext;
 	const char *username;
 
-	purple_debug_info("MSNP14","send IM {%s} to %s\n",message,who);
+	purple_debug_info("msn", "send IM {%s} to %s\n",message,who);
 	account = purple_connection_get_account(gc);
 	username = purple_account_get_username(account);
 
@@ -1141,7 +1141,7 @@
 		g_free(msgformat);
 		g_free(msgtext);
 
-		purple_debug_info("MSNP14","prepare to send online Message\n");
+		purple_debug_info("msn", "prepare to send online Message\n");
 		if (g_ascii_strcasecmp(who, username))
 		{
 			MsnEmoticon *smile;
@@ -1150,10 +1150,10 @@
 
 			if(msn_user_is_yahoo(account,who)){
 				/*we send the online and offline Message to Yahoo User via UBM*/
-				purple_debug_info("MSNP14","send to Yahoo User\n");
+				purple_debug_info("msn", "send to Yahoo User\n");
 				uum_send_msg(session,msg);
 			}else{
-				purple_debug_info("MSNP14","send via switchboard\n");
+				purple_debug_info("msn", "send via switchboard\n");
 				swboard = msn_session_get_swboard(session, who, MSN_SB_FLAG_IM);
 				smileys = msn_msg_grab_emoticons(message, username);
 				while (smileys) {
@@ -1206,7 +1206,7 @@
 		/*send Offline Instant Message,only to MSN Passport User*/
 		char *friendname;
 
-		purple_debug_info("MSNP14","prepare to send offline Message\n");
+		purple_debug_info("msn", "prepare to send offline Message\n");
 
 		friendname = msn_encode_mime(account->username);
 		msn_oim_prep_send_msg_info(session->oim,
@@ -1356,7 +1356,7 @@
 	userlist = session->userlist;
 	who = msn_normalize(gc->account, buddy->name);
 
-	purple_debug_info("MSN","Add user:%s to group:%s\n", who, (group && group->name) ? group->name : "(null)");
+	purple_debug_info("msn", "Add user:%s to group:%s\n", who, (group && group->name) ? group->name : "(null)");
 	if (!session->logged_in)
 	{
 #if 0
@@ -1736,12 +1736,12 @@
 	session = gc->proto_data;
 	cmdproc = session->notification->cmdproc;
 
-	purple_debug_info("MSN", "Remove group %s\n", group->name);
+	purple_debug_info("msn", "Remove group %s\n", group->name);
 	/*we can't delete the default group*/
 	if(!strcmp(group->name, MSN_INDIVIDUALS_GROUP_NAME)||
 		!strcmp(group->name, MSN_NON_IM_GROUP_NAME))
 	{
-		purple_debug_info("MSN", "This group can't be removed, returning.\n");
+		purple_debug_info("msn", "This group can't be removed, returning.\n");
 		return ;
 	}
 
@@ -2241,7 +2241,7 @@
 #if PHOTO_SUPPORT
 	/* Find the URL to the photo; must be before the marshalling [Bug 994207] */
 	photo_url_text = msn_get_photo_url(url_text);
-	purple_debug_info("MSNP14","photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)");
+	purple_debug_info("msn", "photo url:{%s}\n", photo_url_text ? photo_url_text : "(null)");
 
 	/* Marshall the existing state */
 	info2_data = g_new0(MsnGetInfoStepTwoData, 1);
--- a/libpurple/protocols/msn/msnutils.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/msnutils.c	Sat Jul 12 04:42:24 2008 +0000
@@ -487,7 +487,7 @@
 	struct tm ctime;
 	time_t ts;
 
-	purple_debug_info("MSNP14","convert string is{%s}\n",timestr);
+	purple_debug_info("msn", "convert string is{%s}\n", timestr);
 	tzset();
 	/*copy string first*/
 	memset(temp, 0, sizeof(temp));
--- a/libpurple/protocols/msn/nexus.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/nexus.c	Sat Jul 12 04:42:24 2008 +0000
@@ -291,7 +291,7 @@
 		FALSE, NULL, NULL, NULL);
 	g_free(expiry_str);
 
-	purple_debug_info("msnp15", "Updated ticket for domain '%s', expires at %" G_GINT64_FORMAT ".\n",
+	purple_debug_info("msn", "Updated ticket for domain '%s', expires at %" G_GINT64_FORMAT ".\n",
 	                  ticket_domains[id][SSO_VALID_TICKET_DOMAIN],
 	                  (gint64)nexus->tokens[id].expiry);
 	return TRUE;
@@ -372,13 +372,13 @@
 
 	MsnSoapMessage *soap;
 
-	purple_debug_info("MSN Nexus","Starting Windows Live ID authentication\n");
+	purple_debug_info("msn", "Starting Windows Live ID authentication\n");
 	msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
 
 	username = purple_account_get_username(session->account);
 	password = g_strndup(purple_connection_get_password(session->account->gc), 16);
 
-	purple_debug_info("msnp15", "Logging on %s, with policy '%s', nonce '%s'\n",
+	purple_debug_info("msn", "Logging on %s, with policy '%s', nonce '%s'\n",
 	                  username, nexus->policy, nexus->nonce);
 
 	domains = g_string_new(NULL);
@@ -418,7 +418,7 @@
 #endif
 	char *decrypted_data;
 
-	purple_debug_info("msnp15", "Got Update Response for %s.\n", ticket_domains[ud->id][SSO_VALID_TICKET_DOMAIN]);
+	purple_debug_info("msn", "Got Update Response for %s.\n", ticket_domains[ud->id][SSO_VALID_TICKET_DOMAIN]);
 
 	enckey = xmlnode_get_child(resp->xml, "Header/Security/DerivedKeyToken");
 	while (enckey) {
@@ -427,7 +427,7 @@
 		enckey = xmlnode_get_next_twin(enckey);
 	}
 	if (!enckey) {
-		purple_debug_info("msnp15", "Invalid Response.\n");
+		purple_debug_error("msn", "Invalid response in token update.\n");
 		return;
 	}
 
@@ -444,7 +444,7 @@
 	if (tmp) {
 		decrypted_pp = des3_cbc(key, iv, tmp, len, TRUE);
 		g_free(tmp);
-		purple_debug_info("msnp15", "Got Response Header EncryptedPP: %s\n", decrypted_pp);
+		purple_debug_info("msn", "Got Response Header EncryptedPP: %s\n", decrypted_pp);
 		g_free(decrypted_pp);
 	}
 #endif
@@ -460,7 +460,7 @@
 
 		decrypted_data = des3_cbc(key, iv, unescaped, len, TRUE);
 		g_free(unescaped);
-		purple_debug_info("msnp15", "Got Response Body EncryptedData: %s\n", decrypted_data);
+		purple_debug_info("msn", "Got Response Body EncryptedData: %s\n", decrypted_data);
 
 		rstresponse = xmlnode_from_str(decrypted_data, -1);
 		if (g_str_equal(rstresponse->name, "RequestSecurityTokenResponse"))
@@ -507,7 +507,7 @@
 	char *request;
 	MsnSoapMessage *soap;
 
-	purple_debug_info("msnp15",
+	purple_debug_info("msn",
 	                  "Updating ticket for user '%s' on domain '%s'\n",
 	                  purple_account_get_username(session->account),
 	                  ticket_domains[id][SSO_VALID_TICKET_DOMAIN]);
--- a/libpurple/protocols/msn/notification.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/notification.c	Sat Jul 12 04:42:24 2008 +0000
@@ -375,7 +375,7 @@
 static void
 msg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Processing MSG... \n");
+	purple_debug_info("msn", "Processing MSG... \n");
 
 	/* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued
 	 * command and we are processing it */
@@ -387,7 +387,7 @@
 		g_return_if_fail(cmd->payload_cb != NULL);
 
 #if 0 /* glib on win32 doesn't correctly support precision modifiers for a string */
-		purple_debug_info("MSNP14", "MSG payload:{%.*s}\n", cmd->payload_len, cmd->payload);
+		purple_debug_info("msn", "MSG payload:{%.*s}\n", cmd->payload_len, cmd->payload);
 #endif
 		cmd->payload_cb(cmdproc, cmd, cmd->payload, cmd->payload_len);
 	}
@@ -406,7 +406,7 @@
 	cmdproc = session->notification->cmdproc;
 	g_return_if_fail(msg     != NULL);
 	payload = msn_message_gen_payload(msg, &payload_len);
-	purple_debug_info("MSNP14",
+	purple_debug_info("msn",
 		"send UUM, payload{%s}, strlen:%" G_GSIZE_FORMAT ", len:%" G_GSIZE_FORMAT "\n",
 		payload, strlen(payload), payload_len);
 	type = msg->type;
@@ -426,7 +426,7 @@
 	const char *passport;
 	const char *content_type;
 
-	purple_debug_info("MSNP14","Process UBM payload:%.*s\n", (guint)len, payload);
+	purple_debug_info("msn", "Process UBM payload:%.*s\n", (guint)len, payload);
 	msg = msn_message_new_from_cmd(cmdproc->session, cmd);
 
 	msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM);
@@ -438,7 +438,7 @@
 	passport = msg->remote_user;
 
 	content_type = msn_message_get_content_type(msg);
-	purple_debug_info("MSNP14", "type:%s\n", content_type);
+	purple_debug_info("msn", "type:%s\n", content_type);
 	if(!strcmp(content_type,"text/plain")){
 		const char *value;
 		const char *body;
@@ -496,7 +496,7 @@
 static void
 ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Processing UBM... \n");
+	purple_debug_info("msn", "Processing UBM... \n");
 
 	/* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued
 	 * command and we are processing it */
@@ -506,7 +506,7 @@
 	} else {
 		g_return_if_fail(cmd->payload_cb != NULL);
 
-		purple_debug_info("MSNP14", "UBM payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload);
+		purple_debug_info("msn", "UBM payload:{%.*s}\n", (guint)(cmd->payload_len), cmd->payload);
 		msg_cmd_post(cmdproc, cmd, cmd->payload, cmd->payload_len);
 	}
 }
@@ -543,7 +543,7 @@
 
 	g_return_if_fail(passport != NULL);
 
-	purple_debug_info("MSNP14","Passport: %s, type: %d\n", passport, networkId);
+	purple_debug_info("msn", "Passport: %s, type: %d\n", passport, networkId);
 	tokens = g_strsplit(passport, "@", 2);
 	email = tokens[0];
 	domain = tokens[1];
@@ -577,7 +577,7 @@
 	c_node = xmlnode_new("c");
 	xmlnode_set_attrib(c_node, "n", email);
 
-	purple_debug_info("MSNP14", "list_op: %d\n", list_op);
+	purple_debug_info("msn", "list_op: %d\n", list_op);
 	g_snprintf(fmt_str, sizeof(fmt_str), "%d", list_op);
 	xmlnode_set_attrib(c_node, "l", fmt_str);
 
@@ -601,7 +601,7 @@
 msn_notification_post_adl(MsnCmdProc *cmdproc, const char *payload, int payload_len)
 {
 	MsnTransaction *trans;
-	purple_debug_info("MSN Notification","Sending ADL with payload: %s\n", payload);
+	purple_debug_info("msn", "Sending ADL with payload: %s\n", payload);
 	trans = msn_transaction_new(cmdproc, "ADL", "%i", payload_len);
 	msn_transaction_set_payload(trans, payload, payload_len);
 	msn_cmdproc_send_trans(cmdproc, trans);
@@ -705,14 +705,14 @@
 {
 	xmlnode *root, *domain_node;
 
-	purple_debug_misc("MSN Notification", "Parsing received ADL XML data\n");
+	purple_debug_misc("msn", "Parsing received ADL XML data\n");
 
 	g_return_if_fail(payload != NULL);
 
 	root = xmlnode_from_str(payload, (gssize) len);
 
 	if (root == NULL) {
-		purple_debug_info("MSN Notification", "Invalid XML!\n");
+		purple_debug_info("msn", "Invalid XML in ADL!\n");
 		return;
 	}
 	for (domain_node = xmlnode_get_child(root, "d"); domain_node; domain_node = xmlnode_get_next_twin(domain_node)) {
@@ -790,7 +790,7 @@
 	account = session->account;
 	gc = purple_account_get_connection(account);
 
-	purple_debug_error("msn","ADL error\n");
+	purple_debug_error("msn", "ADL error\n");
 	reason = g_strdup_printf(_("Unknown error (%d)"), error);
 	purple_notify_error(gc, NULL, _("Unable to add user"), reason);
 	g_free(reason);
@@ -800,7 +800,7 @@
 fqy_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload,
 			 size_t len)
 {
-	purple_debug_info("MSN Notification","FQY payload:\n%s\n", payload);
+	purple_debug_info("msn", "FQY payload:\n%s\n", payload);
 	g_return_if_fail(cmdproc->session != NULL);
 //	msn_notification_post_adl(cmdproc, payload, len);
 //	msn_get_address_book(cmdproc->session, MSN_AB_SAVE_CONTACT, NULL, NULL);
@@ -809,7 +809,7 @@
 static void
 fqy_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Process FQY\n");
+	purple_debug_info("msn", "Process FQY\n");
 	cmdproc->last_cmd->payload_cb = fqy_cmd_post;
 	cmd->payload_len = atoi(cmd->params[1]);
 }
@@ -825,7 +825,7 @@
 static void
 rml_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Process RML\n");
+	purple_debug_info("msn", "Process RML\n");
 	cmd->payload_len = atoi(cmd->params[1]);
 	cmdproc->last_cmd->payload_cb = rml_cmd_post;
 }
@@ -1599,7 +1599,7 @@
 
 	if ( (root = xmlnode_from_str(cmd->payload, cmd->payload_len)) == NULL)
 	{
-		purple_debug_error("MSN","Unable to parse GCF payload into a XML tree");
+		purple_debug_error("msn", "Unable to parse GCF payload into a XML tree");
 		return;
 	}
 
@@ -1635,7 +1635,7 @@
 static void
 gcf_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Processing GCF command\n");
+	purple_debug_info("msn", "Processing GCF command\n");
 
 	cmdproc->last_cmd->payload_cb  = gcf_cmd_post;
 	cmd->payload_len = atoi(cmd->params[1]);
@@ -1644,7 +1644,7 @@
 static void
 sbs_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_info("MSNP14","Processing SBS... \n");
+	purple_debug_info("msn", "Processing SBS... \n");
 	if(cmd->payload_len == 0){
 		return;
 	}
@@ -1693,7 +1693,7 @@
 static void
 ubx_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_misc("MSNP14","UBX received.\n");
+	purple_debug_misc("msn", "UBX received.\n");
 	cmdproc->last_cmd->payload_cb  = ubx_cmd_post;
 	cmd->payload_len = atoi(cmd->params[2]);
 }
@@ -1909,7 +1909,7 @@
 static void
 delete_oim_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
 {
-	purple_debug_misc("MSN Notification","Delete OIM message.\n");
+	purple_debug_misc("msn", "Delete OIM message.\n");
 }
 
 static void
@@ -2059,7 +2059,7 @@
 	payload = xmlnode_to_str(rml_node, &payload_len);
 	xmlnode_free(rml_node);
 
-	purple_debug_info("MSN Notification","Send RML with payload:\n%s\n", payload);
+	purple_debug_info("msn", "Send RML with payload:\n%s\n", payload);
 	trans = msn_transaction_new(cmdproc, "RML","%" G_GSIZE_FORMAT, strlen(payload));
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
--- a/libpurple/protocols/msn/oim.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/oim.c	Sat Jul 12 04:42:24 2008 +0000
@@ -73,7 +73,7 @@
 {
 	MsnOimSendReq *request;
 
-	purple_debug_info("OIM", "destroy the OIM %p\n", oim);
+	purple_debug_info("msn", "destroy the OIM %p\n", oim);
 	g_free(oim->run_id);
 	g_free(oim->challenge);
 
@@ -146,7 +146,7 @@
 		gchar *faultcode_str = xmlnode_get_data(faultcode);
 
 		if (faultcode_str && g_str_equal(faultcode_str, "q0:BadContextToken")) {
-			purple_debug_error("msnp15", "OIM Request Error, Updating token now.");
+			purple_debug_warning("msn", "OIM Request Error, Updating token now.");
 			msn_nexus_update_token(data->oim->session->nexus,
 				data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
 				(GSourceFunc)msn_oim_request_helper, data);
@@ -155,7 +155,7 @@
 
 		} else if (faultcode_str && g_str_equal(faultcode_str, "q0:AuthenticationFailed")) {
 			if (xmlnode_get_child(fault, "detail/RequiredAuthPolicy") != NULL) {
-				purple_debug_error("msnp15", "OIM Request Error, Updating token now.");
+				purple_debug_warning("msn", "OIM Request Error, Updating token now.");
 				msn_nexus_update_token(data->oim->session->nexus,
 					data->send ? MSN_AUTH_LIVE_SECURE : MSN_AUTH_MESSENGER_WEB,
 					(GSourceFunc)msn_oim_request_helper, data);
@@ -272,9 +272,9 @@
 {
 	char *oim_body,*oim_base64;
 
-	purple_debug_info("MSN OIM","encode OIM Message...\n");
+	purple_debug_info("msn", "encode OIM Message...\n");
 	oim_base64 = purple_base64_encode((const guchar *)body, strlen(body));
-	purple_debug_info("MSN OIM","encoded base64 body:{%s}\n",oim_base64);
+	purple_debug_info("msn", "encoded base64 body:{%s}\n", oim_base64);
 	oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE,
 				oim->run_id,oim->send_seq,oim_base64);
 	g_free(oim_base64);
@@ -296,13 +296,13 @@
 	g_return_if_fail(msg != NULL);
 
 	if (response == NULL) {
-		purple_debug_info("MSNP14", "cannot send OIM: %s\n", msg->oim_msg);
+		purple_debug_info("msn", "cannot send OIM: %s\n", msg->oim_msg);
 	} else {
 		xmlnode	*faultNode = xmlnode_get_child(response->xml, "Body/Fault");
 
 		if (faultNode == NULL) {
 			/*Send OK! return*/
-			purple_debug_info("MSNP14", "sent OIM: %s\n", msg->oim_msg);
+			purple_debug_info("msn", "sent OIM: %s\n", msg->oim_msg);
 		} else {
 			xmlnode *faultcode = xmlnode_get_child(faultNode, "faultcode");
 
@@ -318,13 +318,13 @@
 							g_free(oim->challenge);
 							oim->challenge = NULL;
 
-							purple_debug_info("msnoim","resending OIM: %s\n",
+							purple_debug_info("msn", "Resending OIM: %s\n",
 								msg->oim_msg);
 							g_queue_push_head(oim->send_queue, msg);
 							msn_oim_send_msg(oim);
 						} else {
-							purple_debug_info("msnoim",
-								"can't find lock key for OIM: %s\n",
+							purple_debug_info("msn",
+								"Can't find lock key for OIM: %s\n",
 								msg->oim_msg);
 						}
 					} else {
@@ -336,10 +336,10 @@
 						g_free(oim->challenge);
 						oim->challenge = g_strndup(buf, sizeof(buf));
 						g_free(challenge);
-						purple_debug_info("MSNP14","lockkey:{%s}\n",oim->challenge);
+						purple_debug_info("msn", "Found lockkey:{%s}\n", oim->challenge);
 
 						/*repost the send*/
-						purple_debug_info("MSNP14","resending OIM: %s\n", msg->oim_msg);
+						purple_debug_info("msn", "Resending OIM: %s\n", msg->oim_msg);
 						g_queue_push_head(oim->send_queue, msg);
 						msn_oim_send_msg(oim);
 					}
@@ -400,13 +400,13 @@
 	oim_request = g_queue_peek_head(oim->send_queue);
 	g_return_if_fail(oim_request != NULL);
 
-	purple_debug_info("MSNP14","sending OIM: %s\n", oim_request->oim_msg);
+	purple_debug_info("msn", "Sending OIM: %s\n", oim_request->oim_msg);
 
 	/* if we got the challenge lock key, we compute it
 	 * else we go for the SOAP fault and resend it.
 	 */
-	if(oim->challenge == NULL){
-		purple_debug_info("MSNP14","no lock key challenge, wait for SOAP Fault and Resend\n");
+	if (oim->challenge == NULL){
+		purple_debug_info("msn", "No lock key challenge, waiting for SOAP Fault and Resend\n");
 	}
 
 	msg_body = msn_oim_msg_to_str(oim, oim_request->oim_msg);
@@ -442,12 +442,12 @@
 	MsnOimRecvData *rdata = data;
 
 	if (response && xmlnode_get_child(response->xml, "Body/Fault") == NULL) {
-		purple_debug_info("msnoim", "delete OIM success\n");
+		purple_debug_info("msn", "Delete OIM success\n");
 		rdata->oim->oim_list = g_list_remove(rdata->oim->oim_list,
 			rdata->msg_id);
 		g_free(rdata->msg_id);
 	} else {
-		purple_debug_info("msnoim", "delete OIM failed\n");
+		purple_debug_info("msn", "Delete OIM failed\n");
 	}
 
 	g_free(rdata);
@@ -461,7 +461,7 @@
 	char *msgid = rdata->msg_id;
 	char *soap_body;
 
-	purple_debug_info("MSNP14","Delete single OIM Message {%s}\n",msgid);
+	purple_debug_info("msn", "Delete single OIM Message {%s}\n",msgid);
 
 	soap_body = g_strdup_printf(MSN_OIM_DEL_TEMPLATE, msgid);
 
@@ -540,7 +540,7 @@
 		}
 	}
 
-	purple_debug_info("MSNP14:OIM", "Can't parse timestamp %s\n", timestamp);
+	purple_debug_info("msn", "Can't parse timestamp %s\n", timestamp);
 	return tval;
 }
 
@@ -561,30 +561,30 @@
 
 	msn_message_parse_payload(message, msg_str, strlen(msg_str),
 							  MSG_OIM_LINE_DEM, MSG_OIM_BODY_DEM);
-	purple_debug_info("MSNP14","oim body:{%s}\n",message->body);
+	purple_debug_info("msn", "oim body:{%s}\n", message->body);
 	decode_msg = (char *)purple_base64_decode(message->body,&body_len);
 	date =	(char *)g_hash_table_lookup(message->attr_table, "Date");
 	from =	(char *)g_hash_table_lookup(message->attr_table, "From");
-	if(strstr(from," ")){
+	if (strstr(from," ")) {
 		has_nick = 1;
 	}
-	if(has_nick){
+	if (has_nick) {
 		tokens = g_strsplit(from , " " , 2);
 		passport_str = g_strdup(tokens[1]);
-		purple_debug_info("MSNP14","oim Date:{%s},nickname:{%s},tokens[1]:{%s} passport{%s}\n",
-							date,tokens[0],tokens[1],passport_str);
+		purple_debug_info("msn", "oim Date:{%s},nickname:{%s},tokens[1]:{%s} passport{%s}\n",
+							date, tokens[0], tokens[1], passport_str);
 		g_strfreev(tokens);
-	}else{
+	} else {
 		passport_str = g_strdup(from);
-		purple_debug_info("MSNP14","oim Date:{%s},passport{%s}\n",
-					date,passport_str);
+		purple_debug_info("msn", "oim Date:{%s},passport{%s}\n",
+					date, passport_str);
 	}
 	start = strstr(passport_str,"<");
 	start += 1;
 	end = strstr(passport_str,">");
 	passport = g_strndup(start,end - start);
 	g_free(passport_str);
-	purple_debug_info("MSN OIM","oim Date:{%s},passport{%s}\n",date,passport);
+	purple_debug_info("msn", "oim Date:{%s},passport{%s}\n", date, passport);
 
 	stamp = msn_oim_parse_timestamp(date);
 
@@ -619,11 +619,11 @@
 			g_free(msg_str);
 		} else {
 			char *str = xmlnode_to_str(response->xml, NULL);
-			purple_debug_info("msnoim", "Unknown response: %s\n", str);
+			purple_debug_info("msn", "Unknown OIM response: %s\n", str);
 			g_free(str);
 		}
 	} else {
-		purple_debug_info("msnoim", "Failed to get OIM\n");
+		purple_debug_info("msn", "Failed to get OIM\n");
 	}
 }
 
@@ -635,7 +635,7 @@
 {
 	xmlnode *node;
 
-	purple_debug_info("MSNP14:OIM", "%s\n", xmlmsg);
+	purple_debug_info("msn", "%s\n", xmlmsg);
 
 	if (!strcmp(xmlmsg, "too-large")) {
 		/* Too many OIM's to send via NS, so we need to request them via SOAP. */
@@ -658,7 +658,7 @@
 
 	if (strcmp(node->name, "MD") != 0) {
 		char *xmlmsg = xmlnode_to_str(node, NULL);
-		purple_debug_info("msnoim", "WTF is this? %s\n", xmlmsg);
+		purple_debug_info("msn", "WTF is this? %s\n", xmlmsg);
 		g_free(xmlmsg);
 		return;
 	}
@@ -697,7 +697,7 @@
 		if (rt_node != NULL) {
 			rtime = xmlnode_get_data(rt_node);
 		}
-/*		purple_debug_info("msnoim","E:{%s},I:{%s},rTime:{%s}\n",passport,msgid,rTime); */
+/*		purple_debug_info("msn", "E:{%s},I:{%s},rTime:{%s}\n",passport,msgid,rTime); */
 
 		if (!g_list_find_custom(oim->oim_list, msgid, (GCompareFunc)strcmp)) {
 			oim->oim_list = g_list_append(oim->oim_list, msgid);
@@ -719,7 +719,7 @@
 	char *soap_body;
 	MsnOimRecvData *data = g_new0(MsnOimRecvData, 1);
 
-	purple_debug_info("MSNP14","Get single OIM Message\n");
+	purple_debug_info("msn", "Get single OIM Message\n");
 
 	data->oim = oim;
 	data->msg_id = msgid;
--- a/libpurple/protocols/msn/state.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/state.c	Sat Jul 12 04:42:24 2008 +0000
@@ -151,15 +151,15 @@
 	xmlnode *payloadNode, *currentmediaNode;
 	char *currentmedia;
 
-	purple_debug_info("msn","msn get CurrentMedia\n");
+	purple_debug_info("msn", "Get CurrentMedia\n");
 	payloadNode = xmlnode_from_str(xml_str, len);
-	if (!payloadNode){
-		purple_debug_error("msn","PSM XML parse Error!\n");
+	if (!payloadNode) {
+		purple_debug_error("msn", "PSM XML parse Error!\n");
 		return NULL;
 	}
 	currentmediaNode = xmlnode_get_child(payloadNode, "CurrentMedia");
-	if (currentmediaNode == NULL){
-		purple_debug_info("msn","No CurrentMedia Node");
+	if (currentmediaNode == NULL) {
+		purple_debug_info("msn", "No CurrentMedia Node");
 		xmlnode_free(payloadNode);
 		return NULL;
 	}
@@ -177,15 +177,15 @@
 	xmlnode *payloadNode, *psmNode;
 	char *psm;
 
-	purple_debug_info("MSNP14","msn get PSM\n");
+	purple_debug_info("msn", "msn get PSM\n");
 	payloadNode = xmlnode_from_str(xml_str, len);
 	if (!payloadNode){
-		purple_debug_error("MSNP14","PSM XML parse Error!\n");
+		purple_debug_error("msn", "PSM XML parse Error!\n");
 		return NULL;
 	}
 	psmNode = xmlnode_get_child(payloadNode, "PSM");
 	if (psmNode == NULL){
-		purple_debug_info("MSNP14","No PSM status Node");
+		purple_debug_info("msn", "No PSM status Node");
 		xmlnode_free(payloadNode);
 		return NULL;
 	}
@@ -249,7 +249,7 @@
 	session->psm = msn_build_psm(statusline_stripped, media, NULL);
 
 	payload = session->psm;
-	purple_debug_misc("MSNP14","Sending UUX command with payload: %s\n",payload);
+	purple_debug_misc("msn", "Sending UUX command with payload: %s\n", payload);
 	trans = msn_transaction_new(cmdproc, "UUX", "%" G_GSIZE_FORMAT, strlen(payload));
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
--- a/libpurple/protocols/msn/switchboard.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Sat Jul 12 04:42:24 2008 +0000
@@ -338,7 +338,7 @@
 {
 	g_return_if_fail(swboard != NULL);
 
-	purple_debug_warning("msg", "Error: Unable to call the user %s for reason %i\n",
+	purple_debug_warning("msn", "Error: Unable to call the user %s for reason %i\n",
 					   passport ? passport : "(null)", reason);
 
 	/* TODO: if current_users > 0, this is probably a chat and an invite failed,
@@ -540,7 +540,7 @@
 	payload = msn_message_gen_payload(msg, &payload_len);
 
 #ifdef MSN_DEBUG_SB
-	purple_debug_info("MSNP14","SB length:{%d}",payload_len);
+	purple_debug_info("msn", "SB length:{%d}", payload_len);
 	msn_message_show_readable(msg, "SB SEND", FALSE);
 #endif
 
@@ -628,7 +628,7 @@
 	g_return_if_fail(swboard != NULL);
 	g_return_if_fail(msg     != NULL);
 
-	purple_debug_info("MSNP14","switchboard send msg..\n");
+	purple_debug_info("msn", "switchboard send msg..\n");
 	if (msn_switchboard_can_send(swboard))
 		release_msg(swboard, msg);
 	else if (queue)
@@ -662,7 +662,7 @@
 	g_return_if_fail(swboard != NULL);
 
 	if (!(swboard->flag & MSN_SB_FLAG_IM) && (swboard->conv != NULL))
-		purple_debug_error("msn_switchboard", "bye_cmd: helper bug\n");
+		purple_debug_error("msn", "bye_cmd: helper bug\n");
 
 	if (swboard->conv == NULL)
 	{
@@ -759,7 +759,7 @@
 static void
 ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	purple_debug_misc("MSNP14","get UBM...\n");
+	purple_debug_misc("msn", "get UBM...\n");
 	cmd->payload_len = atoi(cmd->params[4]);
 	cmdproc->last_cmd->payload_cb = msg_cmd_post;
 }
@@ -1139,7 +1139,7 @@
 	purple_debug_warning("msn", "cal_error: command %s gave error %i\n", trans->command, error);
 
 	while ((msg = g_queue_pop_head(swboard->msg_queue)) != NULL){
-		purple_debug_warning("MSNP14", "Unable to send msg: {%s}\n", msg->body);
+		purple_debug_warning("msn", "Unable to send msg: {%s}\n", msg->body);
 		/* The messages could not be sent due to a switchboard error */
 		swboard->error = MSN_SB_ERROR_USER_OFFLINE;
 		msg_error_helper(swboard->cmdproc, msg,
@@ -1189,7 +1189,7 @@
 		/* The conversation window was closed. */
 		return;
 
-	purple_debug_info("MSNP14","Switchboard:auth:{%s} socket:{%s}\n",cmd->params[4],cmd->params[2]);
+	purple_debug_info("msn", "Switchboard:auth:{%s} socket:{%s}\n", cmd->params[4], cmd->params[2]);
 	msn_switchboard_set_auth_key(swboard, cmd->params[4]);
 
 	msn_parse_socket(cmd->params[2], &host, &port);
--- a/libpurple/protocols/msn/user.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/user.c	Sat Jul 12 04:42:24 2008 +0000
@@ -257,7 +257,7 @@
 
 	group_name = msn_userlist_find_group_name(userlist, group_id);
 
-	purple_debug_info("User","group id:%s,name:%s,user:%s\n", group_id, group_name, passport);
+	purple_debug_info("msn", "User: group id:%s,name:%s,user:%s\n", group_id, group_name, passport);
 
 	g = purple_find_group(group_name);
 
--- a/libpurple/protocols/msn/userlist.c	Wed Jul 09 04:39:02 2008 +0000
+++ b/libpurple/protocols/msn/userlist.c	Sat Jul 12 04:42:24 2008 +0000
@@ -44,7 +44,7 @@
 {
 	MsnPermitAdd *pa = data;
 
-	purple_debug_misc("MSN Userlist", "Accepted the new buddy: %s\n", pa->who);
+	purple_debug_misc("msn", "Accepted the new buddy: %s\n", pa->who);
 
 	if (PURPLE_CONNECTION_IS_VALID(pa->gc))
 	{
@@ -66,7 +66,7 @@
 {
 	MsnPermitAdd *pa = data;
 
-	purple_debug_misc("MSN Userlist", "Denied the new buddy: %s\n", pa->who);
+	purple_debug_misc("msn", "Denied the new buddy: %s\n", pa->who);
 
 	if (PURPLE_CONNECTION_IS_VALID(pa->gc))
 	{
@@ -196,7 +196,7 @@
 	const char *passport;
 	const char *friendly;
 
-	purple_debug_info("MSNP14","got add user...\n");
+	purple_debug_info("msn", "got add user...\n");
 	account = session->account;
 
 	passport = msn_user_get_passport(user);
@@ -484,11 +484,9 @@
 	{
 		MsnUser *user = (MsnUser *)l->data;
 
-//		purple_debug_info("MsnUserList","user passport:%s,passport:%s\n",user->passport,passport);
 		g_return_val_if_fail(user->passport != NULL, NULL);
 
 		if (!g_strcasecmp(passport, user->passport)){
-//			purple_debug_info("MsnUserList","return:%p\n",user);
 			return user;
 		}
 	}
@@ -675,7 +673,7 @@
 
 	if ( !msn_userlist_user_is_in_list(user, list_id)) {
 		list = lists[list_id];
-		purple_debug_info("MSN Userlist", "User %s is not in list %s, not removing.\n", who, list);
+		purple_debug_info("msn", "User %s is not in list %s, not removing.\n", who, list);
 		return;
 	}
 
@@ -697,7 +695,7 @@
 	g_return_if_fail(userlist != NULL);
 	g_return_if_fail(userlist->session != NULL);
 
-	purple_debug_info("MSN Userlist", "Add user: %s to group: %s\n", who, new_group_name);
+	purple_debug_info("msn", "Add user: %s to group: %s\n", who, new_group_name);
 
 	if (!purple_email_is_valid(who))
 	{
@@ -723,7 +721,7 @@
 	if (group_id == NULL)
 	{
 		/* Whoa, we must add that group first. */
-		purple_debug_info("MSN Userlist", "Adding user %s to a new group, creating group %s first\n", who, new_group_name);
+		purple_debug_info("msn", "Adding user %s to a new group, creating group %s first\n", who, new_group_name);
 
 		msn_callback_state_set_action(state, MSN_ADD_BUDDY);
 
@@ -741,18 +739,18 @@
 
 	if ( msn_userlist_user_is_in_list(user, MSN_LIST_FL) ) {
 
-		purple_debug_info("MSN Userlist", "User %s already exists\n", who);
+		purple_debug_info("msn", "User %s already exists\n", who);
 
 		msn_userlist_rem_buddy_from_list(userlist, who, MSN_LIST_BL);
 
 		if (msn_userlist_user_is_in_group(user, group_id)) {
-			purple_debug_info("MSN Userlist", "User %s is already in group %s, returning\n", who, new_group_name);
+			purple_debug_info("msn", "User %s is already in group %s, returning\n", who, new_group_name);
 			msn_callback_state_free(state);
 			return;
 		}
 	}
 
-	purple_debug_info("MSN Userlist", "Adding user: %s to group id: %s\n", who, group_id);
+	purple_debug_info("msn", "Adding user: %s to group id: %s\n", who, group_id);
 
 	msn_callback_state_set_action(state, MSN_ADD_BUDDY);
 
@@ -777,13 +775,13 @@
 	if (msn_userlist_user_is_in_list(user, list_id))
 	{
 		list = lists[list_id];
-		purple_debug_info("MSN Userlist", "User '%s' is already in list: %s\n", who, list);
+		purple_debug_info("msn", "User '%s' is already in list: %s\n", who, list);
 		return;
 	}
 
 	//friendly_name = (user != NULL) ? get_friendly_name(user) : who;
 
-	//purple_debug_info("MSN Userlist", "store_name = %s\n", store_name);
+	//purple_debug_info("msn", "store_name = %s\n", store_name);
 
 	/* XXX: see XXX above, this should really be done when we get the response from
 		the server */
@@ -804,15 +802,15 @@
 	g_return_val_if_fail(group_name != NULL, FALSE);
 	g_return_val_if_fail(who != NULL, FALSE);
 
-	purple_debug_info("MSN Userlist","Adding buddy with passport %s to group %s\n", who, group_name);
+	purple_debug_info("msn", "Adding buddy with passport %s to group %s\n", who, group_name);
 
 	if ( (group_id = (gchar *)msn_userlist_find_group_id(userlist, group_name)) == NULL) {
-		purple_debug_error("MSN Userlist", "Group %s has no guid!\n", group_name);
+		purple_debug_error("msn", "Group %s has no guid!\n", group_name);
 		return FALSE;
 	}
 
 	if ( (user = msn_userlist_find_user(userlist, who)) == NULL) {
-		purple_debug_error("MSN Userlist", "User %s not found!", who);
+		purple_debug_error("msn", "User %s not found!", who);
 		return FALSE;
 	}
 
@@ -833,15 +831,15 @@
 	g_return_val_if_fail(group_name != NULL, FALSE);
 	g_return_val_if_fail(who != NULL, FALSE);
 
-	purple_debug_info("MSN Userlist","Removing buddy with passport %s from group %s\n", who, group_name);
+	purple_debug_info("msn", "Removing buddy with passport %s from group %s\n", who, group_name);
 
 	if ( (group_id = msn_userlist_find_group_id(userlist, group_name)) == NULL) {
-		purple_debug_error("MSN Userlist", "Group %s has no guid!\n", group_name);
+		purple_debug_error("msn", "Group %s has no guid!\n", group_name);
 		return FALSE;
 	}
 
 	if ( (user = msn_userlist_find_user(userlist, who)) == NULL) {
-		purple_debug_error("MSN Userlist", "User %s not found!", who);
+		purple_debug_error("msn", "User %s not found!", who);
 		return FALSE;
 	}