changeset 22608:dcfe7a855d7e

merge of '2eb97f7d46ac5955e6a217661513d28e3b5ce060' and '4ae935a838132794ea30db892805e76c69e4a45e'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 01 Apr 2008 22:25:33 +0000
parents 8b952cb84f45 (current diff) c7742b830585 (diff)
children 2784043ec24d
files
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 31 22:01:43 2008 +0000
+++ b/ChangeLog	Tue Apr 01 22:25:33 2008 +0000
@@ -1,5 +1,9 @@
 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
 
--- a/libpurple/protocols/myspace/myspace.c	Mon Mar 31 22:01:43 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Tue Apr 01 22:25:33 2008 +0000
@@ -688,6 +688,13 @@
 	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);