changeset 8437:990314a962fb

[gaim-migrate @ 9167] Small patch from evands to let you add @mac.com screen names to your buddy lists again. I think I broke this after 0.75 was released. Also add a check to make sure you're signing on with a valid screen name, but leave it commented out because it would break the string freeze. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 12 Mar 2004 22:57:29 +0000
parents 4bb3d8dc717e
children 021c6c4149cb
files src/protocols/oscar/oscar.c src/protocols/oscar/util.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Fri Mar 12 16:59:22 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Fri Mar 12 22:57:29 2004 +0000
@@ -698,6 +698,15 @@
 
 	gaim_debug(GAIM_DEBUG_MISC, "oscar", "oscar_login: gc = %p\n", gc);
 
+#if 0
+	if (!aim_snvalid(gaim_account_get_username(account))) {
+		gchar *buf;
+		buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid.  Screen names must either start with a letter and contain only letters, numbers and spaces, or contain only numbers."), name);
+		gaim_connection_error(gc, buf);
+		g_free(buf);
+	}
+#endif
+
 	if (isdigit(*(gaim_account_get_username(account)))) {
 		od->icq = TRUE;
 	} else {
--- a/src/protocols/oscar/util.c	Fri Mar 12 16:59:22 2004 +0000
+++ b/src/protocols/oscar/util.c	Fri Mar 12 22:57:29 2004 +0000
@@ -179,7 +179,7 @@
 			if (!isdigit(sn[i]))
 				return 0;
 		} else {
-			if (!isalnum(sn[i]) && (sn[i] != ' '))
+			if (!isalnum(sn[i]) && (sn[i] != ' ') && (sn[i] != '@') && (sn[i] != '.'))
 				return 0;
 		}
 		i++;