changeset 11057:e9eeacd1a8d0

[gaim-migrate @ 13009] Patch #1223021 from Jason Roth (jroth2) Fixes Bug #1222552 "As described in bug report #1222552, gaim will disconnect the current msn session and corrupt blist.xml when you try to add an msn screenname with a space in it" -- jroth2 I reworked this quite a bit. Stu suggested using gaim_email_valid() rather than just checking for a space. I took this advice. I also made it display an error message instead of silently dropping the add request. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 05 Jul 2005 00:03:42 +0000
parents 9be8ac00f27f
children 9509ba09475f
files COPYRIGHT src/protocols/msn/userlist.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Jul 04 20:03:18 2005 +0000
+++ b/COPYRIGHT	Tue Jul 05 00:03:42 2005 +0000
@@ -162,6 +162,7 @@
 Rhett Robinson
 Luciano Miguel Ferreira Rocha
 Andrew Rodland
+Jason Roth
 Jean-Francois Roy
 Arvind Samptur
 Sam S.
--- a/src/protocols/msn/userlist.c	Mon Jul 04 20:03:18 2005 +0000
+++ b/src/protocols/msn/userlist.c	Tue Jul 05 00:03:42 2005 +0000
@@ -650,6 +650,15 @@
 
 	group_id = -1;
 
+	if (!gaim_email_is_valid(who))
+	{
+		char *str = g_strdup_printf(_("Unable to add \"%s\"."), who);
+		gaim_notify_error(NULL, NULL, str,
+						  _("MSN screennames cannot contain spaces."));
+		g_free(str);
+		return;
+	}
+
 	if (group_name != NULL)
 	{
 		group_id = msn_userlist_find_group_id(userlist, group_name);