From 96936acd992a387da7a91974cefb6b763ba70fef Mon Sep 17 00:00:00 2001 From: brad Date: Tue, 2 Nov 2004 03:26:26 +0000 Subject: [PATCH] print the date and time in the log output.. ---- IRC log started Tue Sep 21 22:27 [Sep 21 22:27] *** Value of LOG set to ON [Sep 21 22:27] > hello [Sep 21 22:27] -> *drahn* hello [Sep 21 22:28] *drahn* helloback IRC log ended Tue Sep 21 22:28 ---- From drahn@ --- net/ircII/patches/patch-source_log_c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 net/ircII/patches/patch-source_log_c diff --git a/net/ircII/patches/patch-source_log_c b/net/ircII/patches/patch-source_log_c new file mode 100644 index 00000000000..08cb25083f4 --- /dev/null +++ b/net/ircII/patches/patch-source_log_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-source_log_c,v 1.1 2004/11/02 03:26:26 brad Exp $ +--- source/log.c.orig Tue Jan 6 00:42:16 2004 ++++ source/log.c Tue Sep 21 22:26:52 2004 +@@ -172,9 +172,16 @@ add_to_log(fp, line) + FILE *fp; + u_char *line; + { ++ time_t t; ++ struct tm *tm; ++ char buf[32]; ++ + if (fp) + { +- fprintf(fp, "%s\n", line); ++ t = time(0); ++ tm = localtime(&t); ++ strftime(buf, sizeof buf, "%b %d %R", tm); ++ fprintf(fp, "[%s] %s\n", buf, line); + fflush(fp); + } + }