Mercurial > pidgin
comparison src/protocols/irc/msgs.c @ 9518:6c24a6f07256
[gaim-migrate @ 10345]
" Updates irc and silc to pass the topic setter to
gaim_conv_chat_set_topic. Theres more code duplication
in here than I would like, but it's better than adding
another var and adding more conditionals.." --Gary Kramlich
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 12 Jul 2004 19:38:05 +0000 |
parents | f5c08be60098 |
children | 8b2451878e26 |
comparison
equal
deleted
inserted
replaced
9517:0524b36c701a | 9518:6c24a6f07256 |
---|---|
268 | 268 |
269 convo = gaim_find_conversation_with_account(chan, irc->account); | 269 convo = gaim_find_conversation_with_account(chan, irc->account); |
270 if (!convo) { | 270 if (!convo) { |
271 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); | 271 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); |
272 } | 272 } |
273 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); | 273 |
274 /* If this is an interactive update, print it out */ | 274 /* If this is an interactive update, print it out */ |
275 tmp = gaim_escape_html(topic); | 275 tmp = gaim_escape_html(topic); |
276 if (!strcmp(name, "topic")) { | 276 if (!strcmp(name, "topic")) { |
277 nick = irc_mask_nick(from); | 277 nick = irc_mask_nick(from); |
278 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic); | |
278 msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp); | 279 msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp); |
279 g_free(nick); | 280 g_free(nick); |
280 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); | 281 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
281 g_free(msg); | 282 g_free(msg); |
282 } else { | 283 } else { |
283 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); | 284 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); |
285 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); | |
284 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); | 286 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
285 g_free(msg); | 287 g_free(msg); |
286 } | 288 } |
287 g_free(tmp); | 289 g_free(tmp); |
288 g_free(topic); | 290 g_free(topic); |