$NetBSD: patch-ad,v 1.1 2006/04/28 13:23:25 tron Exp $

--- src/irc_log.c.orig	2006-02-18 22:39:32.000000000 +0000
+++ src/irc_log.c	2006-04-28 14:06:01.000000000 +0100
@@ -58,7 +58,7 @@
 
 
 /* Log time format for strftime(3) */
-#define LOG_TIME_FORMAT "%H:%M"
+#define LOG_TIME_FORMAT "[%H:%M] "
 
 /* User log time format */
 #define LOG_USER_TIME_FORMAT "[%d %b %H:%M] "
@@ -952,13 +952,13 @@
           diff = now - when;
 
           if (diff < 82800L) {                /* Within 23 hours [hh:mm] */
-            strftime(tbuf, sizeof(tbuf), "%H:%M", localtime(&when));
+            strftime(tbuf, sizeof(tbuf), "[%H:%M] ", localtime(&when));
           } else if (diff < 518400L) {        /* Within 6 days [day hh:mm] */
-            strftime(tbuf, sizeof(tbuf), "%a %H:%M", localtime(&when));
+            strftime(tbuf, sizeof(tbuf), "[%a %H:%M] ", localtime(&when));
           } else if (diff < 25920000L) {      /* Within 300 days [d mon] */
-            strftime(tbuf, sizeof(tbuf), "%d %b", localtime(&when));
+            strftime(tbuf, sizeof(tbuf), "[%d %b] ", localtime(&when));
           } else {                            /* Otherwise [d mon yyyy] */
-            strftime(tbuf, sizeof(tbuf), "%d %b %Y", localtime(&when));
+            strftime(tbuf, sizeof(tbuf), "[%d %b %Y] ", localtime(&when));
           }
         } else {
           strftime(tbuf, sizeof(tbuf), LOG_TIME_FORMAT, localtime(&when));
@@ -988,15 +988,15 @@
       
         /* Send the line */
       if (event == IRC_LOG_MSG) {
-        net_send(p->client_sock, ":%s PRIVMSG %s :[%s] %s\r\n", frm, to, tbuf, msg);
+        net_send(p->client_sock, ":%s PRIVMSG %s :%s%s\r\n", frm, to, tbuf, msg);
       } else if (event == IRC_LOG_ACTION) {
-        net_send(p->client_sock, ":%s PRIVMSG %s :\001ACTION [%s] %s\001\r\n", frm, to, tbuf, msg);
+        net_send(p->client_sock, ":%s PRIVMSG %s :\001ACTION %s%s\001\r\n", frm, to, tbuf, msg);
       } else if (event == IRC_LOG_CTCP) {
-        net_send(p->client_sock, ":%s PRIVMSG %s :\001%s [%s]%s%s\001\r\n", src, to, eventtext, tbuf, (strlen(msg) ? " " : ""), msg);
+        net_send(p->client_sock, ":%s PRIVMSG %s :\001%s %s%s%s\001\r\n", src, to, eventtext, tbuf, (strlen(msg) ? " " : ""), msg);
       } else if (event == IRC_LOG_NOTICE) {
         ircclient_send_notice(p, "%s", msg);
       } else {
-        net_send(p->client_sock, ":%s PRIVMSG %s :[%s] %s\r\n", src, to, tbuf, msg);
+        net_send(p->client_sock, ":%s PRIVMSG %s :%s%s\r\n", src, to, tbuf, msg);
       }
 
       free(ll);
