diff -ruN BitchX/Makefile.in BitchX.new/Makefile.in
--- BitchX/Makefile.in	Mon Mar  5 14:30:04 2001
+++ BitchX.new/Makefile.in	Sun Oct 19 22:41:23 2003
@@ -302,8 +302,6 @@
 			done; \
 		fi; \
 	)
-	(find $(mandir)/man1/BitchX.1 -type f ! -name '*.bz2' ! -name '*.gz' -name '*' | \
-		(xargs bzip2 -9f || xargs gzip -9f) || :) 2>/dev/null
 
 installdirs:
 	umask 022; $(top_srcdir)/mkinstalldirs $(bindir) $(IRCLIB) $(mandir)/man1 $(TRANSLATION_PATH) $(INSTALL_SCRIPT) $(HELPDIR)
diff -ruN BitchX/configure BitchX.new/configure
--- BitchX/configure	Sun Mar 24 04:30:49 2002
+++ BitchX.new/configure	Sun Oct 19 22:41:23 2003
@@ -3071,9 +3071,6 @@
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
 echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
-if test $ac_cv_lib_m_pow = yes; then
-  LIBS="-lm $LIBS"
-fi
 
 
 
@@ -12548,6 +12545,9 @@
       BSD/OS-4*)
         SHLIB_LD="$CC -shared"
         ;;
+      Darwin*)
+        SHLIB_LD="$CC -bundle -undefined error"
+        ;;
       HP-UX-*9* | HP-UX-*10* | HP-UX-*11*)
         SHLIB_CFLAGS="+Z"
         SHLIB_LD="ld"
@@ -13816,6 +13816,9 @@
       BSD/OS-4*)
         SHLIB_LD="$CC -shared"
         ;;
+      Darwin*)
+        SHLIB_LD="$CC -bundle -undefined error"
+        ;;
       HP-UX-*9* | HP-UX-*10* | HP-UX-*11*)
         SHLIB_CFLAGS="+Z"
         SHLIB_LD="ld"
@@ -14756,7 +14759,7 @@
   mandir="\$(IRCLIB)"
 else
   INSTALL_IRC="\${bindir}/\$(_VERSION_)\$(EXEEXT)"
-  IRCLIB="\${libdir}/bx"
+  IRCLIB="\${libdir}/bitchx"
   IRCPATH="\$(DEFAULT_CTOOLZ_DIR):\$(DEFAULT_CTOOLZ_DIR)/plugins:.:\$(PLUGINDIR):\$(INSTALL_SCRIPT):\$(IRCLIB)"
   TRANSLATION_PATH="\$(IRCLIB)/translation"
   HELPDIR="\$(IRCLIB)/help"
diff -ruN BitchX/configure.in BitchX.new/configure.in
--- BitchX/configure.in	Sun Mar 24 04:30:49 2002
+++ BitchX.new/configure.in	Sun Oct 19 22:41:23 2003
@@ -898,7 +898,7 @@
   mandir="\$(IRCLIB)"
 else
   INSTALL_IRC="\${bindir}/\$(_VERSION_)\$(EXEEXT)"
-  IRCLIB="\${libdir}/bx"
+  IRCLIB="\${libdir}/bitchx"
   IRCPATH="\$(DEFAULT_CTOOLZ_DIR):\$(DEFAULT_CTOOLZ_DIR)/plugins:.:\$(PLUGINDIR):\$(INSTALL_SCRIPT):\$(IRCLIB)"
   TRANSLATION_PATH="\$(IRCLIB)/translation"
   HELPDIR="\$(IRCLIB)/help"
diff -ruN BitchX/dll/Makefile.in BitchX.new/dll/Makefile.in
--- BitchX/dll/Makefile.in	Mon Mar  5 14:36:29 2001
+++ BitchX.new/dll/Makefile.in	Sun Oct 19 22:41:23 2003
@@ -160,9 +160,9 @@
 
 ## Makefile starts here.
 
