diff libgaim/protocols/msn/msn.c @ 20391:0b0ecee55091

The second msn.tgz from SF Patch #1621854 from Ka-Hing Cheung. "new version, fixes some crashes because group_id is char * but in some places it's set to an int (!). skadotnet, I don't understand why you need `if (!strcmp(type, "MFN")) {` in so many places, so I didn't include most of them. I also have different versions of some of your fixes because I already fixed them. Group manipulations may still not work, at least it's not crashing :-)" committer: Richard Laager <rlaager@wiktel.com>
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 15 Apr 2007 02:43:47 +0000
parents d634f88e25d8
children 9ba7dee775e1
line wrap: on
line diff
--- a/libgaim/protocols/msn/msn.c	Sun Apr 15 02:18:17 2007 +0000
+++ b/libgaim/protocols/msn/msn.c	Sun Apr 15 02:43:47 2007 +0000
@@ -137,9 +137,12 @@
 		return;
 	}
 
-	msn_cmdproc_send(cmdproc, "REA", "%s %s",
-					 gaim_account_get_username(account),
-					 alias);
+	if (*alias != '\0') {
+		msn_cmdproc_send(cmdproc, "PRP", "MFN %s", alias);
+	} else {
+		msn_cmdproc_send(cmdproc, "PRP", "MFN %s",
+						 gaim_url_encode(gaim_account_get_username(account)));
+	}
 }
 
 static void
@@ -524,7 +527,8 @@
 {
 	GaimPresence *presence;
 	GaimStatus *status;
-	char *msg, *psm_str, *tmp2, *text, *name;
+	const char *msg, *name;
+	char *psm_str, *tmp2, *text;
 
 	presence = gaim_buddy_get_presence(buddy);
 	status = gaim_presence_get_active_status(presence);
@@ -903,9 +907,8 @@
 
 		oim = session->oim;
 		friendname = msn_encode_mime(account->username);
-		msn_oim_prep_send_msg_info(oim,
-			gaim_account_get_username(account),friendname,who,
-			message);
+		msn_oim_prep_send_msg_info(oim, gaim_account_get_username(account),
+								   friendname, who,	message);
 		msn_oim_send_msg(oim);
 	}
 	return 1;