pidgin: 4ae935a8: Updated patch from Justin 'Jaywalker' Wi...

sadrul at pidgin.im sadrul at pidgin.im
Tue Apr 1 18:20:48 EDT 2008


-----------------------------------------------------------------
Revision: 4ae935a838132794ea30db892805e76c69e4a45e
Ancestor: 425e5ae23de1afd8f833d3f82c7f177f19930e41
Author: sadrul at pidgin.im
Date: 2008-04-01T22:24:18
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4ae935a838132794ea30db892805e76c69e4a45e

Modified files:
        ChangeLog libpurple/protocols/myspace/myspace.c

ChangeLog: 

Updated patch from Justin 'Jaywalker' Williams to discard messages from spambots in msim. Closes #5143.

-------------- next part --------------
============================================================
--- ChangeLog	fa3174d692375bc3f63c948b0b6a460ec24daeb5
+++ ChangeLog	b432dbaee743d96fbb077fe16125484062922daa
@@ -1,5 +1,9 @@ Pidgin and Finch: The Pimpin' Penguin IM
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.x.x:
+	libpurple:
+	* In MySpaceIM, messages from spambots are discarded (Justin Williams)
+
 version 2.4.1 (03/31/2008):
 	http://developer.pidgin.im/query?status=closed&milestone=2.4.1
 
============================================================
--- libpurple/protocols/myspace/myspace.c	0acceaeac9429df0a5aded75015279c3c3565175
+++ libpurple/protocols/myspace/myspace.c	2bb03dbf1f14bd88735ed083293d0723f893db82
@@ -688,6 +688,13 @@ msim_incoming_im(MsimSession *session, M
 	username = msim_msg_get_string(msg, "_username");
 	g_return_val_if_fail(username != NULL, FALSE);
 
+	if (msim_is_userid(username)) {
+		purple_debug_info("msim", "Ignoring message from spambot (%s) on account %s\n",
+				username, purple_account_get_username(session->account));
+		g_free(username);
+		return FALSE;
+	}
+
 	msg_msim_markup = msim_msg_get_string(msg, "msg");
 	g_return_val_if_fail(msg_msim_markup != NULL, FALSE);
 


More information about the Commits mailing list