changeset 19603:79d624f7c3ee

You can't just look at the first letter of the screen name to determine if it's AIM or ICQ now. It's possible for someone to register their email address as an AIM account, and you can register "12345imcool@gmail.com" as an AIM account. If you only look at the first letter then Pidgin will think it's ICQ.
author Mark Doliner <mark@kingant.net>
date Mon, 03 Sep 2007 09:45:56 +0000
parents fe51c6de1a7f
children e6364b0679b0
files libpurple/util.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Mon Sep 03 09:44:46 2007 +0000
+++ b/libpurple/util.c	Mon Sep 03 09:45:56 2007 +0000
@@ -4460,10 +4460,11 @@
 const char *_purple_oscar_convert(const char *act, const char *protocol)
 {
 	if (protocol && act && strcmp(protocol, "prpl-oscar") == 0) {
-		if (isdigit(*act))
-			protocol = "prpl-icq";
-		else
-			protocol = "prpl-aim";
+		int i;
+		for (i = 0; act[i] != '\0'; i++)
+			if (!isdigit(act[i]))
+				return "prpl-aim";
+		return "prpl-icq";
 	}
 	return protocol;
 }