diff src/buddy_chat.c @ 373:1d29321843b0

[gaim-migrate @ 383] raise chat windows and log chat committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 10 Jun 2000 00:48:43 +0000
parents 8c3b075d7aba
children 1eae69f076d2
line wrap: on
line diff
--- a/src/buddy_chat.c	Fri Jun 09 10:32:33 2000 +0000
+++ b/src/buddy_chat.c	Sat Jun 10 00:48:43 2000 +0000
@@ -306,6 +306,33 @@
         
         gtk_html_thaw(GTK_HTML(b->text));
         
+	if (general_options & OPT_GEN_POPUP_CHAT)
+		gdk_window_show(b->window->window);
+
+	if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(b->name)) {
+		char *t1;
+		FILE *fd;
+
+		t1 = g_malloc(256);
+		snprintf(t1, 256, "%s.chat", b->name);
+		fd = open_log_file(t1);
+		g_free(t1);
+		if (general_options & OPT_GEN_STRIP_HTML) {
+			t1 = strip_html(message);
+			if (display_options & OPT_DISP_SHOW_TIME)
+				fprintf(fd, "%s %s %s\n", date(), str, t1);
+			else
+				fprintf(fd, "%s %s\n", str, t1);
+			g_free(t1);
+		} else {
+			if (display_options & OPT_DISP_SHOW_TIME)
+				fprintf(fd, "%s %s %s\n", date(), str, message);
+			else
+				fprintf(fd, "%s %s\n", str, message);
+		}
+		fclose(fd);
+	}
+
 	g_free(str);
 	g_free(buf);
 }