comparison src/protocols/irc/irc.c @ 5299:ee2b7e4de04e

[gaim-migrate @ 5671] paco got i18n topics working. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 05 May 2003 20:58:37 +0000
parents 857106f8f971
children f3cf3bff72f0
comparison
equal deleted inserted replaced
5298:857106f8f971 5299:ee2b7e4de04e
696 696
697 static void 697 static void
698 handle_topic(struct gaim_connection *gc, char *text) 698 handle_topic(struct gaim_connection *gc, char *text)
699 { 699 {
700 struct gaim_conversation *c; 700 struct gaim_conversation *c;
701 char *po = strchr(text, ' '); 701 char *po = strchr(text, ' '), *buf;
702 702
703 if (!po) 703 if (!po)
704 return; 704 return;
705 705
706 *po = 0; 706 *po = 0;
707 po += 2; 707 po += 2;
708 708
709 if ((c = irc_find_chat(gc, text))) { 709 if ((c = irc_find_chat(gc, text))) {
710 char buf[IRC_BUF_LEN]; 710 po = irc_recv_convert(gc, po);
711 gaim_chat_set_topic(GAIM_CHAT(c), NULL, po); 711 gaim_chat_set_topic(GAIM_CHAT(c), NULL, po);
712 g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"), 712 buf = g_strdup_printf(_("<B>%s has changed the topic to: %s</B>"), text, po);
713 text, po);
714
715 gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL)); 713 gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL));
714 g_free(buf);
715 g_free(po);
716 } 716 }
717 } 717 }
718 718
719 static gboolean 719 static gboolean
720 mode_has_arg(struct gaim_connection *gc, char sign, char mode) 720 mode_has_arg(struct gaim_connection *gc, char sign, char mode)