diff src/protocols/irc/msgs.c @ 8529:2f505651ac03

[gaim-migrate @ 9268] This strips mIRC color and formatting codes from topics and provides a generic function for stripping mirc color codes and returning plain text (irc_mirc2txt()). This should fix Bug #923672. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Tue, 30 Mar 2004 17:44:40 +0000
parents 534b479692d0
children 07404dc25af8
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c	Tue Mar 30 15:45:52 2004 +0000
+++ b/src/protocols/irc/msgs.c	Tue Mar 30 17:44:40 2004 +0000
@@ -260,10 +260,10 @@
 
 	if (!strcmp(name, "topic")) {
 		chan = args[0];
-		topic = args[1];
+		topic = irc_mirc2txt (args[1]);
 	} else {
 		chan = args[1];
-		topic = args[2];
+		topic = irc_mirc2txt (args[2]);
 	}
 
 	convo = gaim_find_conversation_with_account(chan, irc->account);
@@ -285,6 +285,7 @@
 		g_free(msg);
 	}
 	g_free(tmp);
+	g_free(topic);
 }
 
 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args)