-ALL_PLUGINS = abot acro aim amp arcfour autocycle blowfish cavlink cdrom encrypt europa fserv hint identd nap nicklist pkga possum qbx qmail scan wavplay xmms
+ALL_PLUGINS = abot acro aim amp arcfour autocycle blowfish cavlink cdrom encrypt fserv hint identd nap nicklist pkga possum qbx qmail scan wavplay xmms
 
-#PLUGINS = abot acro aim arcfour autocycle blowfish cavlink encrypt europa fserv hint identd nap pkga possum qbx qmail scan wavplay
+#PLUGINS = abot acro aim arcfour autocycle blowfish cavlink encrypt fserv hint identd nap pkga possum qbx qmail scan wavplay
 PLUGINS = @PLUGINS@
 
 .c.o:
diff -ruN BitchX/dll/aim/toc/Makefile.in BitchX.new/dll/aim/toc/Makefile.in
--- BitchX/dll/aim/toc/Makefile.in	Mon Mar  5 14:36:40 2001
+++ BitchX.new/dll/aim/toc/Makefile.in	Sun Oct 19 22:41:23 2003
@@ -167,6 +167,7 @@
 
 libtoc.a: $(LOBJS)
 	ar cru libtoc.a $(LOBJS)
+	ranlib libtoc.a
 
 Makefile: Makefile.in
 	cd $(topdir) \
diff -ruN BitchX/dll/nap/napsend.c BitchX.new/dll/nap/napsend.c
--- BitchX/dll/nap/napsend.c	Mon Mar  5 14:37:51 2001
+++ BitchX.new/dll/nap/napsend.c	Sun Oct 19 22:41:23 2003
@@ -1,3 +1,8 @@
+#include <sys/time.h>
+#include <sys/stat.h>
+#if !defined(WINNT) || !defined(__EMX__)
+#include <sys/mman.h>
+#endif
 
 #define IN_MODULE
 #include "irc.h"
@@ -21,12 +26,6 @@
 #include "modval.h"
 #include "napster.h"
 #include "md5.h"
-
-#include <sys/time.h>
-#include <sys/stat.h>
-#if !defined(WINNT) || !defined(__EMX__)
-#include <sys/mman.h>
-#endif
 
 #define DEFAULT_FILEMASK "*.mp3"
 
diff -ruN BitchX/doc/BitchX.1 BitchX.new/doc/BitchX.1
--- BitchX/doc/BitchX.1	Fri Mar 30 17:58:28 2001
+++ BitchX.new/doc/BitchX.1	Sun Oct 19 22:41:23 2003
@@ -167,14 +167,14 @@
 .I ~/.ircservers
 Contains a list of IRC servers to cycle through.
 .TP
-.I /usr/local/lib/bx/
+.I (fink-root)/lib/bitchx/
 System-wide configuration dir.
 .TP
 .I ~/.BitchX/BitchX.sav
 Personal configuration file.
 .TP
 .I ~/.BitchX/BitchX.ircnames
-Default random real name.  NOTE: Must be copied from /usr/local/lib/bx/
+Default random real name.  NOTE: Must be copied from (fink-root)/lib/bitchx/
 .TP
 .I ~/.BitchX/BitchX.formats
 Personal 
@@ -182,12 +182,12 @@
 display formats.
 .TP
 .I ~/.BitchX/BitchX.reasons
-Default random kick messages.  NOTE: Must be copied from /usr/local/lib/bx/
+Default random kick messages.  NOTE: Must be copied from (fink-root)/lib/bitchx/
 .TP
 .I ~/.BitchX/BitchX.quit
-Default random quit messages.  NOTE: Must be copied from /usr/local/lib/bx/
+Default random quit messages.  NOTE: Must be copied from (fink-root)/lib/bitchx/
 .TP
-.I /usr/local/lib/bx/BitchX.help
+.I (fink-root)/lib/bitchx/BitchX.help
 .B BitchX 
 help file.
 .TP
