Index: Makefile.in
===================================================================
RCS file: /home/cvs/csircd-xymox/Makefile.in,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- Makefile.in	7 May 2002 03:05:43 -0000	1.1.1.1
+++ Makefile.in	12 May 2002 01:31:01 -0000	1.3
@@ -24,7 +24,7 @@
 CC=gcc
 #PROFIL=-pg
 #PROFILLIBS=-ldl
-CFLAGS=-Iinclude -g -Wall ${PROFIL} ${CFLAGS.$@}
+CFLAGS=-Iinclude -g -W -Wall -Wshadow -DPREFIX=\"@prefix@\" ${PROFIL} ${CFLAGS.$@}
 # -DFD_SETSIZE=8192
 LFLAGS=${LFLAGS.$@}
 
@@ -93,6 +93,9 @@
 -lnsl:
 
 -lcrypt:
+
+install: all
+	cp ${PROGS} ${UTILS} @IRCDSO@ @prefix@/
 
 -lsocket:
 
Index: configure
===================================================================
RCS file: /home/cvs/csircd-xymox/configure,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- configure	7 May 2002 03:05:43 -0000	1.1.1.1
+++ configure	7 May 2002 04:00:28 -0000	1.2
@@ -9,7 +9,7 @@
 
 # Defaults:
 ac_help=
-ac_default_prefix=/usr/local
+ac_default_prefix=/usr/local/csircd
 # Any additions from configure.in:
 
 # Initialize some variables set by options.
Index: confparse/Makefile
===================================================================
RCS file: /home/cvs/csircd-xymox/confparse/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- confparse/Makefile	7 May 2002 03:05:50 -0000	1.1.1.1
+++ confparse/Makefile	7 May 2002 03:11:45 -0000	1.2
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -g
+CFLAGS=-I../include -Wall -g
 
 ALL=libconfigparse.a conftest
 
@@ -13,8 +13,8 @@
 configparse.o:	configparse.c configparse.h
 	${CC} ${CFLAGS} -c configparse.c -o configparse.o
 
-conftest:	libconfigparse.a conftest.c
-	${CC} ${CFLAGS} -o conftest conftest.c -L. -lconfigparse
+conftest:	libconfigparse.a conftest.c ../lib/match.o ../lib/support.o
+	${CC} ${CFLAGS} -o conftest conftest.c -L. -lconfigparse ../lib/match.o ../lib/support.o
 
 clean:
 	rm -f ${ALL} *.o
Index: confparse/configparse.c
===================================================================
RCS file: /home/cvs/csircd-xymox/confparse/configparse.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- confparse/configparse.c	7 May 2002 03:05:50 -0000	1.1.1.1
+++ confparse/configparse.c	7 May 2002 03:11:47 -0000	1.2
@@ -32,6 +32,8 @@
 static CONFIGFILE *config_parse(char *filename, char *confdata);
 static void config_entry_free(CONFIGENTRY *ceptr);
 
+int doing_conf_test;
+
 static void config_error(char *format, ...)
 {
 	va_list		ap;
@@ -43,7 +45,10 @@
 	va_end(ap);
 	if ((ptr = strchr(buffer, '\n')) != NULL)
 		*ptr = '\0';
-	syslog(LOG_NOTICE, "%s", buffer);
+	if (doing_conf_test)
+		fprintf(stderr, "conftest: %s\n", buffer);
+	else
+		syslog(LOG_NOTICE, "%s", buffer);
 }
 
 static CONFIGFILE *config_parse(char *filename, char *confdata)
Index: confparse/conftest.c
===================================================================
RCS file: /home/cvs/csircd-xymox/confparse/conftest.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- confparse/conftest.c	7 May 2002 03:05:50 -0000	1.1.1.1
+++ confparse/conftest.c	7 May 2002 03:11:47 -0000	1.2
@@ -31,6 +31,8 @@
 static void conftest_entry_print(CONFIGENTRY *ce, int deep);
 static void conftest_print(CONFIGFILE *cfptr);
 
+extern int doing_conf_test;
+
 static void conftest_entry_print(CONFIGENTRY *ce, int deep)
 {
 	int num = 0;
@@ -75,6 +77,7 @@
 		exit(-1);
 	}
 
+	doing_conf_test = 1;
 	cfptr = config_load(argv[1]);
 
 	if (cfptr)
