# HG changeset patch # User Eric Warmenhoven <eric@warmenhoven.org> # Date 992714157 0 # Node ID cb4fbcdae9ebec773a107987aa0ddc416388cb1b # Parent 3155db0c19903ce29eec786fa0f01f3da61b814e [gaim-migrate @ 2048] msn updates committer: Tailor Script <tailor@pidgin.im> diff -r 3155db0c1990 -r cb4fbcdae9eb doc/MSN-PROTOCOL --- a/doc/MSN-PROTOCOL Sat Jun 16 07:45:32 2001 +0000 +++ b/doc/MSN-PROTOCOL Sat Jun 16 17:55:57 2001 +0000 @@ -1,3 +1,7 @@ +Some other notes not contained in this spec. +REA TrID UserHandle FriendlyName - will change your friendly name + +--- Instant Messaging and Presence Protocol R. Movva Internet Draft Microsoft Category: Informational August, 1999 diff -r 3155db0c1990 -r cb4fbcdae9eb plugins/msn/msn.c --- a/plugins/msn/msn.c Sat Jun 16 07:45:32 2001 +0000 +++ b/plugins/msn/msn.c Sat Jun 16 17:55:57 2001 +0000 @@ -378,7 +378,8 @@ GET_NEXT(tmp); user = tmp; remove_chat_buddy(ms->chat, user); - } + } else + msn_kill_switch(ms); } else if (!g_strncasecmp(buf, "CAL", 3)) { } else if (!g_strncasecmp(buf, "IRO", 3)) { char *tot, *user, *tmp = buf; @@ -426,7 +427,7 @@ } else if (!g_strncasecmp(buf, "MSG", 3)) { char *user, *tmp = buf; int length; - char *msg, *content, *skiphead, *utf, *final; + char *msg, *content, *utf; int len; GET_NEXT(tmp); @@ -448,32 +449,32 @@ } 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]) { + if (!content) { g_free(msg); return; } - skiphead += 4; - utf = utf8_to_str(skiphead); - len = MAX(strlen(utf) + 1, BUF_LEN); - final = g_malloc(len); - g_snprintf(final, len, "%s", utf); - g_free(utf); + if (!g_strncasecmp(content, "Content-Type: text/plain", + strlen("Content-Type: text/plain"))) { + char *final, *skiphead; + skiphead = strstr(msg, "\r\n\r\n"); + if (!skiphead || !skiphead[4]) { + g_free(msg); + return; + } + skiphead += 4; + utf = utf8_to_str(skiphead); + len = MAX(strlen(utf) + 1, BUF_LEN); + final = g_malloc(len); + g_snprintf(final, len, "%s", utf); + g_free(utf); - if (ms->chat) - serv_got_chat_in(gc, ms->chat->id, user, 0, final, time(NULL)); - else - serv_got_im(gc, user, final, 0, time(NULL)); + if (ms->chat) + serv_got_chat_in(gc, ms->chat->id, user, 0, final, time(NULL)); + else + serv_got_im(gc, user, final, 0, time(NULL)); - g_free(final); + g_free(final); + } g_free(msg); } else if (!g_strncasecmp(buf, "NAK", 3)) { do_error_dialog("A message may not have been received.", "MSN Error");