diff -ruN BitchX/include/config.h BitchX.new/include/config.h
--- BitchX/include/config.h	Sun Mar 24 04:31:04 2002
+++ BitchX.new/include/config.h	Sun Oct 19 22:45:17 2003
@@ -37,7 +37,27 @@
  *
  * List last updated: 03/24/01.  -dialtone.
  */
-#define DEFAULT_SERVER  "[efnet] "\
+#define DEFAULT_SERVER  "[freenode] "\
+				"irc.freenode.net "\
+				"vinge.freenode.net "\
+				"truong.freenode.net "\
+				"stephenson.freenode.net "\
+				"simak.freenode.net "\
+				"orwell.freenode.net "\
+				"leguin.freenode.net "\
+				"kornbluth.freenode.net "\
+				"jordan.freenode.net "\
+				"herbert.freenode.net "\
+				"goethe.freenode.net "\
+				"gibson.freenode.net "\
+				"gerrold.freenode.net "\
+				"carter.freenode.net "\
+				"carneiro.freenode.net "\
+				"capek.freenode.net "\
+				"calkins.freenode.net "\
+				"brin.freenode.net "\
+				"adams.freenode.net "\
+			"[efnet] "\
 				"irc.Prison.NET "\
 				"irc.colorado.edu "\
 				"irc.concentric.net "\
@@ -195,7 +215,7 @@
  * we define the default network type for server groups. Do not just
  * undefine this.
  */
- #define DEFAULT_NETWORK "efnet"
+#define DEFAULT_NETWORK "openprojects"
 
 /*
  * Below are the IRCII variable defaults.  For boolean variables, use 1 for
@@ -342,7 +362,7 @@
  * when you've defined LATIN1. The problem is that ansi graphics will look
  * ugly if you use the scroll up feature (PageUp/PageDown)
  */