Index: docs/example.conf
===================================================================
RCS file: /home/cvs/csircd-xymox/docs/example.conf,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- docs/example.conf	7 May 2002 03:05:48 -0000	1.1.1.1
+++ docs/example.conf	8 May 2002 00:28:01 -0000	1.2
@@ -197,7 +197,7 @@
 		autoconn;	/* Auto-connect to this server */
 		hidehostname;	/* Hide the true ip of the remote server */
 	};
-}
+};
 
 link efnet.rcn.com {
 	username ircd;		/* Username of the remote server */
@@ -208,7 +208,7 @@
 	class servers;		/* The connection class for the remote server */
 	leaf *;			/* Specify remote server is a leaf for "*" */
 	flag autoconn;		/* Auto-connect to this server */
-}
+};
 
 
 
Index: include/access.h
===================================================================
RCS file: /home/cvs/csircd-xymox/include/access.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- include/access.h	7 May 2002 03:05:51 -0000	1.1.1.1
+++ include/access.h	12 May 2002 01:31:30 -0000	1.2
@@ -72,13 +72,13 @@
 	CONFHOSTIPENTRY		*conf_all; /* ->ch_next */
 };
 
-int access_init(ACCESS *access);
-int access_match_hostname(ACCESS *access, char *username, char *hostname, u_int flags, CONFHOSTIPENTRY **entryptr);
-int access_match_ipaddr(ACCESS *access, char *username, char *ipstring, ircd_uint32_t ipaddr, u_int flags, CONFHOSTIPENTRY **entryptr);
-int access_match_ipaddr_default(ACCESS *access, char *username, char *ipstring, ircd_uint32_t ipaddr, u_int flags, CONFHOSTIPENTRY **entryptr);
-int access_add(ACCESS *access, char *username, char *hostname, char *ipstring, char *class, char *data, int expires, u_int flags, int aflags, CONFHOSTIPENTRY **existptr, char *comment);
-int access_clear(ACCESS *access, u_int flags);
-int access_flush(ACCESS *access, u_int flags);
-int access_del(ACCESS *access, CONFHOSTIPENTRY *chentry, u_int flags);
+int access_init(ACCESS *);
+int access_match_hostname(ACCESS *, char *, char *, u_int, CONFHOSTIPENTRY **);
+int access_match_ipaddr(ACCESS *, char *, char *, ircd_uint32_t, u_int, CONFHOSTIPENTRY **);
+int access_match_ipaddr_default(ACCESS *, char *, char *, ircd_uint32_t, u_int, CONFHOSTIPENTRY **);
+int access_add(ACCESS *, char *, char *, char *, char *, char *, int, u_int, int, CONFHOSTIPENTRY **, char *);
+int access_clear(ACCESS *, u_int);
+int access_flush(ACCESS *, u_int);
+int access_del(ACCESS *, CONFHOSTIPENTRY *, u_int);
 
 #endif
