diff src/protocols/silc/silc.c @ 9762:3f97624e7753

[gaim-migrate @ 10630] nosnilmot writes: This patch auto-linkifies the topic in chats in IRC, Jabber & SILC, so you can now do /topic and get clickable links. Much more fun than copy & paste. This looks a little ugly to me. Too much code seems duplicated. But it was already duplicated, stu just made it do a little more. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Mon, 16 Aug 2004 01:14:58 +0000
parents 4a8bf81b82ae
children e74eb0d11f86
line wrap: on
line diff
--- a/src/protocols/silc/silc.c	Sun Aug 15 23:28:09 2004 +0000
+++ b/src/protocols/silc/silc.c	Mon Aug 16 01:14:58 2004 +0000
@@ -985,7 +985,7 @@
 {
 	GaimConnection *gc;
 	int id = 0;
-	char *buf, *tmp;
+	char *buf, *tmp, *tmp2;
 	const char *topic;
 
 	gc = gaim_conversation_get_gc(conv);
@@ -998,8 +998,10 @@
 		topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(conv));
 		if (topic) {
 			tmp = gaim_escape_html(topic);
-			buf = g_strdup_printf(_("current topic is: %s"), tmp);
+			tmp2 = gaim_markup_linkify(tmp);
+			buf = g_strdup_printf(_("current topic is: %s"), tmp2);
 			g_free(tmp);
+			g_free(tmp2);
 		} else
 			buf = g_strdup(_("No topic is set"));
 		gaim_conv_chat_write(GAIM_CONV_CHAT(conv), gc->account->username, buf,