diff libpurple/protocols/myspace/myspace.c @ 25646:69d54f84350a

propagate from branch 'im.pidgin.pidgin' (head 9da7555026cd7b8456f95ae153a7852ddbcf6678) to branch 'im.pidgin.pidgin.vv' (head 3f8b4b5a421935e71b45c7b8260c8bb32a330384)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 13 Apr 2008 17:53:46 +0000
parents 92e71f6e10d4 c7742b830585
children ff29208e03ef
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sat Mar 22 09:40:38 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Apr 13 17:53:46 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);