changeset 21689:882ac6616de9

merge of '29f8aed19e209a53a63c57cf872bc9f446d84aeb' and '680ead8ac23fbdc99bd7178248a4cdf0bec54307'
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 29 Nov 2007 23:18:51 +0000
parents 6f4ffdc65230 (current diff) 280f622cb9b0 (diff)
children 33285f8f68ba
files
diffstat 4 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c	Thu Nov 29 23:18:33 2007 +0000
+++ b/libpurple/protocols/irc/parse.c	Thu Nov 29 23:18:51 2007 +0000
@@ -64,7 +64,7 @@
 	{ "318", "nt:", irc_msg_endwhois },	/* End of WHOIS			*/
 	{ "319", "nn:", irc_msg_whois },	/* Whois channels		*/
 	{ "320", "nn:", irc_msg_whois },	/* Whois (fn ident)		*/
-	{ "314", "nnvvv:", irc_msg_whois },	/* Whowas user			*/
+	{ "314", "nnnvv:", irc_msg_whois },	/* Whowas user			*/
 	{ "369", "nt:", irc_msg_endwhois },	/* End of WHOWAS		*/
 	{ "321", "*", irc_msg_list },		/* Start of list		*/
 	{ "322", "ncv:", irc_msg_list },	/* List.			*/
--- a/libpurple/protocols/msnp9/notification.c	Thu Nov 29 23:18:33 2007 +0000
+++ b/libpurple/protocols/msnp9/notification.c	Thu Nov 29 23:18:51 2007 +0000
@@ -235,6 +235,8 @@
 		/* OK */
 		const char *friendly = purple_url_decode(cmd->params[3]);
 
+		session->passport_info.verified = atoi(cmd->params[4]);
+
 		purple_connection_set_display_name(gc, friendly);
 
 		msn_session_set_login_step(session, MSN_LOGIN_STEP_SYN);
--- a/libpurple/protocols/msnp9/session.h	Thu Nov 29 23:18:33 2007 +0000
+++ b/libpurple/protocols/msnp9/session.h	Thu Nov 29 23:18:51 2007 +0000
@@ -114,7 +114,7 @@
 		char *file;
 		char *client_ip;
 		int client_port;
-
+		int verified;
 	} passport_info;
 };
 
--- a/libpurple/protocols/msnp9/user.c	Thu Nov 29 23:18:33 2007 +0000
+++ b/libpurple/protocols/msnp9/user.c	Thu Nov 29 23:18:51 2007 +0000
@@ -126,16 +126,20 @@
 msn_user_set_friendly_name(MsnUser *user, const char *name)
 {
 	MsnCmdProc *cmdproc;
+	MsnSession *session;
 	const char *encoded;
 
 	g_return_if_fail(user != NULL);
 
 	encoded = purple_url_encode(name);
+	session = user->userlist->session;
 
-	if (user->friendly_name && strcmp(user->friendly_name, name) && (strlen(encoded) < 387)) {
+	if (user->friendly_name && strcmp(user->friendly_name, name)
+		&& (strlen(encoded) < 387) && session->passport_info.verified &&
+		(user->list_op & MSN_LIST_FL_OP)) {
 		/* copy the new name to the server list, but only when new */
 		/* should we check this more thoroughly? */
-		cmdproc = user->userlist->session->notification->cmdproc;
+		cmdproc = session->notification->cmdproc;
 		msn_cmdproc_send(cmdproc, "REA", "%s %s",
 						 user->passport,
 						 encoded);