changeset 13168:bdb8d7beb5a7

[gaim-migrate @ 15531] Sorry about that; the build bot is pickier than the static libgaim compilation I tested this on. I'll be sure to compile Gaim proper before committing in the future. committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Tue, 07 Feb 2006 19:50:14 +0000
parents be0cd152691d
children 4cef9fe8ea5b
files src/protocols/oscar/aim.h src/protocols/oscar/oscar.c src/protocols/oscar/util.c
diffstat 3 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h	Tue Feb 07 19:36:40 2006 +0000
+++ b/src/protocols/oscar/aim.h	Tue Feb 07 19:50:14 2006 +0000
@@ -1569,6 +1569,7 @@
 
 faim_export int aim_snvalid(const char *sn);
 faim_export int aim_sn_is_icq(const char *sn);
+faim_export int aim_sn_is_sms(const char *sn);
 faim_export int aim_snlen(const char *sn);
 faim_export int aim_sncmp(const char *sn1, const char *sn2);
 
--- a/src/protocols/oscar/oscar.c	Tue Feb 07 19:36:40 2006 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Feb 07 19:50:14 2006 +0000
@@ -6526,7 +6526,7 @@
 		/*
 		 * If we're IMing an SMS user or an ICQ user from an ICQ account, then strip HTML.
  		 */
-		if (aim_snvalid_sms(name)) {
+		if (aim_sn_is_sms(name)) {
 			/* Messaging an SMS (mobile) user */
 			tmp2 = gaim_unescape_html(tmp1);			
 		} else if (aim_sn_is_icq(gaim_account_get_username(account))) {
--- a/src/protocols/oscar/util.c	Tue Feb 07 19:36:40 2006 +0000
+++ b/src/protocols/oscar/util.c	Tue Feb 07 19:50:14 2006 +0000
@@ -218,6 +218,21 @@
 	return 1;
 }
 
+/**
+ * Determine if a given screen name is an SMS number
+ * (i.e. it begins with a +).
+ *
+ * @sn A valid AIM or ICQ screen name.
+ * @return 1 if the screen name is an SMS number.  Otherwise 0
+ *         is returned.
+ */
+faim_export int aim_sn_is_sms(const char *sn)
+{
+	if (sn[0] != '+')
+		return 0;
+	return 1;
+}
+
 /*
 * int snlen(const char *)
 *