changeset 2328:14c8df9cc75f

[gaim-migrate @ 2338] hi committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 20 Sep 2001 19:03:57 +0000
parents f74eefb55a78
children a6d0edc31554
files src/protocols/irc/irc.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Thu Sep 20 18:36:15 2001 +0000
+++ b/src/protocols/irc/irc.c	Thu Sep 20 19:03:57 2001 +0000
@@ -416,8 +416,13 @@
 	*po = 0;
 	po += 2;
 
-	if ((c = irc_find_chat(gc, text)))
+	if ((c = irc_find_chat(gc, text))) {
+		char buf[IRC_BUF_LEN];
 		chat_set_topic(c, NULL, po);
+		g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"),
+				text, po);
+		write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL));
+	}
 }
 
 static gboolean mode_has_arg(struct gaim_connection *gc, char sign, char mode)
@@ -847,8 +852,13 @@
 	} else if (!strcmp(cmd, "TOPIC")) {
 		struct conversation *c = irc_find_chat(gc, word[3]);
 		char *topic = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4];
-		if (c)
+		if (c) {
+			char buf[IRC_BUF_LEN];
 			chat_set_topic(c, nick, topic);
+			g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"),
+					nick, topic);
+			write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL));
+		}
 	} else if (!strcmp(cmd, "WALLOPS")) { /* */
 	}
 }