-#undef ASCII_LOGO
+#define ASCII_LOGO ON
 
 /* If you define REVERSE_WHITE_BLACK, then the format codes for black and
  * white color are revepsed. (%W, %w is bold black and black, %K, %k is bold
diff -ruN BitchX/include/irc.h BitchX.new/include/irc.h
--- BitchX/include/irc.h	Sun Mar 24 04:31:04 2002
+++ BitchX.new/include/irc.h	Sun Oct 19 22:41:23 2003
@@ -280,7 +280,6 @@
 extern	char	wait_nick[];
 extern	char	whois_nick[];
 extern	char	lame_wait_nick[];
-extern	char	**environ;
 extern	int	cuprent_numeric;
 extern	int	quick_startup;
 extern	char	version[];
diff -ruN BitchX/script/bxglobal BitchX.new/script/bxglobal
--- BitchX/script/bxglobal	Mon Mar  5 14:39:25 2001
+++ BitchX.new/script/bxglobal	Sun Oct 19 22:41:23 2003
@@ -1,3 +1,12 @@
+######################
+# load fink defaults #
+######################
+
+^load fink-defaults.bx
+######################
+
+
+
 # global bitchx script
 
 if (gtkbitchx())
@@ -6,5 +15,8 @@
 	^set nicklist on
 }
 
-# We should probably do some other things here like set flood protection to
-# some reasonable defaults so no one will complain.
+##########  End fink defaults  ########
+##########   Put site config   ########
+##########   After this line   ########
+
+
diff -ruN BitchX/script/fink-defaults.bx BitchX.new/script/fink-defaults.bx
--- BitchX/script/fink-defaults.bx	Wed Dec 31 19:00:00 1969
+++ BitchX.new/script/fink-defaults.bx	Sun Oct 19 22:41:23 2003
@@ -0,0 +1,15 @@
+SET DISPLAY_PC_CHARACTERS 3
+SET EIGHT_BIT_CHARACTERS ON
+SET FLOOD_AFTER 10
+SET FLOOD_KICK OFF
+SET FLOOD_PROTECTION OFF
+SET FLOOD_RATE 10
+SET FLOOD_USERS 10
+SET FLOOD_WARNING ON
+SET LOGFILE ~/.BitchX/IrcLog
+SET LOG ON
+
+
+^alias cm {mode $C $*}
+
+^bind ^k ERASE_LINE
diff -ruN BitchX/source/bcompat.c BitchX.new/source/bcompat.c
--- BitchX/source/bcompat.c	Mon May  7 04:44:56 2001
+++ BitchX.new/source/bcompat.c	Sun Oct 19 22:41:23 2003
@@ -1011,50 +1011,13 @@
 #include <stddef.h>
 #include <string.h>
 
-int   bsd_setenv(const char *name, const char *value, int rewrite);
-
-/*
- * __findenv --
- *	Returns pointer to value associated with name, if any, else NULL.
- *	Sets offset to be the offset of the name/value combination in the
- *	environmental array, for use by setenv(3) and unsetenv(3).
- *	Explicitly removes '=' in argument name.
- *
- *	This routine *should* be a static; don't use it.
- */
-__inline__ static char *__findenv(const char *name, int *offset)
-{
-	extern char **environ;
-	register int len, i;
-	register const char *np;
-	register char **p, *cp;
-
-	if (name == NULL || environ == NULL)
-		return (NULL);
-	for (np = name; *np && *np != '='; ++np)
-		continue;
-	len = np - name;
-	for (p = environ; (cp = *p) != NULL; ++p) {
-		for (np = name, i = len; i && *cp; i--)
-			if (*cp++ != *np++)
-				break;
-		if (i == 0 && *cp++ == '=') {
-			*offset = p - environ;
-			return (cp);
-		}
-	}
-	return (NULL);
-}
-
 /*
  * getenv --
  *	Returns ptr to value associated with name, if any, else NULL.
  */
 char *bsd_getenv(const char *name)
 {
-	int offset;
-
-	return (__findenv(name, &offset));
+	return getenv(name);
 }
 
 /*
@@ -1064,67 +1027,12 @@
  */
 int bsd_setenv(const char *name, const char *value, int rewrite)
 {
-	extern char **environ;
-	static int alloced;			/* if allocated space before */
-	register char *c;
-	int l_value, offset;
-
-	if (*value == '=')			/* no `=' in value */
-		++value;
-	l_value = strlen(value);
-	if ((c = __findenv(name, &offset))) {	/* find if already exists */
-		if (!rewrite)
-			return (0);
-		if (strlen(c) >= l_value) {	/* old larger; copy over */
-			while ( (*c++ = *value++) );
-			return (0);
-		}
-	} else {					/* create new slot */
-		register int cnt;
-		register char **p;
-
-		for (p = environ, cnt = 0; *p; ++p, ++cnt);
-		if (alloced) {			/* just increase size */
-			environ = (char **)realloc((char *)environ,
-			    (size_t)(sizeof(char *) * (cnt + 2)));
-			if (!environ)
-				return (-1);
-		}
-		else {				/* get new space */
-			alloced = 1;		/* copy old entries into it */
-			p = malloc((size_t)(sizeof(char *) * (cnt + 2)));
-			if (!p)
-				return (-1);
-			memcpy(p, environ, cnt * sizeof(char *));
-			environ = p;
-		}
-		environ[cnt + 1] = NULL;
-		offset = cnt;
-	}
-	for (c = (char *)name; *c && *c != '='; ++c);	/* no `=' in name */
-	if (!(environ[offset] =			/* name + `=' + value */
-	    malloc((size_t)((int)(c - name) + l_value + 2))))
-		return (-1);
-	for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
-	for (*c++ = '='; (*c++ = *value++); );
-	return (0);
+	return setenv(name, value, rewrite);
 }
 
 int bsd_putenv(const char *str)
 {
-	char *p, *equal;
-	int rval;
-
-	if ((p = strdup(str)) == NULL)
-		return (-1);
-	if ((equal = strchr(p, '=')) == NULL) {
-		free(p);
-		return (-1);
-	}
-	*equal = '\0';
-	rval = bsd_setenv(p, equal + 1, 1);
-	free(p);
-	return (rval);
+	return putenv(str);
 }
 
 /*
@@ -1133,14 +1041,7 @@
  */
 void bsd_unsetenv(const char *name)
 {
-	extern char **environ;
-	register char **p;
-	int offset;
-
-	while (__findenv(name, &offset))	/* if set multiple times */
-		for (p = &environ[offset];; ++p)
-			if (!(*p = *(p + 1)))
-				break;
+	return unsetenv(name);
 }
 #endif
 /* --- end of env.c --- */
