comparison src/protocols/irc/cmds.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 00242c2419c3
children cbdce0acbbe6
comparison
equal deleted inserted replaced
9761:391e4e186708 9762:3f97624e7753
442 442
443 if (!args[0]) { 443 if (!args[0]) {
444 topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); 444 topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo));
445 445
446 if (topic) { 446 if (topic) {
447 char *tmp = gaim_escape_html(topic); 447 char *tmp, *tmp2;
448 buf = g_strdup_printf(_("current topic is: %s"), tmp); 448 tmp = gaim_escape_html(topic);
449 tmp2 = gaim_markup_linkify(tmp);
450 buf = g_strdup_printf(_("current topic is: %s"), tmp2);
449 g_free(tmp); 451 g_free(tmp);
452 g_free(tmp2);
450 } else 453 } else
451 buf = g_strdup(_("No topic is set")); 454 buf = g_strdup(_("No topic is set"));
452 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); 455 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL));
453 g_free(buf); 456 g_free(buf);
454 457