diff -r e63bf7596cda Config
--- a/Config	Fri May 10 19:32:14 2013 +0200
+++ b/Config	Wed May 15 00:37:24 2013 -0600
@@ -52,13 +52,6 @@
 ARG="$ARG--enable-ssl=$SSLDIR "
 fi
 fi
-if [ "$ZIPLINKS" = "1" ] ; then
-if test x"$ZIPLINKSDIR" = "x" ; then
-ARG="$ARG--enable-ziplinks "
-else
-ARG="$ARG--enable-ziplinks=$ZIPLINKSDIR "
-fi
-fi
 if [ "$REMOTEINC" = "1" ] ; then
 ARG="$ARG--enable-libcurl=$CURLDIR "
 fi
@@ -346,8 +339,6 @@
 DEFPERM="0600"
 CRYPTOIRCD=""
 SSLDIR=""
-ZIPLINKS=""
-ZIPLINKSDIR=""
 LISTEN_SIZE="5"
 NICKNAMEHISTORYLENGTH="2000"
 MAXSENDQLENGTH="3000000"
@@ -570,49 +561,6 @@
 
 TEST=""
 while [ -z "$TEST" ] ; do
-    if [ "$ZIPLINKS" = "1" ] ; then
-	TEST="Yes"
-    else
-	TEST="No"
-    fi
-    echo ""
-    echo "Do you want to enable ziplinks support?"
-    echo $n "[$TEST] -> $c"
-	read cc
-    if [ -z "$cc" ] ; then
-	cc=$TEST
-    fi
-    case "$cc" in
-	[Yy]*)
-	    ZIPLINKS="1"
-	    ;;
-	[Nn]*)
-	    ZIPLINKS=""
-	    ;;
-	*)
-	    echo ""
-	    echo "You must enter either Yes or No"
-	    TEST=""
-	    ;;
-    esac
-done
-
-if [ "$ZIPLINKS" = "1" ] ; then
-TEST="$ZIPLINKSDIR"
-echo ""
-echo "If you know the path to zlib on your system, enter it here. If not"
-echo "leave this blank"
-echo $n "[$TEST] -> $c"
-    read cc
-if [ -z "$cc" ] ; then
-    ZIPLINKSDIR="$TEST"
-else 
-    ZIPLINKSDIR=`eval echo $cc` # modified
-fi
-fi
-
-TEST=""
-while [ -z "$TEST" ] ; do
     if [ "$REMOTEINC" = "1" ] ; then
 	TEST="Yes"
     else
@@ -966,8 +914,6 @@
 DEFPERM="$DEFPERM"
 CRYPTOIRCD="$CRYPTOIRCD"
 SSLDIR="$SSLDIR"
-ZIPLINKS="$ZIPLINKS"
-ZIPLINKSDIR="$ZIPLINKSDIR"
 REMOTEINC="$REMOTEINC"
 CURLDIR="$CURLDIR"
 SHOWLISTMODES="$SHOWLISTMODES"
diff -r e63bf7596cda autoconf/m4/unreal.m4
--- a/autoconf/m4/unreal.m4	Fri May 10 19:32:14 2013 +0200
+++ b/autoconf/m4/unreal.m4	Wed May 15 00:37:24 2013 -0600
@@ -207,47 +207,3 @@
 	fi
 	])
 ])