diff -ruN BitchX/source/compat.c BitchX.new/source/compat.c
--- BitchX/source/compat.c	Mon May  7 04:44:56 2001
+++ BitchX.new/source/compat.c	Sun Oct 19 22:41:23 2003
@@ -1011,50 +1011,13 @@
 #include <stddef.h>
 #include <string.h>
 
-int   bsd_setenv(const char *name, const char *value, int rewrite);
-
-/*
- * __findenv --
- *	Returns pointer to value associated with name, if any, else NULL.
- *	Sets offset to be the offset of the name/value combination in the
- *	environmental array, for use by setenv(3) and unsetenv(3).
- *	Explicitly removes '=' in argument name.
- *
- *	This routine *should* be a static; don't use it.
- */
-__inline__ static char *__findenv(const char *name, int *offset)
-{
-	extern char **environ;
-	register int len, i;
-	register const char *np;
-	register char **p, *cp;
-
-	if (name == NULL || environ == NULL)
-		return (NULL);
-	for (np = name; *np && *np != '='; ++np)
-		continue;
-	len = np - name;
-	for (p = environ; (cp = *p) != NULL; ++p) {
-		for (np = name, i = len; i && *cp; i--)
-			if (*cp++ != *np++)
-				break;
-		if (i == 0 && *cp++ == '=') {
-			*offset = p - environ;
-			return (cp);
-		}
-	}
-	return (NULL);
-}
-
 /*
  * getenv --
  *	Returns ptr to value associated with name, if any, else NULL.
  */
 char *bsd_getenv(const char *name)
 {
-	int offset;
-
-	return (__findenv(name, &offset));
+	return getenv(name);
 }
 
 /*
@@ -1064,67 +1027,12 @@
  */
 int bsd_setenv(const char *name, const char *value, int rewrite)
 {
-	extern char **environ;
-	static int alloced;			/* if allocated space before */
-	register char *c;
-	int l_value, offset;
-
-	if (*value == '=')			/* no `=' in value */
-		++value;
-	l_value = strlen(value);
-	if ((c = __findenv(name, &offset))) {	/* find if already exists */
-		if (!rewrite)
-			return (0);
-		if (strlen(c) >= l_value) {	/* old larger; copy over */
-			while ( (*c++ = *value++) );
-			return (0);
-		}
-	} else {					/* create new slot */
-		register int cnt;
-		register char **p;
-
-		for (p = environ, cnt = 0; *p; ++p, ++cnt);
-		if (alloced) {			/* just increase size */
-			environ = (char **)realloc((char *)environ,
-			    (size_t)(sizeof(char *) * (cnt + 2)));
-			if (!environ)
-				return (-1);
-		}
-		else {				/* get new space */
-			alloced = 1;		/* copy old entries into it */
-			p = malloc((size_t)(sizeof(char *) * (cnt + 2)));
-			if (!p)
-				return (-1);
-			memcpy(p, environ, cnt * sizeof(char *));
-			environ = p;
-		}
-		environ[cnt + 1] = NULL;
-		offset = cnt;
-	}
-	for (c = (char *)name; *c && *c != '='; ++c);	/* no `=' in name */
-	if (!(environ[offset] =			/* name + `=' + value */
-	    malloc((size_t)((int)(c - name) + l_value + 2))))
-		return (-1);
-	for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
-	for (*c++ = '='; (*c++ = *value++); );
-	return (0);
+	return setenv(name, value, rewrite);
 }
 
 int bsd_putenv(const char *str)
 {
-	char *p, *equal;
-	int rval;
-
-	if ((p = strdup(str)) == NULL)
-		return (-1);
-	if ((equal = strchr(p, '=')) == NULL) {
-		free(p);
-		return (-1);
-	}
-	*equal = '\0';
-	rval = bsd_setenv(p, equal + 1, 1);
-	free(p);
-	return (rval);
+	return putenv(str);
 }
 
 /*
@@ -1133,14 +1041,7 @@
  */
 void bsd_unsetenv(const char *name)
 {
-	extern char **environ;
-	register char **p;
-	int offset;
-
-	while (__findenv(name, &offset))	/* if set multiple times */
-		for (p = &environ[offset];; ++p)
-			if (!(*p = *(p + 1)))
-				break;
+	return unsetenv(name);
 }
 #endif
 /* --- end of env.c --- */
