Mercurial > pidgin
changeset 22649:bc9845b6f9c0
Strip mIRC formatting codes from PART and QUIT messages.
References #5495
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sat, 12 Apr 2008 19:40:06 +0000 |
parents | 487105d73907 |
children | 7a68335d1086 |
files | ChangeLog libpurple/protocols/irc/msgs.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Apr 12 17:35:19 2008 +0000 +++ b/ChangeLog Sat Apr 12 19:40:06 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.
--- a/libpurple/protocols/irc/msgs.c Sat Apr 12 17:35:19 2008 +0000 +++ b/libpurple/protocols/irc/msgs.c Sat Apr 12 19:40:06 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); }