-
-AC_DEFUN([CHECK_ZLIB],
-[
-AC_ARG_ENABLE([ziplinks],
-	[AC_HELP_STRING([--enable-ziplinks=DIR],[enable ziplinks. will check /usr/local /usr /usr/pkg. Note that SSL does its own compression, so you won't need this for SSL links.])],
-	[],
-	[enable_ziplinks=no])
-AS_IF([test $enable_ziplinks != "no"],
-	[
-	AC_MSG_CHECKING([for zlib])
-	for dir in $enable_ziplinks /usr/local /usr /usr/pkg; do
-		zlibdir="$dir"
-		if test -f "$dir/include/zlib.h"; then
-			AC_MSG_RESULT(found in $zlibdir)
-			found_zlib="yes";
-			if test "$zlibdir" != "/usr" ; then
-				CFLAGS="$CFLAGS -I$zlibdir/include";
-			fi
-			AC_DEFINE([ZIP_LINKS], [], [Define if you have zlib and want zip links support.])
-		break
-		fi
-	done
-	if test x_$found_zlib != x_yes; then
-		AC_MSG_RESULT([not found])
-		echo ""
-		echo "Apparently you do not have the zlib development library installed."
-		echo "You have two options:"
-		echo "a) Install the zlib development library"
-		echo "   and run ./Config"
-		echo "OR"
-		echo "b) If you don't need compressed links..."
-		echo "   Run ./Config and say 'no' when asked about ziplinks support"
-		echo ""
-		exit 1
-	else
-		IRCDLIBS="$IRCDLIBS -lz"
-		if test "$zlibdir" != "/usr" ; then
-			LDFLAGS="$LDFLAGS -L$zlibdir/lib"
-		fi
-		HAVE_ZLIB=yes
-	fi
-	AC_SUBST([HAVE_ZLIB])
-	])
-])
diff -r e63bf7596cda configure
--- a/configure	Fri May 10 19:32:14 2013 +0200
+++ b/configure	Wed May 15 00:37:24 2013 -0600
@@ -635,7 +635,6 @@
 FD_SETSIZE
 BINDIR
 IRCDDIR
-HAVE_ZLIB
 MODULEFLAGS
 CRYPTOLIB
 STRTOUL
@@ -721,7 +720,6 @@
 with_system_tre
 with_system_cares
 enable_ssl
-enable_ziplinks
 enable_dynamic_linking
 enable_inet6
 enable_libcurl
@@ -1354,9 +1352,6 @@
   --disable-prefixaq      Enable chanadmin (+a) and chanowner (+q) prefixes
   --enable-ssl=           enable ssl will check /usr/local/ssl /usr/lib/ssl
                           /usr/ssl /usr/pkg /usr/sfw /usr/local /usr
-  --enable-ziplinks=DIR   enable ziplinks. will check /usr/local /usr
-                          /usr/pkg. Note that SSL does its own compression, so
-                          you won't need this for SSL links.
   --disable-dynamic-linking
                           Make the IRCd statically link with shared objects
                           rather than dynamically (noone knows if disabling
@@ -6242,56 +6237,6 @@
 fi
 
 
-# Check whether --enable-ziplinks was given.
-if test "${enable_ziplinks+set}" = set; then :
-  enableval=$enable_ziplinks;
-else
-  enable_ziplinks=no
-fi
-
-if test $enable_ziplinks != "no"; then :
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
-$as_echo_n "checking for zlib... " >&6; }
-	for dir in $enable_ziplinks /usr/local /usr /usr/pkg; do
-		zlibdir="$dir"
-		if test -f "$dir/include/zlib.h"; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $zlibdir" >&5
-$as_echo "found in $zlibdir" >&6; }
-			found_zlib="yes";
-			if test "$zlibdir" != "/usr" ; then
-				CFLAGS="$CFLAGS -I$zlibdir/include";
-			fi
-
-$as_echo "#define ZIP_LINKS /**/" >>confdefs.h
-
-		break
-		fi
-	done
-	if test x_$found_zlib != x_yes; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-		echo ""
-		echo "Apparently you do not have the zlib development library installed."
-		echo "You have two options:"
-		echo "a) Install the zlib development library"
-		echo "   and run ./Config"
-		echo "OR"
-		echo "b) If you don't need compressed links..."
-		echo "   Run ./Config and say 'no' when asked about ziplinks support"
-		echo ""
-		exit 1
-	else
-		IRCDLIBS="$IRCDLIBS -lz"
-		if test "$zlibdir" != "/usr" ; then
-			LDFLAGS="$LDFLAGS -L$zlibdir/lib"
-		fi
-		HAVE_ZLIB=yes
-	fi
-
-
-fi
-
 # Check whether --enable-dynamic-linking was given.
 if test "${enable_dynamic_linking+set}" = set; then :
   enableval=$enable_dynamic_linking; enable_dynamic_linking=$enableval
diff -r e63bf7596cda configure.ac
--- a/configure.ac	Fri May 10 19:32:14 2013 +0200
+++ b/configure.ac	Wed May 15 00:37:24 2013 -0600
@@ -521,7 +521,6 @@
 AC_ARG_WITH(system-tre, [AS_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no])
 AC_ARG_WITH(system-cares, [AS_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.6.0) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no])
 CHECK_SSL
-CHECK_ZLIB
 AC_ARG_ENABLE(dynamic-linking, [AS_HELP_STRING([--disable-dynamic-linking], [Make the IRCd statically link with shared objects rather than dynamically (noone knows if disabling dynamic linking actually does anything or not)])],
 	[enable_dynamic_linking=$enableval], [enable_dynamic_linking="yes"])
 AS_IF([test $enable_dynamic_linking = "yes"],
diff -r e63bf7596cda doc/compiling_win32.txt
--- a/doc/compiling_win32.txt	Fri May 10 19:32:14 2013 +0200
+++ b/doc/compiling_win32.txt	Wed May 15 00:37:24 2013 -0600
@@ -27,7 +27,7 @@
    in your path (eg: put it in c:\windows\system32).
 
 ==[ EXTERNAL LIBRARIES ]==
-Fetch the external libraries (c-ares, tre, openssl, zlib, curl) from:
+Fetch the external libraries (c-ares, tre, openssl, curl) from:
 http://www.vulnscan.org/unrealwin32dev/
 
 ==[ COMPILING ]==
@@ -40,10 +40,9 @@
       'nmake -f makefile.win32'
    B. Don't edit makefile.win32 but instead create a one-line command (which
       you can put in a batch file), like this (all on one line!):
-      nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib"
-      ZLIB_LIB_DIR="c:\dev\zlib\dll32" USE_SSL=1
-      OPENSSL_INC_DIR="c:\openssl\include" OPENSSL_LIB_DIR="c:\openssl\lib"
-      USE_REMOTEINC=1 LIBCURL_INC_DIR="c:\dev\curl-ssl\include"
+      nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\openssl\include"
+      OPENSSL_LIB_DIR="c:\openssl\lib" USE_REMOTEINC=1
+      LIBCURL_INC_DIR="c:\dev\curl-ssl\include"
       LIBCURL_LIB_DIR="c:\dev\curl-ssl\lib\dll-release"
       CARES_LIB_DIR="C:\dev\c-ares\vc\cares\dll-release"
       CARES_INC_DIR="C:\dev\c-ares" CARESLIB="cares.lib"
@@ -112,7 +111,7 @@
 So basically you just run 'nmake -f makefile.win32 SYMBOLFILE' and then restart
 compiling again.
 
-==[ COMPILING ZLIB/SSL/CURL YOURSELF ]==
+==[ COMPILING SSL/CURL YOURSELF ]==
 This is off-topic and not explained here.
 Again, use the stuff from the win32 development pack unless you have a good
 reason to do otherwise.
diff -r e63bf7596cda doc/technical/serverprotocol.html
--- a/doc/technical/serverprotocol.html	Fri May 10 19:32:14 2013 +0200
+++ b/doc/technical/serverprotocol.html	Wed May 15 00:37:24 2013 -0600
@@ -148,7 +148,6 @@
 			<li>e : Server has SSL Support (#define USE_SSL or answer "yes" (and have ssl libraries installed) to relevant ./Config prompt).</li>
 			<li>O : Server has OperOverride enabled (#undef NO_OPEROVERRIDE or answer "no" to relevant ./Config prompt).</li>
 			<li>o : Server has disabled Oper verify (#undef OPEROVERRIDE_VERIFY or answer "no" to relevant ./Config prompt).</li>
-			<li>Z : Server has ziplink support (#define ZIP_LINKS or answer "yes" to relevant ./Config prompt AND have the zlib dev libraries).</li>
 			<li>E : Server has extended channel mode support.</li>
 			<li>3 : 3rd party modules are loaded or some system libraries are wonky.</li>
 			<li>m : Private message handling is 'tainted' (one or modules registered a USERMSG hook).</li>
diff -r e63bf7596cda doc/technical/vl.txt
--- a/doc/technical/vl.txt	Fri May 10 19:32:14 2013 +0200
+++ b/doc/technical/vl.txt	Wed May 15 00:37:24 2013 -0600
@@ -34,6 +34,5 @@
 e              SSL supported
 O              OperOverride enabled
 o              OperOverride without verify
-Z              Zip links supported
 3              3rd party modules (were) loaded or unreal is any other way 'tainted' (eg: bad libs)
 E              Extended channel modes supported
diff -r e63bf7596cda doc/unreal32docs.html
--- a/doc/unreal32docs.html	Fri May 10 19:32:14 2013 +0200
+++ b/doc/unreal32docs.html	Wed May 15 00:37:24 2013 -0600
@@ -58,17 +58,16 @@
   -- 3.7. <a href="#feature_opercmds">Oper commands</a><br>
   -- 3.8. <a href="#feature_ssl">SSL</a><br>
   -- 3.9. <a href="#feature_ipv6">IPv6</a><br>
-  -- 3.10. <a href="#feature_ziplinks">Zip links</a><br>
-  -- 3.11. <a href="#feature_dyndns">Dynamic DNS/IP linking support</a><br>
-  -- 3.12. <a href="#feature_antiflood">Anti-flood features</a><br>
-  -- 3.13. <a href="#feature_bantypes">Ban types</a><br>
-  -- 3.14. <a href="#feature_spamfilter">Spamfilter</a><br>
-  -- 3.15. <a href="#feature_cidr">CIDR</a><br>
-  -- 3.16. <a href="#feature_nickchars">Nick Character Sets</a><br>
-  -- 3.17. <a href="#feature_cgiirc">CGI:IRC Support</a><br>
-  -- 3.18. <a href="#feature_timesync">Time Synchronization</a><br>
-  -- 3.19. <a href="#feature_authtypes">Authentication Types</a><br>
-  -- 3.20. <a href="#feature_other">Other features</a><br>
+  -- 3.10. <a href="#feature_dyndns">Dynamic DNS/IP linking support</a><br>
+  -- 3.11. <a href="#feature_antiflood">Anti-flood features</a><br>
+  -- 3.12. <a href="#feature_bantypes">Ban types</a><br>
+  -- 3.13. <a href="#feature_spamfilter">Spamfilter</a><br>
+  -- 3.14. <a href="#feature_cidr">CIDR</a><br>
+  -- 3.15. <a href="#feature_nickchars">Nick Character Sets</a><br>
+  -- 3.16. <a href="#feature_cgiirc">CGI:IRC Support</a><br>
+  -- 3.17. <a href="#feature_timesync">Time Synchronization</a><br>
+  -- 3.18. <a href="#feature_authtypes">Authentication Types</a><br>
+  -- 3.19. <a href="#feature_other">Other features</a><br>
   4. <a href="#configuringyourunrealircdconf">Configuring your unrealircd.conf 
   file</a><br>
   ---4.1. <a href="#configurationfileexplained">Configuration file explained</a><br>
@@ -344,19 +343,12 @@
    Your OS needs to have IPv6 support and you need to enable IPv6 support in UnrealIRCd during ./Config as well.<br>
 <p>Although microsoft has an experimental IPv6 implementation for w2k/XP it is not (yet) supported by UnrealIRCd.</p></div>
 
-<p><font size="+2"><b>3.10 - Zip links</b></font><a name="feature_ziplinks"></a></p><div class="desc">
-<p>Zip links can be turned on for server&lt;-&gt;server links, it compresses the data by using zlib.
-   It can save 60-80% bandwidth... So it's quite useful for low-bandwidth links or links with
-   many users, it can help a lot when you are linking since a lot of data is sent about every user/channel/etc.</p>
-<p>To compile with zip links support, you need to answer Yes to the zlib question in ./Config and set it in link::options::zip 
-   (on both sides)</p></div>
-
-<p><font size="+2"><b>3.11 - Dynamic DNS/IP linking support</b></font><a name="feature_dyndns"></a></p><div class="desc">
+<p><font size="+2"><b>3.10 - Dynamic DNS/IP linking support</b></font><a name="feature_dyndns"></a></p><div class="desc">
 <p>UnrealIRCd has some (new) nice features which helps dynamic IP users using dynamic DNS (like blah.dyndns.org).
    If you are linking two dynamic DNS hosts, then set link::options::nodnscache and link::options::nohostcheck. 
 </p></div>
 
-<p><font size="+2"><b>3.12 - Anti-Flood features</b></font><a name="feature_antiflood"></a></p><div class="desc">
+<p><font size="+2"><b>3.11 - Anti-Flood features</b></font><a name="feature_antiflood"></a></p><div class="desc">
 <p>
 <b>Throttling</b><br>
 Throttling is a method that allows you to limit how fast a user can disconnect and then reconnect to your server. 
@@ -455,7 +447,7 @@
 from joining the channel.
 </p></div>
 
-<p><font size="+2"><b>3.13 - Ban types</b></font><a name="feature_bantypes"></a></p><div class="desc">
+<p><font size="+2"><b>3.12 - Ban types</b></font><a name="feature_bantypes"></a></p><div class="desc">
 <p>
 <b>Basic bantypes and cloaked hosts</b><br>
 UnrealIRCd supports the basic bantypes like <i>+b nick!user@host</i>.<br>
@@ -528,7 +520,7 @@
 Modules can add other extended ban types.<br>
 </p></div>
 
-<p><font size="+2"><b>3.14 - Spamfilter</b></font><a name="feature_spamfilter"></a></p><div class="desc">
+<p><font size="+2"><b>3.13 - Spamfilter</b></font><a name="feature_spamfilter"></a></p><div class="desc">
 <p>Spamfilter is a new system to fight spam, advertising, worms and other things. It works a bit like
    the badwords system but has several advantages.</p>
 <p>Spamfilters are added via the /spamfilter command which uses the following syntax:<br>
@@ -619,7 +611,7 @@
 </p>
 </div>
 
-<p><font size="+2"><b>3.15 - CIDR</b></font><a name="feature_cidr"></a></p><div class="desc">
+<p><font size="+2"><b>3.14 - CIDR</b></font><a name="feature_cidr"></a></p><div class="desc">
 <p>UnrealIRCd now has support for CIDR (Classless Interdomain Routing). CIDR allows you to ban
 IP ranges. IPs are allocated to ISPs using CIDR, therefore, being able to set a CIDR based ban 
 allows you to easily ban an ISP. Unreal supports CIDR for both IPv4 and IPv6. CIDR masks may be
@@ -629,7 +621,7 @@
 IP/bits, e.g., 127.0.0.0/8 (matches 127.0.0.0 - 127.255.255.255), and fe80:0:0:123::/64
 (matches fe80:0:0:123:0:0:0:0 - fe80:0:0:123:ffff:ffff:ffff:ffff).</p></div>
 
-<p><font size="+2"><b>3.16 - Nick Character Sets</b></font><a name="feature_nickchars"></a></p><div class="desc">
+<p><font size="+2"><b>3.15 - Nick Character Sets</b></font><a name="feature_nickchars"></a></p><div class="desc">
 <p>UnrealIRCd now has the ability to specify which charsets/languages should be allowed
 in nicknames. You do this in <b>set::allowed-nickchars</b>.<br>
 A table of all possible choices:<br>
@@ -686,14 +678,14 @@
 <pre>set { allowed-nickchars { chinese-simp; chinese-trad; }; };</pre>
 </p></div>
 
-<p><font size="+2"><b>3.17 - CGI:IRC Support</b></font><a name="feature_cgiirc"></a></p><div class="desc">
+<p><font size="+2"><b>3.16 - CGI:IRC Support</b></font><a name="feature_cgiirc"></a></p><div class="desc">
 <p>UnrealIRCd has support for CGI:IRC host spoofing, which means you can mark specific CGI:IRC
 gateways as "trusted" which will cause the IRCd to show the users' real host/ip everywhere on
 IRC, instead of the host/ip of the CGI:IRC-gateway.</p>
 <p>See the <a href="#cgiirc">cgiirc block</a> for information on how to configure this.</p>
 </div>
 
-<p><font size="+2"><b>3.18 - Time Synchronization</b></font><a name="feature_timesync"></a></p><div class="desc">
+<p><font size="+2"><b>3.17 - Time Synchronization</b></font><a name="feature_timesync"></a></p><div class="desc">
 <p>Having correct time is extremely important for IRC servers. Without correct time, channels can desynch, innocent
 users can be killed, channels might not show up properly in /LIST, in short: huge trouble will arrise.</p>
 <p>UnrealIRCd has some build-in time synchronization support.
@@ -708,7 +700,7 @@
    the <a href="#setblock">set documentation</a> for more information.</p>
 </div>
 
-<p><font size="+2"><b>3.19 - Authentication Types</b></font><a name="feature_authtypes"></a></p><div class="desc">
+<p><font size="+2"><b>3.18 - Authentication Types</b></font><a name="feature_authtypes"></a></p><div class="desc">
 <p>At various places in the configuration file, for example the <a
 href="#operblock">oper block</a>, <a href="#allowblock">allow block</a> and
 <a href="#linkblock">link block</a>, you can authenticate clients by password or other
@@ -780,7 +772,7 @@
 Another very useful place to use <tt>sslclientcertfp</tt> is in <a href="#linkblock_passwordreceive">link::password-receive</a>
 </p></div>
 
-<p><font size="+2"><b>3.20 - Other features</b></font><a name="feature_other"></a></p><div class="desc">
+<p><font size="+2"><b>3.19 - Other features</b></font><a name="feature_other"></a></p><div class="desc">
 <p>UnrealIRCd has a lot of features so not everything is covered here... You'll find that out by yourself.</p></div>
 
 <p> </p>
@@ -3656,7 +3648,6 @@
 	V - vhost - Send the vhost block list<br>
 	X - notlink - Send the list of servers that are not current linked<br>
 	Y - class - Send the class block list<br>
-	z - zip - Send compression information about ziplinked servers (if compiled with ziplinks support)<br>
 	Z - mem - Send memory usage information<br>
 	</td>
     <td>All</td>
diff -r e63bf7596cda include/modversion.h
--- a/include/modversion.h	Fri May 10 19:32:14 2013 +0200
+++ b/include/modversion.h	Wed May 15 00:37:24 2013 -0600
@@ -22,8 +22,8 @@
 #include "version.h"
 
 /* What all this is for? Well, it's simple...
- * Example: When someone compiles a module with zip support, but the
- * core was not compiled with zip support, then the module will read
+ * Example: When someone compiles a module with ipv6 support, but the
+ * core was not compiled with ipv6 support, then the module will read
  * things incorrect in the struct because the module sees an extra
  * field half-way the struct but in the core that field does not exist,
  * hence all data is shifted 4 bytes causing all kinds of odd crashes,
@@ -32,7 +32,7 @@
  * options that cause binary incompatability (eg: changing nicklen),
  * we just take the most common ones...
  *
- * NOTE: On win32 we allow ssl and zip inconsistencies because we
+ * NOTE: On win32 we allow ssl inconsistencies because we
  *       explicitly use "padding" in the structs: we add a useless
  *       placeholder so everything is still aligned correctly.
  *       In the process of doing so, we waste several bytes per-user,
@@ -44,11 +44,6 @@
  #else
   #define MYTOKEN_SSL ""
  #endif
- #if defined(ZIP_LINKS) && !defined(_WIN32)
-  #define MYTOKEN_ZIP "/ZIP"
- #else
-  #define MYTOKEN_ZIP ""
- #endif
  #if !defined(EXTCMODE)
   #define MYTOKEN_EXTCMODE "/NOEXTC"
  #else
@@ -88,12 +83,12 @@
 
 #ifdef UNREALCORE
   char our_mod_version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH6 PATCH7 PATCH8 PATCH9 \
-                               MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
+                               MYTOKEN_SSL MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
                                MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
   unsigned int our_compiler_version = GCCVER;
 #else
   DLLFUNC char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH6 PATCH7 PATCH8 PATCH9 \
-                               MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
+                               MYTOKEN_SSL MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
                                MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
   DLLFUNC unsigned int compiler_version = GCCVER;
 #endif
diff -r e63bf7596cda include/setup.h.in
--- a/include/setup.h.in	Fri May 10 19:32:14 2013 +0200
+++ b/include/setup.h.in	Wed May 15 00:37:24 2013 -0600
@@ -369,9 +369,6 @@
 /* Define if you want to allow SSL connections */
 #undef USE_SSL
 
-/* Define if you have zlib and want zip links support. */
-#undef ZIP_LINKS
-
 /* Define if you are compiling unrealircd on Sun's (or Oracle's?) Solaris */
 #undef _SOLARIS
 
diff -r e63bf7596cda include/struct.h
--- a/include/struct.h	Fri May 10 19:32:14 2013 +0200
+++ b/include/struct.h	Wed May 15 00:37:24 2013 -0600
@@ -61,9 +61,6 @@
 #  include <sys/syslog.h>
 # endif
 #endif
-#ifdef ZIP_LINKS
-#include "zip.h"
-#endif
 #include "auth.h" 
 #include "tre/regex.h"
 
@@ -155,10 +152,6 @@
 typedef struct JFlood aJFlood;
 typedef struct PendingNet aPendingNet;
 
-#ifdef ZIP_LINKS
-typedef struct  Zdata   aZdata;
-#endif
-
 #ifdef NEED_U_INT32_T
 typedef unsigned int u_int32_t;	/* XXX Hope this works! */
 #endif
@@ -325,9 +318,7 @@
 #define FLAGS_NETINFO    0x200000
 #define FLAGS_HYBNOTICE  0x400000
 #define FLAGS_QUARANTINE 0x800000
-#ifdef ZIP_LINKS
-#define FLAGS_ZIP        0x1000000
-#endif
+//        0x1000000 is now unused (was for ziplinks)
 #define FLAGS_DCCNOTICE  0x2000000 /* Has the user seen a notice on how to use DCCALLOW already? */
 #define FLAGS_SHUNNED    0x4000000
 #define FLAGS_VIRUS      0x8000000 /* tagged by spamfilter */
@@ -360,7 +351,7 @@
 #define PROTO_SJOIN2	0x0010	/* Negotiated SJOIN2 protocol */
 #define PROTO_UMODE2	0x0020	/* Negotiated UMODE2 protocol */
 #define PROTO_NS		0x0040	/* Negotiated NS protocol */
-#define PROTO_ZIP		0x0080	/* Negotiated ZIP protocol */
+//		0x0080	is now unused (was for ziplinks)
 #define PROTO_VL		0x0100	/* Negotiated VL protocol */
 #define PROTO_SJ3		0x0200	/* Negotiated SJ3 protocol */
 #define PROTO_VHP		0x0400	/* Send hostnames in NICKv2 even if not sethosted */
@@ -436,14 +427,6 @@
 #define IsSecure(x)		(0)
 #endif
 
-#ifdef ZIP_LINKS
-#define IsZipped(x) 	((x)->flags & FLAGS_ZIP)
-#define IsZipStart(x)	(((x)->flags & FLAGS_ZIP) && ((x)->zip->first == 1))
-#else
-#define IsZipped(x)		(0)
-#define IsZipStart(x)	(0)
-#endif
-
 /* Fake lag exception */
 #define IsNoFakeLag(x)      ((x)->flags & FLAGS_NOFAKELAG)
 #define SetNoFakeLag(x)     ((x)->flags |= FLAGS_NOFAKELAG)
@@ -511,11 +494,6 @@
 #define ClearHidden(x)          ((x)->umodes &= ~UMODE_HIDE)
 #define ClearHideOper(x)    ((x)->umodes &= ~UMODE_HIDEOPER)
 
-#ifdef ZIP_LINKS
-#define SetZipped(x)        ((x)->flags |= FLAGS_ZIP)
-#define ClearZipped(x)      ((x)->flags &= ~FLAGS_ZIP)
-#endif
-
 /*
  * ProtoCtl options
  */
@@ -985,7 +963,7 @@
 #define IsServersOnlyListener(x)	((x) && ((x)->umodes & LISTENER_SERVERSONLY))
 
 #define CONNECT_SSL		0x000001
-#define CONNECT_ZIP		0x000002 
+//		0x000002 is now unused (was for ziplinks)
 #define CONNECT_AUTO		0x000004
 #define CONNECT_QUARANTINE	0x000008
 #define CONNECT_NODNSCACHE	0x000010
@@ -1038,11 +1016,6 @@
 	long sendM;		/* Statistics: protocol messages send */
 	long sendK;		/* Statistics: total k-bytes send */
 	long receiveM;		/* Statistics: protocol messages received */
-#ifdef ZIP_LINKS
-	struct Zdata *zip;	/* zip data */
-#elif defined(_WIN32)
-	void *zip_NOTUSED; /* (win32 binary compatability) */
-#endif
 #ifdef USE_SSL
 	SSL		*ssl;
 #elif defined(_WIN32)
@@ -1299,9 +1272,6 @@
 #elif defined(_WIN32)
 	void *ciphers_NOTUSED;
 #endif
-#ifdef ZIP_LINKS
-	int compression_level;
-#endif
 };
 
 typedef enum {
diff -r e63bf7596cda include/zip.h
--- a/include/zip.h	Fri May 10 19:32:14 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, include/s_zip.h
- *   Copyright (C) 1992 Darren Reed
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 1, or (at your option)
- *   any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * "s_zip.h". - Headers file.
- *
- * $Id$
- *
- */
-#ifndef INCLUDED_s_zip_h
-#define INCLUDED_s_zip_h
-#ifdef _WIN32
- #define ZLIB_WINAPI
-#endif
-#include <zlib.h>		/* z_stream */
-#endif
-
-struct Client;
-
-#ifdef ZIP_LINKS
-/* the minimum amount of data needed to trigger compression */
-#define ZIP_MINIMUM     4096
-
-/* the maximum amount of data to be compressed (can actually be a bit more) */
-#define ZIP_MAXIMUM     8192	/* WARNING: *DON'T* CHANGE THIS!!!! */
-
-struct Zdata {
-	z_stream *in;		/* input zip stream data */
-	z_stream *out;		/* output zip stream data */
-	char inbuf[ZIP_MAXIMUM];	/* incoming zipped buffer */
-	char outbuf[ZIP_MAXIMUM];	/* outgoing (unzipped) buffer */
-	int  incount;		/* size of inbuf content */
-	int  outcount;		/* size of outbuf content */
-	int first; /* First message? */
-};
-
-#define ZIP_DEFAULT_LEVEL 2
-
-#endif /* ZIP_LINKS */
-
-
-extern MODFUNC int zip_init(struct Client *, int);
-extern MODFUNC void zip_free(struct Client *);
-extern MODFUNC char *unzip_packet(struct Client *, char *, int *);
-extern MODFUNC char *zip_buffer(struct Client *, char *, int *, int);
diff -r e63bf7596cda makefile.win32
--- a/makefile.win32	Fri May 10 19:32:14 2013 +0200
+++ b/makefile.win32	Wed May 15 00:37:24 2013 -0600
@@ -10,7 +10,7 @@
 
 # You are encouraged NOT to set these values here, but instead make a batch file
 # which passes all these arguments to nmake, like:
-# nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" etc etc...
+# nmake -f makefile.win32 USE_SSL OPENSSL_INC_DIR="c:\dev\openssl" etc etc...
 # Both ways will work, but if you use a batch file it's easier with
 # upgrading Unreal as you won't have to edit this makefile again.
 
@@ -40,22 +40,6 @@
 #
 ### END REMOTE INCLUDES ##
 
-#### ZIPLINKS SUPPORT ####
-#To enable ziplinks support you must have zlib installed on your system
-#you can get a pre-built zlib library from http://www.winimage.com/zLibDll/
-#
-#
-#To enable ziplinks uncomment the next line:
-#USE_ZIPLINKS=1
-#
-#If your zlib library and include files are not in your compiler's
-#default locations, specify the locations here:
-#ZLIB_INC_DIR="c:\dev\zlib"
-#ZLIB_LIB_DIR="c:\dev\zlib\dll32"
-#
-#
-###### END ZIPLINKS ######
-
 ####### SSL SUPPORT ######
 #To enable SSL support you must have OpenSSL installed on your system
 #
@@ -116,18 +100,6 @@
 !ENDIF
 !ENDIF
 
-!IFDEF USE_ZIPLINKS
-ZIPCFLAGS=/D ZIP_LINKS /D ZLIB_DLL
-ZIPOBJ=SRC/ZIP.OBJ
-ZIPLIB=zlibwapi.lib
-!IFDEF ZLIB_INC_DIR
-ZLIB_INC=/I "$(ZLIB_INC_DIR)"
-!ENDIF
-!IFDEF ZLIB_LIB_DIR
-ZLIB_LIB=/LIBPATH:"$(ZLIB_LIB_DIR)"
-!ENDIF
-!ENDIF
-
 !IFDEF USE_SSL
 SSLCFLAGS=/D USE_SSL
 SSLLIBS=ssleay32.lib libeay32.lib
@@ -152,19 +124,19 @@
 !ENDIF 
 
 FD_SETSIZE=/D FD_SETSIZE=16384
-CFLAGS=$(DBGCFLAG) $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
- $(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
-CFLAGSST=$(DBGCFLAGST) $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
- $(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
+CFLAGS=$(DBGCFLAG) $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
+ $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
+CFLAGSST=$(DBGCFLAGST) $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
+ $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
 LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
- dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(CARES_LIB) $(CARESLIB) $(TRE_LIB) $(TRELIB) $(ZLIB_LIB) $(ZIPLIB) \
+ dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(CARES_LIB) $(CARESLIB) $(TRE_LIB) $(TRELIB) \
  $(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \
  /nologo $(DBGLFLAG) /out:WIRCD.EXE
-MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
- /Fosrc/modules/ /nologo $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
+MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
+ /Fosrc/modules/ /nologo $(TRE_INC) $(CARES_INC) $(LIBCURL_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
  DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
 MODLFLAGS=/link /def:src/modules/module.def wircd.lib ws2_32.lib $(TRE_LIB) $(TRELIB) $(CARES_LIB) $(OPENSSL_LIB) $(SSLLIBS) \
- $(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
+ $(LIBCURL_LIB) $(CURLLIB)
 
 INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
  ./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
@@ -182,7 +154,7 @@
  SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/RES.OBJ SRC/MODULES.OBJ \
  SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/CIDR.OBJ SRC/SSL.OBJ \
  SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ \
- SRC/EXTBANS.OBJ SRC/TIMESYNCH.OBJ $(ZIPOBJ) $(CURLOBJ)
+ SRC/EXTBANS.OBJ SRC/TIMESYNCH.OBJ $(CURLOBJ)
 
 OBJ_FILES=$(EXP_OBJ_FILES) SRC/GUI.OBJ SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RTF.OBJ \
  SRC/EDITOR.OBJ SRC/WIN32.OBJ 
@@ -475,9 +447,6 @@
 src/api-command.obj: src/api-command.c $(INCLUDES)
 	$(CC) $(CFLAGS) src/api-command.c
 
-src/zip.obj: src/zip.c $(INCLUDES)
-	$(CC) $(CFLAGS) src/zip.c
-
 src/ssl.obj: src/ssl.c $(INCLUDES)
 	$(CC) $(CFLAGS) src/ssl.c
 
@@ -503,8 +472,8 @@
 MODULES: $(DLL_FILES)
 
 src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
-	$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
-	      $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) $(TRE_INC) /Fosrc/modules/ \
+	$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(OPENSSL_INC) /nologo \
+	      $(SSLCFLAGS) $(CURLCFLAGS) $(TRE_INC) /Fosrc/modules/ \
 	      /I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE \
 	      /D _USE_32BIT_TIME_T $(MOD_FILES) \
 	      $(MODLFLAGS) /OUT:src/modules/commands.dll
diff -r e63bf7596cda src/Makefile
--- a/src/Makefile	Fri May 10 19:32:14 2013 +0200
+++ b/src/Makefile	Wed May 15 00:37:24 2013 -0600
@@ -27,7 +27,7 @@
 	s_conf.o s_debug.o s_err.o s_extra.o s_kline.o \
 	s_misc.o s_numeric.o s_serv.o s_svs.o $(STRTOUL) socket.o \
 	ssl.o s_user.o charsys.o scache.o send.o support.o umodes.o \
-	version.o whowas.o zip.o cidr.o random.o extcmodes.o \
+	version.o whowas.o cidr.o random.o extcmodes.o \
 	extbans.o md5.o api-isupport.o api-command.o $(URL)
 
 SRC=$(OBJS:%.o=%.c)
@@ -53,7 +53,7 @@
 	../include/resource.h ../include/setup.h ../include/sjoin.h \
 	../include/sock.h ../include/ssl.h ../include/struct.h ../include/sys.h \
 	../include/threads.h ../include/types.h ../include/url.h \
-	../include/version.h ../include/whowas.h ../include/zip.h
+	../include/version.h ../include/whowas.h
 
 all: build
 
@@ -111,9 +111,6 @@
 auth.o: auth.c $(INCLUDES)
 	$(CC) $(CFLAGS) -c auth.c
 
-zip.o: zip.c $(INCLUDES)
-	$(CC) $(CFLAGS) -c zip.c
-
 send.o: send.c $(INCLUDES)
 	$(CC) $(CFLAGS) -c send.c
 
diff -r e63bf7596cda src/ircd.c
--- a/src/ircd.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/ircd.c	Wed May 15 00:37:24 2013 -0600
@@ -850,16 +850,6 @@
 		error=1;
 	}
 #endif
-#ifdef ZIP_LINKS
-	runtime = zlibVersion();
-	compiledfor = ZLIB_VERSION;
-	if (*compiledfor != *runtime)
-	{
-		version_check_logerror("Zlib version mismatch: compiled for '%s', library is '%s'",
-			compiledfor, runtime);
-		error = 1;
-	}
-#endif
 #ifdef USE_LIBCURL
 	/* Perhaps someone should tell them to do this a bit more easy ;)
 	 * problem is runtime output is like: 'libcurl/7.11.1 zlib/1.2.1 c-ares/1.2.0'
@@ -1448,9 +1438,6 @@
 #ifdef USE_SSL
 	fprintf(stderr, "                     using %s\n", SSLeay_version(SSLEAY_VERSION));
 #endif
-#ifdef ZIP_LINKS
-	fprintf(stderr, "                     using zlib %s\n", zlibVersion());
-#endif
 #ifdef USE_LIBCURL
 	fprintf(stderr, "                     using %s\n", curl_version());
 #endif
diff -r e63bf7596cda src/list.c
--- a/src/list.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/list.c	Wed May 15 00:37:24 2013 -0600
@@ -158,10 +158,6 @@
 			MyFree((char *)cptr->passwd);
 		if (cptr->error_str)
 			MyFree(cptr->error_str);
-#ifdef ZIP_LINKS
-		if (cptr->zip)
-			zip_free(cptr);
-#endif
 		if (cptr->hostp)
 			unreal_free_hostent(cptr->hostp);
 	}
diff -r e63bf7596cda src/modules/Makefile.in
--- a/src/modules/Makefile.in	Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/Makefile.in	Wed May 15 00:37:24 2013 -0600
@@ -30,7 +30,7 @@
 	../include/resource.h ../include/setup.h ../include/sjoin.h \
 	../include/sock.h ../include/ssl.h ../include/struct.h ../include/sys.h \
 	../include/threads.h ../include/types.h ../include/url.h \
-	../include/version.h ../include/whowas.h ../include/zip.h
+	../include/version.h ../include/whowas.h
 
 R_MODULES= \
 	 m_sethost.so m_chghost.so m_chgident.so m_setname.so \
diff -r e63bf7596cda src/modules/m_netinfo.c
--- a/src/modules/m_netinfo.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_netinfo.c	Wed May 15 00:37:24 2013 -0600
@@ -154,17 +154,6 @@
 	    ("Link %s -> %s is now synced [secs: %li recv: %ld.%hu sent: %ld.%hu]",
 	    cptr->name, me.name, (TStime() - endsync), sptr->receiveK,
 	    sptr->receiveB, sptr->sendK, sptr->sendB);
-#ifdef ZIP_LINKS
-	if ((MyConnect(cptr)) && (IsZipped(cptr)) && cptr->zip->in->total_out && cptr->zip->out->total_in) {
-		sendto_realops
-		("Zipstats for link to %s: decompressed (in): %01lu=>%01lu (%3.1f%%), compressed (out): %01lu=>%01lu (%3.1f%%)",
-			get_client_name(cptr, TRUE),
-			cptr->zip->in->total_in, cptr->zip->in->total_out,
-			(100.0*(float)cptr->zip->in->total_in) /(float)cptr->zip->in->total_out,
-			cptr->zip->out->total_in, cptr->zip->out->total_out,
-			(100.0*(float)cptr->zip->out->total_out) /(float)cptr->zip->out->total_in);
-	}
-#endif
 
 	sendto_serv_butone(&me,
 	    ":%s SMO o :\2(sync)\2 Link %s -> %s is now synced [secs: %li recv: %ld.%hu sent: %ld.%hu]",
diff -r e63bf7596cda src/modules/m_protoctl.c
--- a/src/modules/m_protoctl.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_protoctl.c	Wed May 15 00:37:24 2013 -0600
@@ -312,18 +312,6 @@
 			    proto, cptr->name));
 			cptr->proto |= PROTO_SJB64;
 		}
-		else if (strcmp(s, "ZIP") == 0)
-		{
-			if (remove)
-			{
-				cptr->proto &= ~PROTO_ZIP;
-				continue;
-			}
-			Debug((DEBUG_ERROR,
-				"Chose protocol %s for link %s",
-				proto, cptr->name));
-			cptr->proto |= PROTO_ZIP;
-		}
 		else if (strcmp(s, "TKLEXT") == 0)
 		{
 			Debug((DEBUG_ERROR, "Chose protocol %s for link %s", proto, cptr->name));
diff -r e63bf7596cda src/modules/m_server.c
--- a/src/modules/m_server.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_server.c	Wed May 15 00:37:24 2013 -0600
@@ -717,36 +717,7 @@
 			    serveropts, me.serv->numeric,
 			    (me.info[0]) ? (me.info) : "IRCers United");
 	}
-#ifdef ZIP_LINKS
-	if (aconf->options & CONNECT_ZIP)
-	{
-		if (cptr->proto & PROTO_ZIP)
-		{
-			if (zip_init(cptr, aconf->compression_level ? aconf->compression_level : ZIP_DEFAULT_LEVEL) == -1)
-			{
-				zip_free(cptr);
-				sendto_realops("Unable to setup compressed link for %s", get_client_name(cptr, TRUE));
-				return exit_client(cptr, cptr, &me, "zip_init() failed");
-			}
-			SetZipped(cptr);
-			cptr->zip->first = 1;
-		} else {
-			sendto_realops("WARNING: Remote doesnt have link::options::zip set. Compression disabled.");
-		}
-	}
-#endif
 
-#if 0
-/* Disabled because it may generate false warning when linking with cvs versions between b14 en b15 -- Syzop */
-	if ((cptr->proto & PROTO_ZIP) && !(aconf->options & CONNECT_ZIP))
-	{
-#ifdef ZIP_LINKS
-		sendto_realops("WARNING: Remote requested compressed link, but we don't have link::options::zip set. Compression disabled.");
-#else
-		sendto_realops("WARNING: Remote requested compressed link, but we don't have zip links support compiled in. Compression disabled.");
-#endif
-	}
-#endif
 	/* Set up server structure */
 	free_pending_net(cptr);
 	SetServer(cptr);
@@ -763,23 +734,19 @@
 #ifdef USE_SSL
 	if (IsSecure(cptr))
 	{
-		sendto_serv_butone(&me, ":%s SMO o :(\2link\2) Secure %slink %s -> %s established (%s)",
+		sendto_serv_butone(&me, ":%s SMO o :(\2link\2) Secure link %s -> %s established (%s)",
 			me.name,
-			IsZipped(cptr) ? "ZIP" : "",
 			me.name, inpath, (char *) ssl_get_cipher((SSL *)cptr->ssl));
-		sendto_realops("(\2link\2) Secure %slink %s -> %s established (%s)",
-			IsZipped(cptr) ? "ZIP" : "",
+		sendto_realops("(\2link\2) Secure link %s -> %s established (%s)",
 			me.name, inpath, (char *) ssl_get_cipher((SSL *)cptr->ssl));
 	}
 	else
 #endif
 	{
-		sendto_serv_butone(&me, ":%s SMO o :(\2link\2) %sLink %s -> %s established",
+		sendto_serv_butone(&me, ":%s SMO o :(\2link\2) Link %s -> %s established",
 			me.name,
-			IsZipped(cptr) ? "ZIP" : "",
 			me.name, inpath);
-		sendto_realops("(\2link\2) %sLink %s -> %s established",
-			IsZipped(cptr) ? "ZIP" : "",
+		sendto_realops("(\2link\2) Link %s -> %s established",
 			me.name, inpath);
 	}
 	(void)add_to_client_hash_table(cptr->name, cptr);
diff -r e63bf7596cda src/modules/m_stats.c
--- a/src/modules/m_stats.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_stats.c	Wed May 15 00:37:24 2013 -0600
@@ -116,7 +116,6 @@
 int stats_denyver(aClient *, char *);
 int stats_notlink(aClient *, char *);
 int stats_class(aClient *, char *);
-int stats_zip(aClient *, char *);
 int stats_officialchannels(aClient *, char *);
 int stats_spamfilter(aClient *, char *);
 
@@ -176,7 +175,6 @@
 	{ 'v', "denyver",	stats_denyver,		0 		},
 	{ 'x', "notlink",	stats_notlink,		0 		},	
 	{ 'y', "class",		stats_class,		0 		},
-	{ 'z', "zip",		stats_zip,		0 		},
 	{ 0, 	NULL, 		NULL, 			0		}
 };
 
@@ -313,10 +311,6 @@
 		"X - notlink - Send the list of servers that are not current linked");
 	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
 		"Y - class - Send the class block list");
-#ifdef ZIP_LINKS
-	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
-		"z - zip - Send compression information about ziplinked servers");
-#endif
 	sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, sptr->name,
 		"Z - mem - Send memory usage information");
 }
@@ -505,14 +499,13 @@
 #endif
 	for (link_p = conf_link; link_p; link_p = (ConfigItem_link *) link_p->next)
 	{
-		sendto_one(sptr, ":%s 213 %s C %s@%s * %s %i %s %s%s%s%s%s%s",
+		sendto_one(sptr, ":%s 213 %s C %s@%s * %s %i %s %s%s%s%s%s",
 			me.name, sptr->name, IsOper(sptr) ? link_p->username : "*",
 			IsOper(sptr) ? link_p->hostname : "*", link_p->servername,
 			link_p->port,
 			link_p->class->name,
 			(link_p->options & CONNECT_AUTO) ? "a" : "",
 			(link_p->options & CONNECT_SSL) ? "S" : "",
-			(link_p->options & CONNECT_ZIP) ? "z" : "",
 			(link_p->options & CONNECT_NODNSCACHE) ? "d" : "",
 			(link_p->options & CONNECT_NOHOSTCHECK) ? "h" : "",
 			(link_p->flag.temporary == 1) ? "T" : "");
@@ -1478,38 +1471,6 @@
 	return 0;
 }
 
-int stats_zip(aClient *sptr, char *para)
-{
-#ifdef ZIP_LINKS
-	int i;
-	aClient *acptr;
-	for (i=0; i <= LastSlot; i++)
-	{
-		if (!(acptr = local[i]))
-			continue;
-		if (!IsServer(acptr) || !IsZipped(acptr))
-			continue;
-		if (acptr->zip->in->total_out && acptr->zip->out->total_in)
-		{
-			sendto_one(sptr,
-				":%s %i %s :Zipstats for link to %s (compresslevel %d): decompressed (in): %01lu=>%01lu (%3.1f%%), compressed (out): %01lu=>%01lu (%3.1f%%)",
-				me.name, RPL_TEXT, sptr->name,
-				IsAnOper(sptr) ? get_client_name(acptr, TRUE) : acptr->name,
-				acptr->serv->conf->compression_level ? 
-				acptr->serv->conf->compression_level : ZIP_DEFAULT_LEVEL,
-				acptr->zip->in->total_in, acptr->zip->in->total_out,
-				(100.0*(float)acptr->zip->in->total_in) /(float)acptr->zip->in->total_out,
-				acptr->zip->out->total_in, acptr->zip->out->total_out,
-				(100.0*(float)acptr->zip->out->total_out) /(float)acptr->zip->out->total_in);
-		} 
-		else 
-			sendto_one(sptr, ":%s %i %s :Zipstats for link to %s: unavailable", 
-				me.name, RPL_TEXT, sptr->name, acptr->name);
-	}
-#endif
-	return 0;
-}
-
 int stats_linkinfo(aClient *sptr, char *para)
 {
 	return stats_linkinfoint(sptr, para, 0);
diff -r e63bf7596cda src/packet.c
--- a/src/packet.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/packet.c	Wed May 15 00:37:24 2013 -0600
@@ -50,10 +50,6 @@
 	char *ch1;
 	char *ch2;
 	aClient *acpt = cptr->listener;
-#ifdef ZIP_LINKS
-	int zipped = 0;
-	int done_unzip = 0;
-#endif
 
 	me.receiveB += length;	/* Update bytes received */
 	cptr->receiveB += length;
@@ -78,40 +74,7 @@
 	}
 	ch1 = cptr->buffer + cptr->count;
 	ch2 = buffer;
-#ifdef ZIP_LINKS
-	if (IsZipStart(cptr))
-	{
-		 if (*ch2 == '\n' || *ch2 == '\r')
-		 {
-		 	ch2++;
-		 	length--;
-		 }
-		 cptr->zip->first = 0;
-	} else {
-		done_unzip = 1;
-	}
 
-	if (IsZipped(cptr))
-	{
-		/* uncompressed buffer first */
-		zipped = length;
-		cptr->zip->inbuf[0] = '\0';    /* unnecessary but nicer for debugging */
-		cptr->zip->incount = 0;
-		ch2 = unzip_packet(cptr, ch2, &zipped);
-		length = zipped;
-		zipped = 1;
-		if (length == -1)
-			return exit_client(cptr, cptr, &me,
-				"fatal error in unzip_packet(1)");
-	}
-
-	/* While there is "stuff" in the compressed input to deal with,
-	 * keep loop parsing it. I have to go through this loop at least once.
-	 * -Dianora
-	 */
-	do
-	{
-#endif
 		while (--length >= 0)
 		{
 			char g = (*ch1 = *ch2++);
@@ -149,63 +112,12 @@
 				if (cptr->flags & FLAGS_DEADSOCKET)
 					return exit_client(cptr, cptr, &me,
 					    cptr->error_str ? cptr->error_str : "Dead socket");
-#ifdef ZIP_LINKS
-				if ((IsZipped(cptr)) && (zipped == 0) && (length > 0))
-				{
-					/*
-					** beginning of server connection, the buffer
-					** contained PASS/CAPAB/SERVER and is now
-					** zipped!
-					** Ignore the '\n' that should be here.
-					*/
-					/* Checked RFC1950: \r or \n can't start a
-					** zlib stream  -orabidoo
-					*/
-					zipped = length;
-					if (zipped > 0 && (*ch2 == '\n' || *ch2 == '\r'))
-					{
-						ch2++;
-						zipped--;
-					}
-					cptr->zip->first = 0;
-					ch2 = unzip_packet(cptr, ch2, &zipped);
-					length = zipped;
-					zipped = 1;
-					if (length == -1)
-						return exit_client(cptr, cptr, &me,
-							"fatal error in unzip_packet(2)");
-				}
-#endif
 				ch1 = cptr->buffer;
 			}
 			else if (ch1 <
 			    cptr->buffer + (sizeof(cptr->buffer) - 1))
 				ch1++;	/* There is always room for the null */
 		}
-#ifdef ZIP_LINKS
-		 /* Now see if anything is left uncompressed in the input
-		  * If so, uncompress it and continue to parse
-		  * -Dianora
-		  */
-		if ((IsZipped(cptr)) && cptr->zip->incount)
-		{
-			/* This call simply finishes unzipping whats left
-			 * second parameter is not used. -Dianora
-			 */
-			ch2 = unzip_packet(cptr, (char *)NULL, &zipped);
-			length = zipped;
-			zipped = 1;
-			if (length == -1)
-				return exit_client(cptr, cptr, &me,
-					"fatal error in unzip_packet(3)");
-			ch1 = ch2 + length;
-			done_unzip = 0;
-		} else {
-			done_unzip = 1;
-		}
-
-	} while(!done_unzip);
-#endif
 	cptr->count = ch1 - cptr->buffer;
 	return 0;
 }
diff -r e63bf7596cda src/s_bsd.c
--- a/src/s_bsd.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/s_bsd.c	Wed May 15 00:37:24 2013 -0600
@@ -1780,9 +1780,6 @@
 			}
 			if ((cptr->fd >= 0) && (DBufLength(&cptr->sendQ) || IsConnecting(cptr) ||
 			    (DoList(cptr) && IsSendable(cptr))
-#ifdef ZIP_LINKS
-				|| ((IsZipped(cptr)) && (cptr->zip->outcount > 0))
-#endif
 			    ))
 			{
 #ifdef USE_POLL
diff -r e63bf7596cda src/s_conf.c
--- a/src/s_conf.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/s_conf.c	Wed May 15 00:37:24 2013 -0600
@@ -262,7 +262,6 @@
 	{ CONNECT_NOHOSTCHECK, "nohostcheck" },
 	{ CONNECT_QUARANTINE, "quarantine"},
 	{ CONNECT_SSL,	"ssl"		  },
-	{ CONNECT_ZIP,	"zip"		  },
 };
 
 /* This MUST be alphabetized */
@@ -6595,10 +6594,6 @@
 		else if (!strcmp(cep->ce_varname, "ciphers"))
 			link->ciphers = strdup(cep->ce_vardata);
 #endif
-#ifdef ZIP_LINKS
-		else if (!strcmp(cep->ce_varname, "compression-level"))
-			link->compression_level = atoi(cep->ce_vardata);
-#endif
 	}
 	AddListItem(link, conf_link);
 	return 0;
@@ -6615,9 +6610,6 @@
 	char has_options = 0;
 	char has_autoconnect = 0;
 	char has_hostname_wildcards = 0;
-#ifdef ZIP_LINKS
-	char has_compressionlevel = 0;
-#endif
 	if (!ce->ce_vardata)
 	{
 		config_error("%s:%i: link without servername",
@@ -6674,14 +6666,6 @@
 					errors++;
 				}
 #endif
-#ifndef ZIP_LINKS
-				if (ofp->flag == CONNECT_ZIP)
-				{
-					config_error("%s:%i: link %s with ZIP option enabled on a non-ZIP compile",
-						cep->ce_fileptr->cf_filename, cep->ce_varlinenum, ce->ce_vardata);
-					errors++;
-				}
-#endif				
 				if (ofp->flag == CONNECT_AUTO)
 				{
 					has_autoconnect = 1;
@@ -6870,24 +6854,6 @@
 			}
 			has_ciphers = 1;
 		}
-#ifdef ZIP_LINKS
-		else if (!strcmp(cep->ce_varname, "compression-level"))
-		{
-			if (has_compressionlevel)
-			{
-				config_warn_duplicate(cep->ce_fileptr->cf_filename, 
-					cep->ce_varlinenum, "link::compression-level");
-				continue;
-			}
-			has_compressionlevel = 1;
-			if ((atoi(cep->ce_vardata) < 1) || (atoi(cep->ce_vardata) > 9))
-			{
-				config_error("%s:%i: compression-level should be in range 1..9",
-					cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
-				errors++;
-			}
-		}
-#endif
 		else
 		{
 			config_error_unknown(cep->ce_fileptr->cf_filename, cep->ce_varlinenum,
diff -r e63bf7596cda src/s_debug.c
--- a/src/s_debug.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/s_debug.c	Wed May 15 00:37:24 2013 -0600
@@ -79,9 +79,6 @@
 #ifndef OPEROVERRIDE_VERIFY
 	'o',
 #endif
-#ifdef ZIP_LINKS
-	'Z',
-#endif
 #ifdef EXTCMODE
 	'E',
 #endif
diff -r e63bf7596cda src/s_serv.c
--- a/src/s_serv.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/s_serv.c	Wed May 15 00:37:24 2013 -0600
@@ -197,10 +197,6 @@
 		if (IsAnOper(sptr))
 			sendto_one(sptr, ":%s NOTICE %s :%s", me.name, sptr->name, OPENSSL_VERSION_TEXT);
 #endif
-#ifdef ZIP_LINKS
-		if (IsAnOper(sptr))
-			sendto_one(sptr, ":%s NOTICE %s :zlib %s", me.name, sptr->name, zlibVersion());
-#endif
 #ifdef USE_LIBCURL
 		if (IsAnOper(sptr))
 			sendto_one(sptr, ":%s NOTICE %s :%s", me.name, sptr->name, curl_version());
@@ -222,15 +218,14 @@
 
 /*
  * send_proto:
- * Sends PROTOCTL message to server, taking care of whether ZIP
- * should be enabled or not.
+ * Sends PROTOCTL message to server
  * Now split up into multiple PROTOCTL messages (again), since we have
  * too many for a single line. If this breaks your services because
  * you fail to maintain PROTOCTL state, then fix them!
  */
 void send_proto(aClient *cptr, ConfigItem_link *aconf)
 {
-char buf[1024];
+char buf[1024]; //FIXME magic buffer size
 
 	/* First line */
 	sendto_one(cptr, "PROTOCTL %s", PROTOCTL_SERVER);
@@ -238,10 +233,6 @@
 	/* Second line */
 	sprintf(buf, "CHANMODES=%s%s,%s%s,%s%s,%s%s NICKCHARS=%s MLOCK",
 		CHPAR1, EXPAR1, CHPAR2, EXPAR2, CHPAR3, EXPAR3, CHPAR4, EXPAR4, langsinuse);
-#ifdef ZIP_LINKS
-	if (aconf->options & CONNECT_ZIP)
-		strcat(buf, " ZIP");
-#endif
 	sendto_one(cptr, "PROTOCTL %s", buf);
 }
 
diff -r e63bf7596cda src/send.c
--- a/src/send.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/send.c	Wed May 15 00:37:24 2013 -0600
@@ -122,17 +122,11 @@
 		for (i = LastSlot; i >= 0; i--)
 			if ((acptr = local[i]) && !(acptr->flags & FLAGS_BLOCKED)
 			    && ((DBufLength(&acptr->sendQ) > 0)
-#ifdef ZIP_LINKS
-				|| (IsZipped(acptr) && acptr->zip->outcount)
-#endif /* ZIP_LINKS */
 				) )
 				send_queued(acptr);
 	}
 	else if (cptr->fd >= 0 && !(cptr->flags & FLAGS_BLOCKED)
 	    && ((DBufLength(&cptr->sendQ) > 0)
-#ifdef ZIP_LINKS
-		|| (IsZipped(cptr) && cptr->zip->outcount)
-#endif /* ZIP_LINKS */
 		) )
 		send_queued(cptr);
 
@@ -162,9 +156,6 @@
 {
 	char *msg;
 	int  len, rlen;
-#ifdef ZIP_LINKS
-	int more = 0;
-#endif
 	if (IsBlocked(to))
 		return -1;		/* Can't write to already blocked socket */
 
@@ -181,23 +172,6 @@
 		 */
 		return -1;
 	}
-#ifdef ZIP_LINKS
-	/*
-	** Here, we must make sure than nothing will be left in to->zip->outbuf
-	** This buffer needs to be compressed and sent if all the sendQ is sent
-	*/
-	if ((IsZipped(to)) && to->zip->outcount) {
-		if (DBufLength(&to->sendQ) > 0) {
-			more = 1;
-		} else {
-			msg = zip_buffer(to, NULL, &len, 1);
-			if (len == -1)
-				return dead_link(to, "fatal error in zip_buffer()");
-			if (!dbuf_put(&to->sendQ, msg, len))
-				return dead_link(to, "Buffer allocation error");
-		}
-	}
-#endif
 	while (DBufLength(&to->sendQ) > 0)
 	{
 		msg = dbuf_map(&to->sendQ, &len);
@@ -217,20 +191,6 @@
 			SetBlocked(to);
 			break;
 		}
-#ifdef ZIP_LINKS
-		if (DBufLength(&to->sendQ) == 0 && more) {
-			/*
-			** The sendQ is now empty, compress what's left
-			** uncompressed and try to send it too
-			*/
-			more = 0;
-			msg = zip_buffer(to, NULL, &len, 1);
-			if (len == -1)
-				return dead_link(to, "fatal error in zip_buffer()");
-			if (!dbuf_put(&to->sendQ, msg, len))
-				return dead_link(to, "Buffer allocation error");
-		}
-#endif
 	}
 
 	return (IsDead(to)) ? -1 : 0;
@@ -334,20 +294,7 @@
 		return;
 	}
 
-#ifdef ZIP_LINKS
-	/*
-	** data is first stored in to->zip->outbuf until
-	** it's big enough to be compressed and stored in the sendq.
-	** send_queued is then responsible to never let the sendQ
-	** be empty and to->zip->outbuf not empty.
-	*/
-	if (IsZipped(to))
-		msg = zip_buffer(to, msg, &len, 0);
-	
-	if (len && !dbuf_put(&to->sendQ, msg, len))
-#else
 	if (!dbuf_put(&to->sendQ, msg, len))
-#endif
 	{
 		dead_link(to, "Buffer allocation error");
 		return;
diff -r e63bf7596cda src/updconf.c
--- a/src/updconf.c	Fri May 10 19:32:14 2013 +0200
+++ b/src/updconf.c	Wed May 15 00:37:24 2013 -0600
@@ -82,7 +82,6 @@
 
 struct flags linkflags[] = {
 	{ 'S', "ssl" },
-	{ 'Z', "zip" },
 	{ NULL, NULL }
 };
 
diff -r e63bf7596cda src/zip.c
--- a/src/zip.c	Fri May 10 19:32:14 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,389 +0,0 @@
-/*
- *   IRC - Internet Relay Chat, ircd/s_zip.c
- *   Copyright (C) 1996  Christophe Kalt
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 1, or (at your option)
- *   any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *   $Id$
- */
-#include "struct.h"
-#include "common.h"
-#include "sys.h"
-#include "numeric.h"
-#include "msg.h"
-#include "channel.h"
-#include "version.h"
-#include "proto.h"
-#include "h.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef  ZIP_LINKS
-/*
-** Important note:
-**      The provided buffers for uncompression and compression *MUST* be big
-**      enough for any operation to complete.
-**
-**      s_bsd.c current settings are that the biggest packet size is 16k
-**      (but socket buffers are set to 8k..)
-*/
-
-/*
-** size of the buffer holding compressed data
-**
-** outgoing data:
-**      must be enough to hold compressed data resulting of the compression
-**      of up to ZIP_MAXIMUM bytes
-** incoming data:
-**      must be enough to hold cptr->zip->inbuf + what was just read
-**      (cptr->zip->inbuf should never hold more than ONE compression block.
-**      The biggest block allowed for compression is ZIP_MAXIMUM bytes)
-*/
-#define ZIP_BUFFER_SIZE         (ZIP_MAXIMUM + READBUF_SIZE)
-
-/*
-** size of the buffer where zlib puts compressed data
-**      must be enough to hold uncompressed data resulting of the
-**      uncompression of zibuffer
-**
-**      I'm assuming that at best, ratio will be 25%. (tests show that
-**      best ratio is around 40%).
-**
-** ------
-**
-** On an hybrid test net, we kept filling up unzipbuf
-** original was 4*ZIP_BUFFER_SIZE
-** -Dianora
-**
-** ------
-**
-** And even that (6x) is not enough, now set to 16x and made it
-** dynamically allocated on the heap upon the first zip_init()
-** since the size of this is getting a bit out hand (ahem..).
-** -Syzop
-**/
-
-#define UNZIP_BUFFER_SIZE       16 * ZIP_BUFFER_SIZE
-
-/* buffers */
-static char *unzipbuf = NULL;
-/* static  char    unzipbuf[UNZIP_BUFFER_SIZE]; */
-static  char    zipbuf[ZIP_BUFFER_SIZE];
-
-/*
-** zip_init
-**      Initialize compression structures for a server.
-**      If failed, zip_free() has to be called.
-*/
-int     zip_init(aClient *cptr, int compressionlevel)
-{
-  cptr->zip  = (aZdata *) MyMalloc(sizeof(aZdata));
-  cptr->zip->incount = 0;
-  cptr->zip->outcount = 0;
-
-  cptr->zip->in  = (z_stream *) MyMalloc(sizeof(z_stream));
-  bzero(cptr->zip->in, sizeof(z_stream)); /* Just to be sure -- Syzop */
-  cptr->zip->in->total_in = 0;
-  cptr->zip->in->total_out = 0;
-  cptr->zip->in->zalloc = NULL;
-  cptr->zip->in->zfree = NULL;
-  cptr->zip->in->data_type = Z_ASCII;
-  if (inflateInit(cptr->zip->in) != Z_OK)
-    {
-      cptr->zip->out = NULL;
-      return -1;
-    }
-
-  cptr->zip->out = (z_stream *) MyMalloc(sizeof(z_stream));
-  bzero(cptr->zip->out, sizeof(z_stream)); /* Just to be sure -- Syzop */
-  cptr->zip->out->total_in = 0;
-  cptr->zip->out->total_out = 0;
-  cptr->zip->out->zalloc = NULL;
-  cptr->zip->out->zfree = NULL;
-  cptr->zip->out->data_type = Z_ASCII;
-  if (deflateInit(cptr->zip->out, compressionlevel) != Z_OK)
-    return -1;
-
-  if (!unzipbuf)
-  {
-  	unzipbuf = MyMallocEx(UNZIP_BUFFER_SIZE); /* big chunk! */
-  	if (!unzipbuf)
-  	{
-  		ircd_log(LOG_ERROR, "zip_init(): out of memory (trying to alloc %d bytes)!", UNZIP_BUFFER_SIZE);
-  		sendto_realops("zip_init(): out of memory (trying to alloc %d bytes)!", UNZIP_BUFFER_SIZE);
-  		return -1;
-  	}
-  }
-
-
-  return 0;
-}
-
-/*
-** zip_free
-*/
-void    zip_free(aClient *cptr)
-{
-	ClearZipped(cptr);
-	if (cptr->zip)
-	{
-		if (cptr->zip->in)
-			inflateEnd(cptr->zip->in);
-		MyFree(cptr->zip->in);
-		cptr->zip->in = NULL;
-		if (cptr->zip->out) 
-			deflateEnd(cptr->zip->out);
-		MyFree(cptr->zip->out);
-		cptr->zip->out = NULL;
-		MyFree(cptr->zip);
-		cptr->zip = NULL;
-	}
-}
-
-/*
-** unzip_packet
-**      Unzip the buffer,
-**      put anything left in cptr->zip->inbuf, update cptr->zip->incount
-**
-**      will return the uncompressed buffer, length will be updated.
-**      if a fatal error occurs, length will be set to -1
-*/
-char *unzip_packet(aClient *cptr, char *buffer, int *length)
-{
-  z_stream *zin = cptr->zip->in;
-  int   r;
-  char  *p;
-
-  if(cptr->zip->incount)
-    {
-      /* There was a "chunk" of uncompressed data without a newline
-       * left over from last unzip_packet. So pick that up, and unzip
-       * some more data. Note, buffer parameter isn't used in this case.
-       * -Dianora
-       */
-      memcpy((void *)unzipbuf,(void *)cptr->zip->inbuf,cptr->zip->incount);
-      zin->avail_out = UNZIP_BUFFER_SIZE - cptr->zip->incount;
-      zin->next_out = (Bytef *) (unzipbuf + cptr->zip->incount);
-      cptr->zip->incount = 0;
-      cptr->zip->inbuf[0] = '\0'; /* again unnecessary but nice for debugger */
-    }
-  else
-    {
-      /* Start unzipping this buffer, if I fill up output buffer,
-       * then snag whatever uncompressed incomplete chunk I have at
-       * the top of the uncompressed buffer, save it for next pass.
-       * -Dianora
-       */
-      if(!buffer)       /* Sanity test never hurts */
-        {
-          *length = -1;
-          return((char *)NULL);
-        }
-      zin->next_in = (Bytef *) buffer;
-      zin->avail_in = *length;
-      zin->next_out = (Bytef *) unzipbuf;
-      zin->avail_out = UNZIP_BUFFER_SIZE;
-    }
-
-  switch (r = inflate(zin, Z_NO_FLUSH))
-    {
-    case Z_OK:
-      if (zin->avail_in)
-        {
-          cptr->zip->incount = 0;
-
-          if(zin->avail_out == 0)
-            {
-              /* ok, filled up output buffer, complain about it, but go on.
-               * I need to find any incomplete "chunk" at the top of
-               * the uncompressed output buffer, and save it for next call.
-               * N.B. That cptr->zip->inbuf isn't really necessary
-               * i.e. re-entrancy is not required since I know
-               * there is more uncompressed data to do, and dopacket()
-               * will not return until its all parsed. -db
-               */
-              sendto_realops("Overflowed unzipbuf increase UNZIP_BUFFER_SIZE");
-              /* We now give up again, continueing was a nice idea but is too dangerous
-               * and often leads to crashes!
-               * Note that any code below the two lines will not be executed.
-               */
-              *length = -1;
-              return((char *)NULL);
-#if 0
-              /*
-               * I used to just give up here....
-               * length = -1;
-               * return((char *)NULL);
-               */
-
-              /* Check for pathological case where output
-               * just happened to have finished with a newline
-               * and there is still input to do
-               * Just stuff a newline in for now, it will be discarded
-               * anyway, and continue parsing. -db
-               */
-
-              if((zin->next_out[0] == '\n') || (zin->next_out[0] == '\r'))
-                {
-                  cptr->zip->inbuf[0] = '\n';
-                  cptr->zip->incount = 1;
-                }
-              else
-                {
-                  /* Scan from the top of output, look for a complete
-                   * "chunk" N.B. there should be a check for p hitting
-                   * the bottom of the unzip buffer. -db
-                   */
-
-                  for(p = (char *) zin->next_out;p >= unzipbuf;)
-                    {
-                      if((*p == '\r') || (*p == '\n'))
-                        break;
-                      zin->avail_out++;
-                      p--;
-                      cptr->zip->incount++;
-                    }
-                  /* A little sanity test never hurts -db */
-                  if(p == unzipbuf)
-                    {
-                      cptr->zip->incount = 0;
-                      cptr->zip->inbuf[0] = '\0';       /* only for debugger */
-                      *length = -1;
-                      return((char *)NULL);
-                    }
-                  /* Ok, stuff this "chunk" into inbuf
-                   * for next call -Dianora 
-                   */
-                  p++;
-                  cptr->zip->incount--;
-                  memcpy((void *)cptr->zip->inbuf,
-                         (void *)p,cptr->zip->incount);
-                }
-#endif
-            }
-          else
-            {
-              /* outbuf buffer is not full, but still
-               * input to do. I suppose its just bad data.
-               * However I don't have much other choice here but to
-               * give up in complete disgust -db
-               */
-              *length = -1;
-              return((char *)NULL);
-            }
-        }
-
-      *length = UNZIP_BUFFER_SIZE - zin->avail_out;
-      return unzipbuf;
-
-    case Z_BUF_ERROR:
-      if (zin->avail_out == 0)
-        {
-          sendto_realops("inflate() returned Z_BUF_ERROR: %s",
-                      (zin->msg) ? zin->msg : "?");
-          *length = -1;
-        }
-      break;
-
-    case Z_DATA_ERROR: /* the buffer might not be compressed.. */
-      if (!strncmp("ERROR ", buffer, 6))
-        {
-          cptr->zip->first = 0;
-          ClearZipped(cptr);
-          /*
-           * This is not sane at all.  But if other server
-           * has sent an error now, it is probably closing
-           * the link as well.
-           */
-          return buffer;
-        }
-        /* Let's be nice and give them a hint ;) -- Syzop */
-        sendto_realops("inflate() error: * Are you perhaps linking zipped with non-zipped? *");
-        sendto_realops("Hint: link::options::zip should be the same at both sides (either both disabled or both enabled)");
-        /* no break */
-
-    default: /* error ! */
-      /* should probably mark link as dead or something... */
-      sendto_realops("inflate() error(%d): %s", r,
-                  (zin->msg) ? zin->msg : "?");
-      *length = -1; /* report error condition */
-      break;
-    }
-  return((char *)NULL);
-}
-
-/*
-** zip_buffer
-**      Zip the content of cptr->zip->outbuf and of the buffer,
-**      put anything left in cptr->zip->outbuf, update cptr->zip->outcount
-**
-**      if flush is set, then all available data will be compressed,
-**      otherwise, compression only occurs if there's enough to compress,
-**      or if we are reaching the maximum allowed size during a connect burst.
-**
-**      will return the uncompressed buffer, length will be updated.
-**      if a fatal error occurs, length will be set to -1
-*/
-char *zip_buffer(aClient *cptr, char *buffer, int *length, int flush)
-{
-  z_stream *zout = cptr->zip->out;
-  int   r;
-
-  if (buffer)
-    {
-      /* concatenate buffer in cptr->zip->outbuf */
-      memcpy((void *)(cptr->zip->outbuf + cptr->zip->outcount), (void *)buffer,
-             *length );
-      cptr->zip->outcount += *length;
-    }
-  *length = 0;
-
-#if 0
-  if (!flush && ((cptr->zip->outcount < ZIP_MINIMUM) ||
-                 ((cptr->zip->outcount < (ZIP_MAXIMUM - BUFSIZE)) &&
-                  CBurst(cptr))))
-	/* Implement this? more efficient? or not? -- Syzop */
-#else
-  if (!flush && (cptr->zip->outcount < ZIP_MINIMUM))
-#endif
-    return((char *)NULL);
-
-  zout->next_in = (Bytef *) cptr->zip->outbuf;
-  zout->avail_in = cptr->zip->outcount;
-  zout->next_out = (Bytef *) zipbuf;
-  zout->avail_out = ZIP_BUFFER_SIZE;
-
-  switch (r = deflate(zout, Z_PARTIAL_FLUSH))
-    {
-    case Z_OK:
-      if (zout->avail_in)
-        {
-          /* can this occur?? I hope not... */
-          sendto_realops("deflate() didn't process all available data!");
-        }
-      cptr->zip->outcount = 0;
-      *length = ZIP_BUFFER_SIZE - zout->avail_out;
-      return zipbuf;
-
-    default: /* error ! */
-      sendto_realops("deflate() error(%d): %s", r, (zout->msg) ? zout->msg : "?");
-      *length = -1;
-      break;
-    }
-  return((char *)NULL);
-}
-
-#endif  /* ZIP_LINKS */
