Mercurial > pidgin
diff libpurple/protocols/irc/msgs.c @ 17353:82a02dbf2fa2
This performs mIRC formatting code stripping for the room list, as
well as fixing (I think) mIRC color code stripping for all purposes. I
haven't tested this carefully, so someone scream if it breaks
anything.
Fixes #557
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Mon, 28 May 2007 17:52:04 +0000 |
parents | d04b1617da3d |
children | 44b4e8bd759b |
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c Mon May 28 03:18:02 2007 +0000 +++ b/libpurple/protocols/irc/msgs.c Mon May 28 17:52:04 2007 +0000 @@ -369,6 +369,7 @@ if (!strcmp(name, "322")) { PurpleRoomlistRoom *room; + char *topic; if (!args[0] || !args[1] || !args[2] || !args[3]) return; @@ -376,7 +377,9 @@ room = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_ROOM, args[1], NULL); purple_roomlist_room_add_field(irc->roomlist, room, args[1]); purple_roomlist_room_add_field(irc->roomlist, room, GINT_TO_POINTER(strtol(args[2], NULL, 10))); - purple_roomlist_room_add_field(irc->roomlist, room, args[3]); + topic = irc_mirc2txt(args[3]); + purple_roomlist_room_add_field(irc->roomlist, room, topic); + g_free(topic); purple_roomlist_room_add(irc->roomlist, room); } }