changeset 888:38ffd1faa31a

[gaim-migrate @ 898] "New Conversation" is logged in chatroom log files. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 12 Sep 2000 17:56:39 +0000
parents c0ff16ef5e75
children e1da6a6ec42b
files ChangeLog src/server.c
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Sep 12 17:08:28 2000 +0000
+++ b/ChangeLog	Tue Sep 12 17:56:39 2000 +0000
@@ -1,6 +1,7 @@
 GAIM: The Pimpin' Penguin IM Clone thats good for the soul! 
 
 version 0.10.1:
+	* Better chatroom logging
 
 version 0.10.0 (09/11/2000): 
 	* New Smiley Faces and Pixmaps added.
--- a/src/server.c	Tue Sep 12 17:08:28 2000 +0000
+++ b/src/server.c	Tue Sep 12 17:56:39 2000 +0000
@@ -933,6 +933,24 @@
         b->in_room = NULL;
         b->id = id;
         g_snprintf(b->name, 80, "%s", name);
+
+	if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(b->name)) {
+		FILE *fd;
+		char *filename;
+
+		filename = (char *)malloc(100);
+		snprintf(filename, 100, "%s.chat", b->name);
+		
+		fd = open_log_file(filename);
+		if (!(general_options & OPT_GEN_STRIP_HTML))
+			fprintf(fd, "<HR><BR><H3 Align=Center> ---- New Conversation @ %s ----</H3><BR>\n", full_date());
+		else
+			fprintf(fd, "---- New Conversation @ %s ----\n", full_date());
+		
+		fclose(fd);
+		free(filename);
+	}
+	
         show_new_buddy_chat(b);
 }