# HG changeset patch # User Ethan Blanton # Date 1208031609 0 # Node ID 7a68335d1086c74f624260be39c5eef4688de1ef # Parent bc9845b6f9c09d4dd3bcf38c7f6ce54c8cf7b5ce# Parent 37fc84e642ef00f3a4e3f769e3a9c8d2118ba580 merge of '37d6f8af593bffa17bba1823a3c5a8612bcfdf18' and '6f293106dd16191e1ee2fd0ae94ab626d6753c98' diff -r 37fc84e642ef -r 7a68335d1086 ChangeLog --- a/ChangeLog Sat Apr 12 18:30:34 2008 +0000 +++ b/ChangeLog Sat Apr 12 20:20:09 2008 +0000 @@ -3,7 +3,8 @@ version 2.x.x: libpurple: * In MySpaceIM, messages from spambots are discarded (Justin Williams) - + * Strip mIRC formatting codes from quit and part messages. + Pidgin: * The typing notification in the conversation history can be disabled or customized (font, color etc.) in .gtkrc-2.0. diff -r 37fc84e642ef -r 7a68335d1086 libpurple/protocols/irc/msgs.c --- a/libpurple/protocols/irc/msgs.c Sat Apr 12 18:30:34 2008 +0000 +++ b/libpurple/protocols/irc/msgs.c Sat Apr 12 20:20:09 2008 +0000 @@ -61,9 +61,11 @@ static void irc_chat_remove_buddy(PurpleConversation *convo, char *data[2]) { - char *message; + char *message, *stripped; - message = g_strdup_printf("quit: %s", data[1]); + stripped = data[1] ? irc_mirc2txt(data[1]) : NULL; + message = g_strdup_printf("quit: %s", stripped); + g_free(stripped); if (purple_conv_chat_find_user(PURPLE_CONV_CHAT(convo), data[0])) purple_conv_chat_remove_user(PURPLE_CONV_CHAT(convo), data[0], message); @@ -991,7 +993,9 @@ g_free(msg); serv_got_chat_left(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo))); } else { - purple_conv_chat_remove_user(PURPLE_CONV_CHAT(convo), nick, args[1]); + msg = args[1] ? irc_mirc2txt(args[1]) : NULL; + purple_conv_chat_remove_user(PURPLE_CONV_CHAT(convo), nick, msg); + g_free(msg); } g_free(nick); }