diff -ruN BitchX/source/status.c BitchX.new/source/status.c
--- BitchX/source/status.c	Wed Feb 27 23:22:51 2002
+++ BitchX.new/source/status.c	Sun Oct 19 22:49:15 2003
@@ -1213,7 +1213,7 @@
  * current-type window, although i think they should go to all windows.
  */
 #define STATUS_VAR(x) \
-static	char	*status_user ## x ## (Window *window)			\
+static	char	*status_user ## x (Window *window)			\
 {									\
 	char	*text;							\
 									\
diff -ruN BitchX/source/translat.c BitchX.new/source/translat.c
--- BitchX/source/translat.c	Wed Feb 27 23:22:51 2002
+++ BitchX.new/source/translat.c	Sun Oct 19 22:41:23 2003
@@ -40,7 +40,7 @@
 /* we have this here as a safety feature if for some reason TRANSLATION_PATH
  * is not defined.
  */
-#define TRANSLATION_PATH "/usr/local/lib/bx/translation"
+#define TRANSLATION_PATH "@PREFIX@/lib/bitchx/translation"
 #endif
 
 
diff -Nurd -x '*~' BitchX.orig/dll/aim/toc/toc.h BitchX/dll/aim/toc/toc.h
--- BitchX.orig/dll/aim/toc/toc.h	2001-03-05 14:36:45.000000000 -0500
+++ BitchX/dll/aim/toc/toc.h	2006-03-22 22:13:28.000000000 -0500
@@ -150,9 +150,6 @@
 void parse_toc_buddy_list(char *);
 void translate_toc_error_code(char *c);
 
-extern int toc_fd;
-extern int seqno;
-extern unsigned int peer_ver;
 extern int state;
 /* extern int inpa; */
 
@@ -207,9 +204,7 @@
 void serv_set_away(char *message);
 
 extern int idle_timer;
-extern time_t lastsent;
 extern time_t login_time;
-extern struct timeval lag_tv;
 extern int is_idle;
 extern int lag_ms;
 extern int permdeny;
diff -Nurd -x '*~' BitchX.orig/include/struct.h BitchX/include/struct.h
--- BitchX.orig/include/struct.h	2002-02-27 23:22:44.000000000 -0500
+++ BitchX/include/struct.h	2006-03-22 22:10:44.000000000 -0500
@@ -1045,7 +1045,6 @@
 	int	delete;
 }	TimerList;
 
-extern TimerList *PendingTimers;
 typedef struct nicktab_stru
 {
 	struct nicktab_stru *next;
diff -Nurd -x '*~' BitchX.orig/source/ctcp.c BitchX/source/ctcp.c
--- BitchX.orig/source/ctcp.c	2002-02-27 23:22:47.000000000 -0500
+++ BitchX/source/ctcp.c	2006-03-22 22:09:27.000000000 -0500
@@ -176,7 +176,7 @@
 
 /* CDE do ops and unban logging */
 
-static char	*ctcp_type[] =
+char	*ctcp_type[] =
 {
 	"PRIVMSG",
 	"NOTICE"
