pidgin: fdc9c398: We should not be sensitive about the cas...

sadrul at pidgin.im sadrul at pidgin.im
Tue Jun 30 16:55:42 EDT 2009


-----------------------------------------------------------------
Revision: fdc9c398d90e22dc3ec2fa37d0bbe83b5ae2f1a6
Ancestor: 0dcd9f85bb14185367f49819d59ecaf1ca9d6eaf
Author: sadrul at pidgin.im
Date: 2009-06-29T03:32:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/fdc9c398d90e22dc3ec2fa37d0bbe83b5ae2f1a6

Modified files:
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

We should not be sensitive about the case.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c	8e748fba8a02f56f3bb52ec8c58fed3b9fc17df7
+++ libpurple/protocols/yahoo/yahoo.c	39bb38982cbbd8c353a4db536f653d60d2491988
@@ -4222,7 +4222,7 @@ static int yahoo_send_im(PurpleConnectio
 		}
 	}
 
-	msn = g_str_has_prefix(who, "msn/") || g_str_has_prefix(who, "MSN/");
+	msn = !g_strncasecmp(who, "msn/", 4);
 
 	if( strncmp(who, "+", 1) == 0 ) {
 		/* we have an sms to be sent */
@@ -4346,7 +4346,7 @@ static unsigned int yahoo_send_typing(Pu
 {
 	struct yahoo_data *yd = gc->proto_data;
 	struct yahoo_p2p_data *p2p_data;
-	gboolean msn = (g_str_has_prefix(who, "msn/") || g_str_has_prefix(who, "MSN/"));
+	gboolean msn = !g_strncasecmp(who, "msn/", 4);
 	struct yahoo_packet *pkt = NULL;
 
 	/* Don't do anything if sms is being typed */
@@ -4619,7 +4619,7 @@ static void yahoo_add_buddy(PurpleConnec
 		return;
 
 	f = yahoo_friend_find(gc, bname);
-	msn = g_str_has_prefix(bname, "msn/") || g_str_has_prefix(bname, "MSN/");
+	msn = !g_strncasecmp(bname, "msn/", 4);
 
 	g = purple_buddy_get_group(buddy);
 	if (g)


More information about the Commits mailing list