Index: cicb/.cvsignore
diff -u /dev/null cicb/.cvsignore:1.1
--- /dev/null	Mon Jul 11 22:54:53 2005
+++ cicb/.cvsignore	Thu Dec 27 09:27:22 2001
@@ -0,0 +1,5 @@
+config.log
+config.h
+config.cache
+config.status
+stamp-h
Index: cicb/ChangeLog.arctic.org
diff -u /dev/null cicb/ChangeLog.arctic.org:1.3
--- /dev/null	Mon Jul 11 22:54:53 2005
+++ cicb/ChangeLog.arctic.org	Mon Jul 11 22:52:45 2005
@@ -0,0 +1,16 @@
+Mon Jul 11 22:51:35 2005  dean gaudet <dean@arctic.org>
+
+	* change the defaults to something sane...
+	* allow sekret login id override with CICB_LOGINID env var
+
+Thu Dec 27 09:29:38 2001  dean gaudet <dean@arctic.org>
+
+	* original sources can be found at
+	<http://www.obfuscation.org/ftp/pub/icb/>
+	* also of interest <http://www.icb.net/>
+
+	* the dg1 level of this patch includes the following changes
+	over 5.1.0:
+	  - tweak of timestamp format to HH:MM
+	  - all lines are timestamped instead of just chat messages
+	  - format output to screen width, and handle screen width changes
Index: cicb/icb/.cvsignore
diff -u /dev/null cicb/icb/.cvsignore:1.1
--- /dev/null	Mon Jul 11 22:54:53 2005
+++ cicb/icb/.cvsignore	Thu Dec 27 09:27:22 2001
@@ -0,0 +1,2 @@
+Makefile
+icb
Index: cicb/icb/c_time.c
diff -u cicb/icb/c_time.c:1.1.1.1 cicb/icb/c_time.c:1.2
--- cicb/icb/c_time.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/c_time.c	Wed Feb 21 23:06:15 2001
@@ -192,7 +192,7 @@
 	now = localtime(&t);
 
 	sprintf(tsbuf,
-		"%s[%02d:%02d]%s ",
+		"%s%02d:%02d%s ",
 		printcolor(ColTIMESTAMP, ColSANE),
 		now->tm_hour, 
 		now->tm_min,
Index: cicb/icb/defprocs.c
diff -u cicb/icb/defprocs.c:1.1.1.1 cicb/icb/defprocs.c:1.2
--- cicb/icb/defprocs.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/defprocs.c	Mon Jul 11 22:52:49 2005
@@ -7,7 +7,11 @@
 
 char *defprocs[] = 
 {
-	"oset pagesize -1",
+	"oset tabreply 1",
+	"oset logreplay 1",
+	"oset pagesize 0",
+	"oset timestamp 1",
+	"oset asyncread 1",
 	"c_usage add ! g \"\\[command\\]\" \"shell out or run a unix command\"",
 	"c_usage add m g \"\\[-permanent\\] \\[-clear\\] nick message\" \"send a personal message\"",
 	"c_usage add tcl g \"tcl command\" \"pass command to tcl without quoting\"",
Index: cicb/icb/externs.h
diff -u cicb/icb/externs.h:1.1.1.1 cicb/icb/externs.h:1.2
--- cicb/icb/externs.h:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/externs.h	Wed Feb 21 23:06:15 2001
@@ -46,3 +46,5 @@
 extern int last_command_was_kill;
 
 extern struct COLORTABLE colortable[];
+
+extern unsigned window_columns;	/* number of columns in the window */
Index: cicb/icb/globals.c
diff -u cicb/icb/globals.c:1.1.1.1 cicb/icb/globals.c:1.3
--- cicb/icb/globals.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/globals.c	Mon Jul 11 22:52:49 2005
@@ -56,7 +56,7 @@
 	"normal",	/* timedisplay */
 	1,		/* beeps */
 	"vi",		/* editmode */
-	0,		/* tabreply */
+	1,		/* tabreply */
 	1, 		/* cute */
 	0,		/* autodel */
 	"",		/* personalto */
@@ -94,3 +94,6 @@
 	{ "\x1b[0m", 0 },	/* persfromhilite : personal from hilite */
 	{ "\x1b[0m", 0 },	/* timestamp : message timestamp */
 };
+
+
+unsigned window_columns = 80;	/* number of columns in the window */
Index: cicb/icb/helpdata.c
diff -u cicb/icb/helpdata.c:1.1.1.1 cicb/icb/helpdata.c:1.2
--- cicb/icb/helpdata.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/helpdata.c	Mon Jul 11 22:52:49 2005
@@ -621,7 +621,7 @@
 "    read or write files. It makes it icb reasonably secure for use as",
 "    a shell.",
 "",
-"tabreply	(boolean)		default: false",
+"tabreply	(boolean)		default: true",
 "",
 "    If false, only people you /m will be added to the <tab> history."
 "    If true, people who sent you personal messages will be added too.",
Index: cicb/icb/oset.c
diff -u cicb/icb/oset.c:1.1.1.1 cicb/icb/oset.c:1.2
--- cicb/icb/oset.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/oset.c	Mon Jul 11 22:52:49 2005
@@ -190,7 +190,7 @@
 		gv.pagesize = 500;
 	else if (gv.pagesize < -500)
 		gv.pagesize = -500;
-	else if (gv.pagesize == -1)
+	else if (gv.pagesize <= 0)
 		getwinsize();
 
 	if (gv.bufferlines > 5000)
Index: cicb/icb/print.c
diff -u cicb/icb/print.c:1.1.1.1 cicb/icb/print.c:1.2
--- cicb/icb/print.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/print.c	Wed Feb 21 23:06:15 2001
@@ -75,7 +75,7 @@
 		}
 
 		/* write to the screen */