Index: include/commands.h
===================================================================
RCS file: /home/cvs/csircd-xymox/include/commands.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- include/commands.h	7 May 2002 03:05:53 -0000	1.1.1.1
+++ include/commands.h	7 May 2002 04:00:42 -0000	1.2
@@ -44,6 +44,7 @@
 int m_trace(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
 int m_notice(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
 int m_join(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
+int m_eob(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
 int m_part(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
 int m_lusers(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
 int m_motd(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args);
Index: include/config.h
===================================================================
RCS file: /home/cvs/csircd-xymox/include/config.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- include/config.h	7 May 2002 03:05:52 -0000	1.1.1.1
+++ include/config.h	7 May 2002 04:00:43 -0000	1.2
@@ -41,5 +41,8 @@
 /* max size of a class name */
 #define MAXCLASSNAME        20
 
+#ifndef PREFIX
+#define PREFIX "/usr/local/csircd"
+#endif
 
 #endif
Index: include/structs.h
===================================================================
RCS file: /home/cvs/csircd-xymox/include/structs.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- include/structs.h	7 May 2002 03:05:51 -0000	1.1.1.1
+++ include/structs.h	7 May 2002 04:00:43 -0000	1.2
@@ -460,8 +460,9 @@
 
 #define IRCD_CAPAB_VALUE_IPADDR			0x001
 #define IRCD_CAPAB_VALUE_ZIP			0x002
-#define IRCD_CAPAB_VALUE_NOQUITSTORM	0x004
+#define IRCD_CAPAB_VALUE_NOQUITSTORM		0x004
 #define IRCD_CAPAB_VALUE_EMODE			0x008
+#define IRCD_CAPAB_VALUE_EOB			0x010
 
 #define IsCapable(__x, __y)	((__x)->c_capab_flags & (__y))
 	int				c_capab_flags;
Index: include/version.h
===================================================================
RCS file: /home/cvs/csircd-xymox/include/version.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- include/version.h	7 May 2002 03:05:53 -0000	1.1.1.1
+++ include/version.h	7 May 2002 03:11:58 -0000	1.2
@@ -1,7 +1,9 @@
 #ifndef __VERSION_H__
 #define __VERSION_H__
 
-#define VERSIONSTRING "2.8/csircd-1.13"
+#define	BASEVERSION "2.8/csircd-1.13"
+
+#define VERSIONSTRING BASEVERSION "+xymox"
 
 #ifdef CONCENTRIC
 #define VERSION VERSIONSTRING "+cnc"
Index: lib/access.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/access.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- lib/access.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/access.c	12 May 2002 01:31:36 -0000	1.3
@@ -23,7 +23,7 @@
 #include "access.h"
 #include "cidr.h"
 
-RCSID("$Id: access.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: access.c,v 1.3 2002/05/12 01:31:36 jmallett Exp $");
 
 typedef struct _findstruct	FINDSTRUCT;
 struct _findstruct
@@ -36,54 +36,54 @@
 
 static char	_conf_empty[] = "";
 
-static int _access_sortable(char *hostname);
-static char *_access_reverse(char *hostname);
-static void _access_entry_free(CONFHOSTIPENTRY *entry);
-
-static int _access_add_host_linear(CONFENTRY *ce,
-		CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
-static int _access_add_host_recurs(CONFENTRY *ce,
-		CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
-static int _access_add_host(ACCESS *access,
-			CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
-
-static int _access_match_host_linear(FINDSTRUCT *findstruct, char *pattern,
-		CONFHOSTIPENTRY **entryptr, u_int flags, int *num_matched);
-static int _access_match_host(FINDSTRUCT *findstruct, char *pattern,
-		CONFHOSTIPENTRY **entryptr, u_int flags, int *num_matched);
+static int _access_sortable(char *);
+static char *_access_reverse(char *);
+static void _access_entry_free(CONFHOSTIPENTRY *);
+
+static int _access_add_host_linear(CONFENTRY *,
+		CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
+static int _access_add_host_recurs(CONFENTRY *,
+		CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
+static int _access_add_host(ACCESS *,
+			CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
+
+static int _access_match_host_linear(FINDSTRUCT *, char *,
+		CONFHOSTIPENTRY **, u_int, int *);
+static int _access_match_host(FINDSTRUCT *, char *,
+		CONFHOSTIPENTRY **, u_int, int *);
 
 #if 0
-static int _access_add_ip_linear(CONFENTRY *ce,
-		CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
+static int _access_add_ip_linear(CONFENTRY *,
+		CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
 #endif
-static int _access_add_ip_sorted(CONFENTRY *ce,
-		CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
-static int _access_add_ipaddr(ACCESS *access,
-			CONFHOSTIPENTRY *entry, u_int flags, CONFHOSTIPENTRY **existptr);
+static int _access_add_ip_sorted(CONFENTRY *,
+		CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
+static int _access_add_ipaddr(ACCESS *,
+			CONFHOSTIPENTRY *, u_int, CONFHOSTIPENTRY **);
 
 #if 0
-static int _access_match_ip_linear(FINDSTRUCT *findstruct,
-	char *ipstring, CONFHOSTIPENTRY **entryptr, u_int flags, int *num_matched);
+static int _access_match_ip_linear(FINDSTRUCT *,
+	char *, CONFHOSTIPENTRY **, u_int, int *);
 #endif
-static int _access_match_ip(FINDSTRUCT *findstruct, ircd_uint32_t ipaddr,
-		CONFHOSTIPENTRY **entryptr, u_int flags);
+static int _access_match_ip(FINDSTRUCT *, ircd_uint32_t,
+		CONFHOSTIPENTRY **, u_int);
 
-static void _access_clear_host_linear(ACCESS *access, CONFENTRY *ce, u_int flags);
-static void _access_clear_host_sorted(ACCESS *access, CONFENTRY *ce, u_int flags);
+static void _access_clear_host_linear(ACCESS *, CONFENTRY *, u_int);
+static void _access_clear_host_sorted(ACCESS *, CONFENTRY *, u_int);
 #if 0
-static void _access_clear_ip_linear(ACCESS *access, CONFENTRY *ce, u_int flags);
+static void _access_clear_ip_linear(ACCESS *, CONFENTRY *, u_int);
 #endif
-static void _access_clear_ip_sorted(ACCESS *access, CONFENTRY *ce, u_int flags);
+static void _access_clear_ip_sorted(ACCESS *, CONFENTRY *, u_int);
 
-static void _access_flush_host_linear(ACCESS *access, CONFENTRY *ce, CONFHOSTIPENTRY *chentry, u_int flags);
-static void _access_flush_host_sorted(ACCESS *access, CONFENTRY *ce, CONFHOSTIPENTRY *chentry, u_int flags);
+static void _access_flush_host_linear(ACCESS *, CONFENTRY *, CONFHOSTIPENTRY *, u_int);
+static void _access_flush_host_sorted(ACCESS *, CONFENTRY *, CONFHOSTIPENTRY *, u_int);
 #if 0
-static void _access_flush_ip_linear(ACCESS *access, CONFENTRY *ce, CONFHOSTIPENTRY *chentry, u_int flags);
+static void _access_flush_ip_linear(ACCESS *, CONFENTRY *, CONFHOSTIPENTRY *, u_int);
 #endif
-static void _access_flush_ip_sorted(ACCESS *access, CONFENTRY *ce, CONFHOSTIPENTRY *chentry, u_int flags);
+static void _access_flush_ip_sorted(ACCESS *, CONFENTRY *, CONFHOSTIPENTRY *, u_int);
 
-static void _access_add_to_list(CONFHOSTIPENTRY **bucket, CONFHOSTIPENTRY *entry);
-static void _access_del_from_list(CONFHOSTIPENTRY **bucket, CONFHOSTIPENTRY *entry);
+static void _access_add_to_list(CONFHOSTIPENTRY **, CONFHOSTIPENTRY *entry);
+static void _access_del_from_list(CONFHOSTIPENTRY **, CONFHOSTIPENTRY *entry);
 
 
 /*
Index: lib/cidr.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/cidr.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 cidr.c
--- lib/cidr.c	7 May 2002 03:05:45 -0000	1.1.1.1
+++ lib/cidr.c	12 May 2002 01:36:56 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "cidr.h"
 
-RCSID("$Id: cidr.c,v 1.1.1.1 2002/05/07 03:05:45 jmallett Exp $");
+RCSID("$Id: cidr.c,v 1.2 2002/05/07 03:13:10 jmallett Exp $");
 
 /*
 ** i dunno...is this quicker than 0xffffffff << (32-prefix_length) ?
Index: lib/commands.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/commands.c,v
retrieving revision 1.1.1.1
retrieving revision 1.11
diff -u -r1.1.1.1 -r1.11
--- lib/commands.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/commands.c	12 May 2002 01:46:27 -0000	1.11
@@ -24,7 +24,7 @@
 #include "commands.h"
 #include "../confparse/configparse.h"
 
-RCSID("$Id: commands.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: commands.c,v 1.11 2002/05/12 01:46:27 jmallett Exp $");
 
 
 #ifdef TS5
@@ -176,6 +176,7 @@
 	{ IRCD_CAPAB_VALUE_EMODE,		"EX",		0 },
 #endif
 	{ IRCD_CAPAB_VALUE_NOQUITSTORM,	"QS",		0 },
+	{ IRCD_CAPAB_VALUE_EOB,		"EOB",		0 },
 	{ 0, NULL, 0 }
 };
 
@@ -297,8 +298,15 @@
 				case	-1: /* no auth */
 					sprintf(exitbuf, "No authorization: %i", err);
 					break;
-				case	-2: /* no auth */
-					sprintf(exitbuf, "Class error: %i", err);
+				case	-2:
+					/*
+					 * The client is bound to a class which
+					 * does not exist, either by allow or
+					 * deny.
+					 * confparse should catch this at parse
+					 * time.
+					 */
+					sprintf(exitbuf, "Client allowed only for an undefined class");
 					break;
 				case	-3: /* class full */
 					strcpy(exitbuf, "Class is full");
@@ -2740,6 +2748,13 @@
 	IRCD_CLASSENTRY	*classptr;
 	int				ret;
 
+	if (IsReg(lptr) && !IsServer(lptr))
+	{
+		send_prefix_to_client(meptr, pptr, IRCD_REPLY(ERR_ALREADYREGISTRED,
+				lptr->name));
+		return 3;
+	}
+
 	if (!servername)
 	{
 		client_del(meptr, lptr, "No servername");
@@ -2750,13 +2765,10 @@
 		serverinfo = hopcount;
 		hopcount = NULL;
 	}
-	if (!(lptr->c_flags & CLIENT_FLAGS_SCONNECT)
-			&& !IsServer(lptr) &&
-					(*lptr->name || (lptr->c_flags & CLIENT_FLAGS_GOTUSER)))
-	{
-		if (*lptr->name)
-			send_prefix_to_client(meptr, lptr, IRCD_REPLY(ERR_ALREADYREGISTRED,
-					lptr->name));
+	if (!(lptr->c_flags & CLIENT_FLAGS_SCONNECT) && (&lptr->name != '\0'))
+	{
+		send_prefix_to_client(meptr, lptr, IRCD_REPLY(ERR_ALREADYREGISTRED,
+				lptr->name));
 		return 3;
 	}
 	else
@@ -2862,10 +2874,14 @@
 			send_prefix_to_client(pptr, bcptr, "SERVER %s %d :%s",
 					acptr->name, hc+1, acptr->ircname);
 		}
-		Globalinfo->g_serversbursting++;
-		CliSetSentEOB(acptr);
-		send_prefix_to_client(meptr, acptr, "PING %s :%s",
+		if (IsLocal(acptr)) {
+			if (IsCapable(acptr, IRCD_CAPAB_VALUE_EOB))
+				send_prefix_to_client(meptr, acptr, "EOB");
+			Globalinfo->g_serversbursting++;
+			CliSetSentEOB(acptr);
+			send_prefix_to_client(meptr, acptr, "PING %s :%s",
 						meptr->name, acptr->name);
+		}
 		send_to_flag(CLIENT_NFLAGS_CONNECTS, NULL,
 			"Server %s[%s] being introduced by %s",
 				acptr->name, acptr->ircname, pptr->name);
@@ -3107,11 +3123,12 @@
                     _sendnick(lptr, acptr);
             }
 		}
-
-		Globalinfo->g_serversbursting++;
-        CliSetSentEOB(lptr);
-		send_prefix_to_client(meptr, lptr, "PING %s :%s",
+		if (IsLocal(lptr)) {
+			Globalinfo->g_serversbursting++;
+			CliSetSentEOB(lptr);
+			send_prefix_to_client(meptr, lptr, "PING %s :%s",
 						meptr->name, lptr->name);
+		}
 	}
 
 #if 0
@@ -4875,6 +4892,17 @@
 	return 3;
 }
 
+int m_eob(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args)
+{
+	if (!IsServer(lptr))
+		return 3;
+	if (CliSentEOB(pptr) && !CliGotEOB(pptr)) {
+		Globalinfo->g_serversbursting--;
+		CliSetGotEOB(pptr);
+	}
+	return 3;
+}
+
 int m_oper(IRCD_CLIENT *lptr, IRCD_CLIENT *pptr, char *prefix, char *args)
 {
 	char	*name = ircd_nextarg(&args, 0);
@@ -5545,6 +5573,9 @@
 			}
 		}
 		flag = 0;
+		if (IsAnOper(pptr))
+			flag |= CHANNEL_MODES_CHANOP;
+
 		chptr = hash_find_channel(name);
 		if (!chptr)
 		{
@@ -5610,19 +5641,15 @@
 
 		if (*name != '&')
 		{
-			if (IsClient(lptr) && (flag & CHANNEL_MODES_CHANOP))
+			if (IsClient(lptr) && ((IsLocal(lptr) && IsAnOper(pptr)) ||
+				(flag & CHANNEL_MODES_CHANOP) != 0))
 			{
 				send_to_servers(NULL, ":%s SJOIN %u %s + :@%s",
 					meptr->name, chptr->creation, name, pptr->name);
 			}
-			else if (IsClient(lptr))
-				send_to_servers(NULL, ":%s SJOIN %u %s + :%s",
-					meptr->name, chptr->creation, name, pptr->name);
 			else
-			{
-				/* this won't happen with all TS servers */
-				send_to_servers(lptr, ":%s JOIN :%s", pptr->name, name);
-			}
+				send_to_servers(NULL, ":%s SJOIN %u %s + :%s",
+					meptr->name, Now, name, pptr->name);
 		}
 
 		send_to_channel_butone(NULL,
@@ -5724,7 +5751,7 @@
 {
 	char	*pattern;
 
-	if (!IsServer(lptr) && !IsReg(pptr))
+	if (!IsReg(pptr))
 	{
 		send_prefix_to_client(meptr, pptr, IRCD_REPLY(ERR_NOTREGISTERED, NULL));
 		return 3;
@@ -7492,10 +7519,10 @@
 	if (!reason || !*reason)
 		reason = "No reason specified";
 
-	if (strlen(reason) > 200)
+	if (index(reason, '\0') > reason+200)
 		reason[200] = '\0';
 
-	if (!match(user, ".....") && !match(host, "...ba.."))
+	if (!match(user, "....."))
 	{
 		send_prefix_to_client(meptr, pptr, "NOTICE %s : Can't K-Line *@*",
 			pptr->name);
Index: lib/conf.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/conf.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 conf.c
--- lib/conf.c	7 May 2002 03:05:45 -0000	1.1.1.1
+++ lib/conf.c	12 May 2002 01:36:57 -0000
@@ -26,7 +26,7 @@
 #include "commands.h"
 #include "access.h"
 
-RCSID("$Id: conf.c,v 1.1.1.1 2002/05/07 03:05:45 jmallett Exp $");
+RCSID("$Id: conf.c,v 1.2 2002/05/07 03:13:13 jmallett Exp $");
 
 #define IRCDCONF_DEFAULT_SENDQ			100000
 #define IRCDCONF_DEFAULT_PINGFREQ		120
Index: lib/fdlist.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/fdlist.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fdlist.c
--- lib/fdlist.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/fdlist.c	12 May 2002 01:36:58 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "fdlist.h"
 
-RCSID("$Id: fdlist.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: fdlist.c,v 1.2 2002/05/07 03:13:15 jmallett Exp $");
 
 int fdlist_add_fd(FDLIST *fdlist, int fd, int flags)
 {
Index: lib/fileio.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/fileio.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fileio.c
--- lib/fileio.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/fileio.c	12 May 2002 01:36:58 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "fileio.h"
 
-RCSID("$Id: fileio.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: fileio.c,v 1.4 2002/05/11 00:29:47 jmallett Exp $");
 
 static int fbfill(aFileBuf *fb);
 
Index: lib/hash.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/hash.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 hash.c
--- lib/hash.c	7 May 2002 03:05:45 -0000	1.1.1.1
+++ lib/hash.c	12 May 2002 01:36:58 -0000
@@ -22,7 +22,7 @@
 #include "ircd_includes.h"
 #include "hash.h"
 
-RCSID("$Id: hash.c,v 1.1.1.1 2002/05/07 03:05:45 jmallett Exp $");
+RCSID("$Id: hash.c,v 1.2 2002/05/07 03:13:16 jmallett Exp $");
 
 static IRCD_CLIENT		**CLIENT_HASH;
 static IRCD_CHANNEL		**CHANNEL_HASH;
Index: lib/iphash.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/iphash.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 iphash.c
--- lib/iphash.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/iphash.c	12 May 2002 01:36:59 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "iphash.h"
 
-RCSID("$Id: iphash.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: iphash.c,v 1.2 2002/05/07 03:13:16 jmallett Exp $");
 
 static IRCD_NETHASH *Clones = NULL;
 static IRCD_NETHASH	*Throttles = NULL;
Index: lib/ircd.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/ircd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- lib/ircd.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/ircd.c	12 May 2002 01:17:47 -0000	1.3
@@ -24,7 +24,7 @@
 #include "commands.h"
 #include <arpa/nameser.h>
 
-RCSID("$Id: ircd.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: ircd.c,v 1.3 2002/05/12 01:17:47 jmallett Exp $");
 
 
 typedef struct _ircd_data	IRCD_DATA;
@@ -94,44 +94,44 @@
 	void			*throttles;
 };
 
-int				Auths_did_delete = 0;
-int				Flooders_did_delete = 0;
+int				Auths_did_delete;
+int				Flooders_did_delete;
 int				Fdlist_num = 100;
-char			*Conffile;
+char				*Conffile;
 int				ircd_pagesize;
-FDLIST			*Fdlist_main;
-static FDLIST	*Fdlist_clients;
-static int		*Fdlist_lasttime;
+FDLIST				*Fdlist_main;
+static FDLIST			*Fdlist_clients;
+static int			*Fdlist_lasttime;
 int				Fds_size;
-IRCD_CONN		**Fds;				/* for easy fd -> client lookup */
-IRCDRES_REQLIST	*Reqlist = NULL;
-IRCD_CLIENT		*Locals = NULL;			/* local clients */
-IRCD_AUTH		*Auths = NULL;
-IRCD_CLIENT		**Clients = NULL;
-IRCD_CLIENT		**Opers = NULL;
-IRCD_CLIENT		**Servers = NULL;
-IRCD_CLIENT		**Flooders = NULL;
-IRCD_CHANNEL	*Channels = NULL;
-GLOBALSTATS		*Globalinfo;
-IRCD_REJECTHOLD	*Rejectholds = NULL;
-IRCD_MOTD		*Motd = NULL;
-int				Sendbuffersize = 0;
-int				Recvbuffersize = 0;
-unsigned int	*Sentalong;
-unsigned int	Sentalong_marker;
-unsigned int	*Sentalong_end;
+IRCD_CONN			**Fds;				/* for easy fd -> client lookup */
+IRCDRES_REQLIST			*Reqlist = NULL;
+IRCD_CLIENT			*Locals = NULL;			/* local clients */
+IRCD_AUTH			*Auths = NULL;
+IRCD_CLIENT			**Clients = NULL;
+IRCD_CLIENT			**Opers = NULL;
+IRCD_CLIENT			**Servers = NULL;
+IRCD_CLIENT			**Flooders = NULL;
+IRCD_CHANNEL			*Channels = NULL;
+GLOBALSTATS			*Globalinfo;
+IRCD_REJECTHOLD			*Rejectholds = NULL;
+IRCD_MOTD			*Motd = NULL;
+int				Sendbuffersize;
+int				Recvbuffersize;
+unsigned int			*Sentalong;
+unsigned int			Sentalong_marker;
+unsigned int			*Sentalong_end;
 int				Sentalong_size;
-IRCD_CLIENT		*meptr;
+IRCD_CLIENT			*meptr;
 int				Ircd_zero_fd = -1;
-IRCDCONF		_ircd_conf;
-IRCD_CONN		*Ircd_resconn;
+IRCDCONF			_ircd_conf;
+IRCD_CONN			*Ircd_resconn;
 
 int				Now;
-int				DoRehash = 0;
-char			*RehashWho = NULL;
-int				Rehashed = 0;
-int				Autoconncheck = 0;
-int				DoReload = 0;
+int				DoRehash;
+char				*RehashWho = NULL;
+int				Rehashed;
+int				Autoconncheck;
+int				DoReload;
 
 
 static char		*ircdcore_versionstring;
Index: lib/log.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/log.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 log.c
--- lib/log.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/log.c	12 May 2002 01:36:59 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "log.h"
 
-RCSID("$Id: log.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: log.c,v 1.2 2002/05/07 03:13:18 jmallett Exp $");
 
 static void _log_close(aLog *log);
 
Index: lib/match.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/match.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 match.c
--- lib/match.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/match.c	12 May 2002 01:36:59 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "match.h"
 
-RCSID("$Id: match.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: match.c,v 1.2 2002/05/07 03:13:18 jmallett Exp $");
 
 static int _match(const char *mask, const char *name);
 
Index: lib/misc.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/misc.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 misc.c
--- lib/misc.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/misc.c	12 May 2002 01:36:59 -0000
@@ -24,7 +24,7 @@
 #include "commands.h"
 #include "misc.h"
 
-RCSID("$Id: misc.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: misc.c,v 1.3 2002/05/07 04:01:26 jmallett Exp $");
 
 typedef struct _command			COMMAND;
 
@@ -110,6 +110,7 @@
 	{	"REJECTHOLD",	m_rejecthold	},
 	{	"LOCOPS",	m_locops	},
 	{	"UNKLINE",	m_unkline	},
+	{	"EOB",		m_eob		},
 	{	NULL,		NULL		}
 };
 
Index: lib/mysocket.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/mysocket.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mysocket.c
--- lib/mysocket.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/mysocket.c	12 May 2002 01:37:00 -0000
@@ -23,7 +23,7 @@
 #include "ircd_includes.h"
 #include "mysocket.h"
 
-RCSID("$Id: mysocket.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: mysocket.c,v 1.2 2002/05/07 03:13:20 jmallett Exp $");
 
 int mysocket_set_nonblocking(int fd)
 {
Index: lib/numeric.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/numeric.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 numeric.c
--- lib/numeric.c	7 May 2002 03:05:43 -0000	1.1.1.1
+++ lib/numeric.c	12 May 2002 01:37:00 -0000
@@ -24,7 +24,7 @@
 #include "ircd_includes.h"
 #include "numeric.h"
 
-RCSID("$Id: numeric.c,v 1.1.1.1 2002/05/07 03:05:43 jmallett Exp $");
+RCSID("$Id: numeric.c,v 1.2 2002/05/07 03:13:20 jmallett Exp $");
 
 
 typedef struct _ircd_reply	IRCD_REPLY;
Index: lib/queue.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/queue.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 queue.c
--- lib/queue.c	7 May 2002 03:05:44 -0000	1.1.1.1
+++ lib/queue.c	12 May 2002 01:37:00 -0000
@@ -20,7 +20,7 @@
 #include "ircd_includes.h"
 #include "queue.h"
 
-RCSID("$Id: queue.c,v 1.1.1.1 2002/05/07 03:05:44 jmallett Exp $");
+RCSID("$Id: queue.c,v 1.2 2002/05/07 03:13:21 jmallett Exp $");
 
 #define QUEUE_FREELIST_HASHSIZE		10
 
Index: lib/send.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/send.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 send.c
--- lib/send.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/send.c	12 May 2002 01:37:01 -0000
@@ -23,7 +23,7 @@
 #include "ircd_includes.h"
 #include "send.h"
 
-RCSID("$Id: send.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: send.c,v 1.2 2002/05/07 03:13:22 jmallett Exp $");
 
 static int _send_message_to_client(IRCD_CLIENT *cptr, char *message, int msglen);
 static int _internal_send_to_client(IRCD_CLIENT *cptr, char *prefix, char *format, va_list ap);
Index: lib/support.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/support.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 support.c
--- lib/support.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/support.c	12 May 2002 01:37:01 -0000
@@ -22,7 +22,7 @@
 #include "ircd_includes.h"
 #include "support.h"
 
-RCSID("$Id: support.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: support.c,v 1.2 2002/05/07 03:13:22 jmallett Exp $");
 
 int ircd_getpagesize(void)
 {
Index: lib/vars.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/vars.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 vars.c
--- lib/vars.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/vars.c	12 May 2002 01:37:01 -0000
@@ -21,7 +21,7 @@
 #include "ircd_includes.h"
 #include "vars.h"
 
-RCSID("$Id: vars.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: vars.c,v 1.2 2002/05/07 03:13:23 jmallett Exp $");
 
 static void _vars_value_escape(char *value);
 static int _vars_value_set(IRCD_CLIENT *pptr, IRCD_VAR *vptr, void *value);
Index: lib/whowas.c
===================================================================
RCS file: /home/cvs/csircd-xymox/lib/whowas.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 whowas.c
--- lib/whowas.c	7 May 2002 03:05:46 -0000	1.1.1.1
+++ lib/whowas.c	12 May 2002 01:37:01 -0000
@@ -23,7 +23,7 @@
 #include "whowas.h"
 #include "commands.h"
 
-RCSID("$Id: whowas.c,v 1.1.1.1 2002/05/07 03:05:46 jmallett Exp $");
+RCSID("$Id: whowas.c,v 1.2 2002/05/07 03:13:23 jmallett Exp $");
  
 static IRCD_WHOWAS *Whowas = NULL;
 static IRCD_WHOWAS **Whowashash = NULL;
Index: source/ircdcore.c
===================================================================
RCS file: /home/cvs/csircd-xymox/source/ircdcore.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- source/ircdcore.c	7 May 2002 03:05:50 -0000	1.1.1.1
+++ source/ircdcore.c	7 May 2002 04:01:54 -0000	1.2
@@ -40,6 +40,7 @@
 #include <errno.h>
 #include <pwd.h>
 #include <grp.h>
+#include "support.h"
 #include "config.h"
 
 #ifdef HAVE_DLOPEN
@@ -88,7 +89,7 @@
 
 static void usage(void)
 {
-	fprintf(stderr, "usage: ircd [-l] [-i] [-n] [-u user/uid] [-g group/gid] [-t chrootdir] [-p path/to/csircd.so] <config file>\n");
+	fprintf(stderr, "usage: ircd [-l] [-i] [-n] [-u user/uid] [-g group/gid] [-t chrootdir] [-p path/to/csircd.so] [<config file>]\n");
 	exit(1);
 }
 
@@ -215,9 +216,6 @@
 	argc -= optind;
 	argv += optind;
 
-	if (argc < 1)
-		usage();
-
 	if (!nounlimit)
 	{
 		struct rlimit limits[8];
@@ -310,7 +308,10 @@
 
 	Data = (char *)malloc(sizeof(IRCD_DATA));
 	Data_size = sizeof(IRCD_DATA);
-	((IRCD_DATA *)Data)->Conffile = argv[0];
+	if (argc)
+		((IRCD_DATA *)Data)->Conffile = argv[0];
+	else
+		((IRCD_DATA *)Data)->Conffile = MyStrdup(PREFIX "/csircd.conf");
 
 	for(;;)
 	{
