Mercurial > pidgin.yaz
diff src/protocols/irc/msgs.c @ 8504:534b479692d0
[gaim-migrate @ 9240]
Patch to make IRC topics such as "Gaim > Oranges" display correctly in
conversation windows. This is from A. C. Li, I think. Right?
In any case, thanks to the author
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 25 Mar 2004 22:57:37 +0000 |
parents | f24172f53650 |
children | 2f505651ac03 |
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c Thu Mar 25 06:51:51 2004 +0000 +++ b/src/protocols/irc/msgs.c Thu Mar 25 22:57:37 2004 +0000 @@ -255,7 +255,7 @@ void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args) { - char *chan, *topic, *msg, *nick; + char *chan, *topic, *msg, *nick, *tmp; GaimConversation *convo; if (!strcmp(name, "topic")) { @@ -272,17 +272,19 @@ } gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); /* If this is an interactive update, print it out */ + tmp = gaim_escape_html(topic); if (!strcmp(name, "topic")) { nick = irc_mask_nick(from); - msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, topic); + msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp); g_free(nick); gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } else { - msg = g_strdup_printf(_("The topic for %s is: %s"), chan, topic); + msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } + g_free(tmp); } void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args)