-		if (gv.timestamp && (flags & PL_TS))
+		if (gv.timestamp)
 			write(1, timestamp, strlen(timestamp));
 		write(1, s, strlen(s));
 		write(1, "\r\n", 2);
@@ -83,7 +83,7 @@
 
 	/* put line into session log */
 	if ((flags & PL_LOG) && logfp != NULL) {
-		if (gv.timestamp && (flags & PL_TS))
+		if (gv.timestamp)
 			fputs(timestamp, logfp);
 		fputs(s, logfp);
 		putc('\n', logfp);
Index: cicb/icb/protocol.h
diff -u cicb/icb/protocol.h:1.1.1.1 cicb/icb/protocol.h:1.2
--- cicb/icb/protocol.h:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/protocol.h	Wed Feb 21 23:06:15 2001
@@ -15,7 +15,6 @@
 #define MAX_NOPONG	600	/* seconds a client may not PONG a PING */
 #define MAX_PASSWDLEN	12	/* chars in a user password */
 #define MAX_REALLEN	64	/* chars in a real life name */
-#define MAX_TEXTLEN	(80 - MAX_NICKLEN - 5) 	/* max chars in a message */
 #define MAX_TOPICLEN	32	/* chars in a group topic */
 #define MAX_IDLE	3600	/* maximum idle seconds before disconnect */
 
Index: cicb/icb/strings.c
diff -u cicb/icb/strings.c:1.1.1.1 cicb/icb/strings.c:1.2
--- cicb/icb/strings.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/strings.c	Wed Feb 21 23:06:15 2001
@@ -175,6 +175,15 @@
 	int count = 0;
 	char *p, *lastw;
 	char tmp1, tmp2;
+	unsigned break_at;
+
+	/* the 4 accounts for the "<" and "> " around the nick, and a
+	 * space at the end of the line.
+	 */
+	break_at = window_columns - strlen(from) - 4;
+	if (gv.timestamp) {
+		break_at -= 6;
+	}
 
 	/* traverse s and try to break on a word */
 	p = s;
@@ -193,8 +202,8 @@
 			lastw = p;
 
 		/* break line if we are at max length */
-		if (count == (MAX_TEXTLEN - 1)) {
-			if ((p - lastw) > 40) {
+		if (count == break_at) {
+			if ((p - lastw) > break_at/2) {
 				/* have to break in the middle of a word */
 				tmp1 = *(p - 1);
 				tmp2 = *p;
Index: cicb/icb/unix.c
diff -u cicb/icb/unix.c:1.1.1.1 cicb/icb/unix.c:1.3
--- cicb/icb/unix.c:1.1.1.1	Wed Feb 21 23:05:11 2001
+++ cicb/icb/unix.c	Mon Jul 11 22:52:49 2005
@@ -31,20 +31,30 @@
 void
 getwinsize()
 {
+#ifndef TIOCGWINSZ
 	if (gv.pagesize < 0)
-	{
-#ifdef TIOCGWINSZ
-		struct winsize win;
-		if (ioctl (0, TIOCGWINSZ, &win) == 0) {
+		gv.pagesize = -24;
+#else
+	struct winsize win;
+
+	if (ioctl (0, TIOCGWINSZ, &win) == 0) {
+		if (gv.pagesize < 0) {
 			if (win.ws_row > 0)
 				gv.pagesize = -win.ws_row;
 			else
 				gv.pagesize = 0;
-			return;
 		}
-#endif
+		if (win.ws_col > 0) {
+			window_columns = win.ws_col;
+		}
+		else {
+			window_columns = 80;
+		}
+	}
+	else if (gv.pagesize < 0) {
 		gv.pagesize = -24;
 	}
+#endif
 }
 
 
@@ -57,6 +67,9 @@
 	char *loginid;
 	struct passwd *pw;
 
+	if ((loginid = getenv("CICB_LOGINID"))) {
+		return loginid;
+	}
 	if (((loginid = getlogin()) == NULL) || *loginid == '\0') {
 		if ((pw = getpwuid(getuid())) == NULL)
 			loginid = NULL;
Index: cicb/murgil/.cvsignore
diff -u /dev/null cicb/murgil/.cvsignore:1.1
--- /dev/null	Mon Jul 11 22:54:53 2005
+++ cicb/murgil/.cvsignore	Thu Dec 27 09:27:22 2001
@@ -0,0 +1 @@
+Makefile
