Index: src/protocols/irc/cmds.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/cmds.c,v retrieving revision 1.16 diff -u -p -r1.16 cmds.c --- src/protocols/irc/cmds.c 2 Jul 2004 03:54:13 -0000 1.16 +++ src/protocols/irc/cmds.c 13 Aug 2004 17:37:58 -0000 @@ -444,9 +444,12 @@ int irc_cmd_topic(struct irc_conn *irc, topic = gaim_conv_chat_get_topic (GAIM_CONV_CHAT(convo)); if (topic) { - char *tmp = gaim_escape_html(topic); - buf = g_strdup_printf(_("current topic is: %s"), tmp); + char *tmp, *tmp2; + tmp = gaim_escape_html(topic); + 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(convo), target, buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); Index: src/protocols/irc/msgs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/msgs.c,v retrieving revision 1.35 diff -u -p -r1.35 msgs.c --- src/protocols/irc/msgs.c 12 Aug 2004 00:26:28 -0000 1.35 +++ src/protocols/irc/msgs.c 13 Aug 2004 17:37:59 -0000 @@ -260,7 +260,7 @@ void irc_msg_list(struct irc_conn *irc, void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args) { - char *chan, *topic, *msg, *nick, *tmp; + char *chan, *topic, *msg, *nick, *tmp, *tmp2; GaimConversation *convo; if (!strcmp(name, "topic")) { @@ -278,20 +278,22 @@ void irc_msg_topic(struct irc_conn *irc, /* If this is an interactive update, print it out */ tmp = gaim_escape_html(topic); + tmp2 = gaim_markup_linkify(tmp); + g_free(tmp); if (!strcmp(name, "topic")) { nick = irc_mask_nick(from); gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic); - msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp); + msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp2); 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, tmp); + msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp2); gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); } - g_free(tmp); + g_free(tmp2); g_free(topic); } Index: src/protocols/jabber/chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/chat.c,v retrieving revision 1.34 diff -u -p -r1.34 chat.c --- src/protocols/jabber/chat.c 8 Aug 2004 05:38:00 -0000 1.34 +++ src/protocols/jabber/chat.c 13 Aug 2004 17:37:59 -0000 @@ -530,11 +530,15 @@ void jabber_chat_change_topic(JabberChat jabber_message_free(jm); } else { const char *cur = gaim_conv_chat_get_topic(GAIM_CONV_CHAT(chat->conv)); - char *buf; + char *buf, *tmp, *tmp2; - if(cur) - buf = g_strdup_printf(_("current topic is: %s"), cur); - else + if(cur) { + tmp = gaim_escape_html(cur); + 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(chat->conv), "", buf, GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_NO_LOG, time(NULL)); Index: src/protocols/jabber/message.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/message.c,v retrieving revision 1.38 diff -u -p -r1.38 message.c --- src/protocols/jabber/message.c 24 Jul 2004 15:18:32 -0000 1.38 +++ src/protocols/jabber/message.c 13 Aug 2004 17:37:59 -0000 @@ -168,12 +168,16 @@ static void handle_groupchat(JabberMessa gaim_conv_chat_set_topic(GAIM_CONV_CHAT(chat->conv), jid->resource, jm->subject); if(!jm->xhtml && !jm->body) { - char *msg; + char *msg, *tmp, *tmp2; + tmp = gaim_escape_html(jm->subject); + tmp2 = gaim_markup_linkify(tmp); if(jid->resource) - msg = g_strdup_printf(_("%s has set the topic to: %s"), jid->resource, jm->subject); + msg = g_strdup_printf(_("%s has set the topic to: %s"), jid->resource, tmp2); else - msg = g_strdup_printf(_("The topic is: %s"), jm->subject); + msg = g_strdup_printf(_("The topic is: %s"), tmp2); gaim_conv_chat_write(GAIM_CONV_CHAT(chat->conv), "", msg, GAIM_MESSAGE_SYSTEM, jm->sent); + g_free(tmp); + g_free(tmp2); g_free(msg); } } Index: src/protocols/silc/ops.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/silc/ops.c,v retrieving revision 1.14 diff -u -p -r1.14 ops.c --- src/protocols/silc/ops.c 2 Aug 2004 04:19:26 -0000 1.14 +++ src/protocols/silc/ops.c 13 Aug 2004 17:37:59 -0000 @@ -314,52 +314,61 @@ silc_notify(SilcClient client, SilcClien break; case SILC_NOTIFY_TYPE_TOPIC_SET: - idtype = va_arg(va, int); - entry = va_arg(va, void *); - tmp = va_arg(va, char *); - channel = va_arg(va, SilcChannelEntry); + { + char *esc, *tmp2; + idtype = va_arg(va, int); + entry = va_arg(va, void *); + tmp = va_arg(va, char *); + channel = va_arg(va, SilcChannelEntry); - convo = gaim_find_conversation_with_account(channel->channel_name, - sg->account); - if (!convo) - break; + convo = gaim_find_conversation_with_account(channel->channel_name, + sg->account); + if (!convo) + break; - if (!tmp) - break; + if (!tmp) + break; - if (idtype == SILC_ID_CLIENT) { - client_entry = (SilcClientEntry)entry; - g_snprintf(buf, sizeof(buf), - _("%s has changed the topic of %s to: %s"), - client_entry->nickname, channel->channel_name, tmp); - gaim_conv_chat_write(GAIM_CONV_CHAT(convo), client_entry->nickname, - buf, GAIM_MESSAGE_SYSTEM, time(NULL)); - gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), - client_entry->nickname, tmp); - } else if (idtype == SILC_ID_SERVER) { - server_entry = (SilcServerEntry)entry; - g_snprintf(buf, sizeof(buf), - _("%s has changed the topic of %s to: %s"), - server_entry->server_name, channel->channel_name, tmp); - gaim_conv_chat_write(GAIM_CONV_CHAT(convo), server_entry->server_name, - buf, GAIM_MESSAGE_SYSTEM, time(NULL)); - gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), - server_entry->server_name, tmp); - } else if (idtype == SILC_ID_CHANNEL) { - channel = (SilcChannelEntry)entry; - g_snprintf(buf, sizeof(buf), - _("%s has changed the topic of %s to: %s"), - channel->channel_name, channel->channel_name, tmp); - gaim_conv_chat_write(GAIM_CONV_CHAT(convo), channel->channel_name, - buf, GAIM_MESSAGE_SYSTEM, time(NULL)); - gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), - channel->channel_name, tmp); - } else { - gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, tmp); - } + esc = gaim_escape_html(tmp); + tmp2 = gaim_markup_linkify(esc); + g_free(esc); - break; + if (idtype == SILC_ID_CLIENT) { + client_entry = (SilcClientEntry)entry; + g_snprintf(buf, sizeof(buf), + _("%s has changed the topic of %s to: %s"), + client_entry->nickname, channel->channel_name, tmp2); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), client_entry->nickname, + buf, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), + client_entry->nickname, tmp); + } else if (idtype == SILC_ID_SERVER) { + server_entry = (SilcServerEntry)entry; + g_snprintf(buf, sizeof(buf), + _("%s has changed the topic of %s to: %s"), + server_entry->server_name, channel->channel_name, tmp2); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), server_entry->server_name, + buf, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), + server_entry->server_name, tmp); + } else if (idtype == SILC_ID_CHANNEL) { + channel = (SilcChannelEntry)entry; + g_snprintf(buf, sizeof(buf), + _("%s has changed the topic of %s to: %s"), + channel->channel_name, channel->channel_name, tmp2); + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), channel->channel_name, + buf, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), + channel->channel_name, tmp); + } else { + gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, tmp); + } + g_free(tmp2); + + break; + + } case SILC_NOTIFY_TYPE_NICK_CHANGE: client_entry = va_arg(va, SilcClientEntry); client_entry2 = va_arg(va, SilcClientEntry); Index: src/protocols/silc/silc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/silc/silc.c,v retrieving revision 1.21 diff -u -p -r1.21 silc.c --- src/protocols/silc/silc.c 9 Aug 2004 14:46:52 -0000 1.21 +++ src/protocols/silc/silc.c 13 Aug 2004 17:37:59 -0000 @@ -985,7 +985,7 @@ static GaimCmdRet silcgaim_cmd_chat_topi { 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 @@ static GaimCmdRet silcgaim_cmd_chat_topi 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,