diff libpurple/util.c @ 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 47a2d00ab060
children a38ee5d9eedf 941965d6fd88 b77adb803eca
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;
 }