changeset 1992:5121e706af6d

[gaim-migrate @ 2002] rock it committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 11 Jun 2001 20:57:10 +0000
parents 308bd76c57db
children a4db3667da12
files plugins/msn/msn.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/msn/msn.c	Mon Jun 11 20:49:18 2001 +0000
+++ b/plugins/msn/msn.c	Mon Jun 11 20:57:10 2001 +0000
@@ -361,7 +361,7 @@
 	} else if (!g_strncasecmp(buf, "MSG", 3)) {
 		char *user, *tmp = buf;
 		int length;
-		char *msg, *skiphead, *utf, *final;
+		char *msg, *content, *skiphead, *utf, *final;
 		int len;
 
 		GET_NEXT(tmp);
@@ -382,11 +382,22 @@
 	
 		}
 
+		content = strstr(msg, "Content-Type: ");
+		if (content) {
+			if (g_strncasecmp(content, "Content-Type: text/plain",
+					    strlen("Content-Type: text/plain"))) {
+				g_free(msg);
+				return;
+			}
+		}
+
 		skiphead = strstr(msg, "\r\n\r\n");
 		if (!skiphead || !skiphead[4]) {
 			g_free(msg);
 			return;
 		}
+		*skiphead = 0;
+		debug_printf("%s\n", msg);
 		skiphead += 4;
 		utf = utf8_to_str(skiphead);
 		len = MAX(strlen(utf) + 1, BUF_LEN);