diff -uNrd ircd-hybrid-6.0/COPYING ircd-pi1.0a/COPYING
--- ircd-hybrid-6.0/COPYING	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/COPYING	Sat May  4 22:54:46 2002
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 2 of the License, 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff -uNrd ircd-hybrid-6.0/ChangeLog ircd-pi1.0a/ChangeLog
--- ircd-hybrid-6.0/ChangeLog	Wed Jan  3 22:31:12 2001
+++ ircd-pi1.0a/ChangeLog	Thu May 23 13:40:41 2002
@@ -1,3 +1,73 @@
+*** 20020523 by smoli
+- fixed install stuff (config. certificate etc.)
+- show ssl clients in /lusers
+- optimized excess flood trigger
+- prefix in /links when ssl link
+- +S umode for ssl clients (stripped when sent across unencrypted links)
+- +z chanmode, set when only +S users are in.
+- /spoof command
+- show server/client certificate and session infos on /cert
+- handle setuid()/setgid() shit on listeners < 1024 nicely
+- some nicer chroot() code
+- nice colored startup
+- added /broadcast -> notice to every user
+- removed redundant +/-o, +/-v
+- show "real" channame on join/part (not the one the user supplied)
+- ssl /stat (cache hits etc.)
+- buffer issues fixed with SSL_pending
+- allowed ciphers in S: line
+- pem passphrase in S: line
+- +x chanmode, allows only +S users to join.
+- m_names prefix and m_who flag when oper +e
+- certificate verification (very very alpha!)
+- assembler string functions (broken)
+
+NOTE: read doc/ssl.txt!!!!!!!!!!!!!!!!!!
+
+*** 20020510 by smoli
+- match C/N lines by name, not host (attach_cn_lines),
+  this solves some connect problems.
+- improved linking further.
+- SSL server links.
+- umode +S designates encrypted clients. (leads to RPL_WHOISSSL).
+  RPL_WHOISSSL gets only displayed when all links between A & B are
+  encrypted.
+
+*** 20020504 by smoli
+- cleaned directory tree somewhat.
+- remade autotools scripts (improved make install, make uninstall)
+- remote whois capability. (show idle time on remote users)
+- SSL client connections.
+- removed zlib from source tree, who needs it?
+  and anyway i think everyone has a shared zlib.
+
+*** 20020428 by smoli
+- fixed toupper issues with new chars
+- chanops can't kick +e opers
+- changed zlib CFLAGS (-O2)
+
+*** 20020317 by smoli (aka shifty)
+- added /ungline command
+- /gline can now be done by only 2 opers
+- beautified enforce code
+- removed redundant modes
+- allow now some...äh.... "european" chars...
+- removed annoying ircii message
+- merged with new zlib (1.1.4)
+
+*** 20010912 by shifty
+- revved patchlevel to rc2
+- fixed multiple wallops messages when forcing modes
+- self_loose_ops was enforced when oper was +e. (fixed)
+
+*** 20010910 by shifty
+- revved patchlevel to rc1
+- added mode enforcement code
+- enabled spoofing in config.h
+
+*** 20010909 by shifty
+- ircd-pi-0.1 was born!
+
 *** 20010103_2 by lusky
 - fixed a spelling error (wc)
 
diff -uNrd ircd-hybrid-6.0/Hybrid-team ircd-pi1.0a/Hybrid-team
--- ircd-hybrid-6.0/Hybrid-team	Thu Oct  5 23:00:46 2000
+++ ircd-pi1.0a/Hybrid-team	Wed Dec 31 19:00:00 1969
@@ -1,54 +0,0 @@
-$Id: Hybrid-team,v 1.15 2000/10/06 03:00:46 lusky Exp $
-
-  The hybrid team is a group of ircd coders who were frustrated
-with the instability and all-out "dirtiness" of the efnet ircd's
-available. "hybrid" is the name for the collective efforts of a group
-of people, all of us.
-
-Anyone is welcome to contribute to this effort. We are serious about this.
-
-  We have run the code through "purify", a commercial program designed
-to find memory leaks. It continues to be checked with malloc tools today.
-The code has been prototyped. Profiling has also been done to catch 
-slow portions of the code. "crufty" code has been re-written, obsolete
-code has been ripped out. We have also looked at making the code as easy
-to setup up and run as possible using configure etc. 
-Finally speed enhancements and other enhancements have been made to this ircd,
-and continue to be made to this ircd. 
-
- That is not to say that there are still not bugs, There are always bugs.
-But we review each others work on this project, and are open
-to bug reports.
-
-The core team as, of this major release:
-
-cosine, Patrick Alken <wnder@uwns.underworld.net>
-Dianora, Diane Bruce <db@db.net>
-is, Edward Brocklesby <ejb@leguin.org.uk>
-Neph|l|m, Adel Mezibra <adel@cybercable.fr>
-pro, Bill Jonus <proggy@earthling.net>
-Rodder, Jon Lusky <lusky@blown.net>
-Wohali, Joan Touzet <joant@cadence.com>
-
-The following people have contributed blood, sweat, and/or code to
-this release of hybrid, in nick alphabetical order:
-
-Bleep, Thomas Helvey <tomh@inxpress.net>
-CBongo, Chris Bongaarts <cab@tc.umn.edu>
-comstud, Chris Behrens <cbehrens@concentric.net>
-echo, Adam J. Durana <adam@caca.com>
-FlashMan, Craig A. Huegen <chuegen@quadrunner.com>
-jailbird, Dustin Marquess <jailbird@alcatraz.fdf.net>
-johan, Johannes Erdfelt <jerdfelt@eng.mindspring.net>
-LarZ, Matthew Ramsey <mjr@blackened.com>
-orabidoo, Roger Espel LLima <espel@unix.bigots.org>
-Seaner, Sean McVeigh <sdlmcvei@uwaterloo.ca>
-Shadowfax, Michael Pearce <mpearce@varner.com>
-Slowaris, Ryan Parker <rjp@wpmedia.com>
-ThemBones, Brian Kraemer <kraemer@u.washington.edu>
-White_Dragon, Chip Norkus, <wd@dal.net>
-WintrHawk, Jake Khuon <khuon@GCtr.Net>
-
-Others are welcome. Always.
-
-email bug fixes/complaints/rotten tomatoes to ircd-hybrid@the-project.org
diff -uNrd ircd-hybrid-6.0/INSTALL ircd-pi1.0a/INSTALL
--- ircd-hybrid-6.0/INSTALL	Thu Jun  8 01:22:29 2000
+++ ircd-pi1.0a/INSTALL	Thu May 23 13:51:47 2002
@@ -1,47 +1,59 @@
-ircd-hybrid-6 INSTALL
----------------------
-$Id: INSTALL,v 1.6 2000/06/08 05:22:29 lusky Exp $
+Ircd INSTALL
+------------
+$Id: INSTALL,v 1.3 2002/05/23 17:51:47 smoli Exp $
 
 As of hybrid-4, the distribution uses gnu autoconf instead of the old
 Config script. 
 
-0.  Read the RELNOTES and ChangeLog files to find out about the
-exciting new features in this version.  Changes to ircd.conf are
-documented in doc/example.conf.
+0.  Read the ChangeLog file to find out about the exciting new features
+    in this version. Changes to ircd.conf are documented in doc/hub.conf
+    and doc/leaf.conf.
 
-1.  Run the configure script.  It will create include/setup.h and the
-Makefiles to match your system:
+1.  Run the configure script. It will create include/setup.h and the
+    Makefiles to match your system:
 	./configure
 
-2.  Edit the the "include/config.h" file.  This allows you to change
-various options of how the ircd will operate.  Notes: "HARD_FDLIMIT_"
-and "INIT_MAXCLIENTS" must be less than the maximum file descriptors
-per process allowed by your kernel, and must be <= FD_SETSIZE (usually
-defined in system includes, but may need to overridden in the Makefile.
-Note that the old OS definitions are gone, autoconf handles this now.
-Finally set the various PATHs to where you are going to install the ircd.
-Do not install the ircd to "."--the install script is not designed to
-install ircd properly on top of the existing source tree.
+2.  "make" should build ircd.
 
-3.  "make" should build ircd.
+3.  "make install" to install the server and tools in the path defined.
+    (default: /usr/local/ircd)
 
-4.  "make install" to install the server and tools in the path defined
-in config.h.
+And if compiled with --with-ssl:
 
+4.  "make install-cert" to install a self-signed certificate. (not recommened)
+    of
+    "make install-req" to install a certificate request.
 
-HOW TO GET HELP:
-----------------
-Send Check or Money Order to...  just kidding!  Commerical support
-for ircd-hybrid is not available at this time.  There is now a
-mailing list for general discussion of Hybrid.  To subscribe
-to the Hybrid List, send email to listmanager@the-project.org with
-a single line in the body containing "subscribe hybrid".
+5.  Copy the certificate of your CA to /usr/ircd/ca.pem when you
+    want to verify certificates. (recommened)
 
-If hybrid crashes on you, PLEASE CONTACT ircd-hybrid@the-project.org
-ASAP with a backtrace of the core.  The hybrid team can't fix bugs if
-no one tells us about them!
+=== configure options =========================================================
 
-If there is a new feature you would like to see in the next major
-release of ircd-hybrid, please post it to the public mailing list,
-hybrid@the-project.org.
+--enable-assembler is currently BROKEN!
+
+NOTE: You can only use /restart when compiled static (because of chroot) and
+      no listeners below port 1024.
+
+--enable-hub
 
+HUB - enable server-server routing
+If your server is running as a a HUB Server then define this.
+A HUB Server has many servers connect to it at the same as opposed
+to a leaf which just has 1 server (typically the uplink). Define this
+correctly for performance reasons.
+
+--disable-backup
+
+When enabled this will cause the server to have a main link and several
+backup links.
+When the main link gets lost it tries one of the backup links. After the
+server has obtained a backup connection it watches for his main link to
+return. The main link is always the first server with the highest connection
+class number.
+
+--disable-enforce
+
+OPER_ENFORCE - opers can enforce modes
+Let this defined if you want to have an oper flag E that allows opers
+to gain user mode +e. User mode +e lets the oper enforce everything.
+     
diff -uNrd ircd-hybrid-6.0/LICENSE ircd-pi1.0a/LICENSE
--- ircd-hybrid-6.0/LICENSE	Thu Oct  5 23:00:46 2000
+++ ircd-pi1.0a/LICENSE	Wed Dec 31 19:00:00 1969
@@ -1,250 +0,0 @@
-$Id: LICENSE,v 1.2 2000/10/06 03:00:46 lusky Exp $
-
-		    GNU GENERAL PUBLIC LICENSE
-		     Version 1, February 1989
-
- Copyright (C) 1989 Free Software Foundation, Inc.
-                    675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The license agreements of most software companies try to keep users
-at the mercy of those companies.  By contrast, our General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  The
-General Public License applies to the Free Software Foundation's
-software and to any other program whose authors commit to using it.
-You can use it for your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Specifically, the General Public License is designed to make
-sure that you have the freedom to give away or sell copies of free
-software, that you receive source code or can get it if you want it,
-that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of a such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must tell them their rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any program or other work which
-contains a notice placed by the copyright holder saying it may be
-distributed under the terms of this General Public License.  The
-"Program", below, refers to any such program or work, and a "work based
-on the Program" means either the Program or any work containing the
-Program or a portion of it, either verbatim or with modifications.  Each
-licensee is addressed as "you".
-
-  1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this
-General Public License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this General Public License
-along with the Program.  You may charge a fee for the physical act of
-transferring a copy.
-
-  2. You may modify your copy or copies of the Program or any portion of
-it, and copy and distribute such modifications under the terms of Paragraph
-1 above, provided that you also do the following:
-
-    a) cause the modified files to carry prominent notices stating that
-    you changed the files and the date of any change; and
-
-    b) cause the whole of any work that you distribute or publish, that
-    in whole or in part contains the Program or any part thereof, either
-    with or without modifications, to be licensed at no charge to all
-    third parties under the terms of this General Public License (except
-    that you may choose to grant warranty protection to some or all
-    third parties, at your option).
-
-    c) If the modified program normally reads commands interactively when
-    run, you must cause it, when started running for such interactive use
-    in the simplest and most usual way, to print or display an
-    announcement including an appropriate copyright notice and a notice
-    that there is no warranty (or else, saying that you provide a
-    warranty) and that users may redistribute the program under these
-    conditions, and telling the user how to view a copy of this General
-    Public License.
-
-    d) You may charge a fee for the physical act of transferring a
-    copy, and you may at your option offer warranty protection in
-    exchange for a fee.
-
-Mere aggregation of another independent work with the Program (or its
-derivative) on a volume of a storage or distribution medium does not bring
-the other work under the scope of these terms.
-
-  3. You may copy and distribute the Program (or a portion or derivative of
-it, under Paragraph 2) in object code or executable form under the terms of
-Paragraphs 1 and 2 above provided that you also do one of the following:
-
-    a) accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of
-    Paragraphs 1 and 2 above; or,
-
-    b) accompany it with a written offer, valid for at least three
-    years, to give any third party free (except for a nominal charge
-    for the cost of distribution) a complete machine-readable copy of the
-    corresponding source code, to be distributed under the terms of
-    Paragraphs 1 and 2 above; or,
-
-    c) accompany it with the information you received as to where the
-    corresponding source code may be obtained.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form alone.)
-
-Source code for a work means the preferred form of the work for making
-modifications to it.  For an executable file, complete source code means
-all the source code for all modules it contains; but, as a special
-exception, it need not include source code for modules which are standard
-libraries that accompany the operating system on which the executable
-file runs, or for standard header files or definitions files that
-accompany that operating system.
-
-  4. You may not copy, modify, sublicense, distribute or transfer the
-Program except as expressly provided under this General Public License.
-Any attempt otherwise to copy, modify, sublicense, distribute or transfer
-the Program is void, and will automatically terminate your rights to use
-the Program under this License.  However, parties who have received
-copies, or rights to use copies, from you under this General Public
-License will not have their licenses terminated so long as such parties
-remain in full compliance.
-
-  5. By copying, distributing or modifying the Program (or any work based
-on the Program) you indicate your acceptance of this license to do so,
-and all its terms and conditions.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these
-terms and conditions.  You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein.
-
-  7. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of the license which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-the license, you may choose any version ever published by the Free Software
-Foundation.
-
-  8. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	Appendix: How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to humanity, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
-  To do so, attach the following notices to the program.  It is safest to
-attach them to the start of each source file to most effectively convey
-the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19xx name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the
-appropriate parts of the General Public License.  Of course, the
-commands you use may be called something other than `show w' and `show
-c'; they could even be mouse-clicks or menu items--whatever suits your
-program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  program `Gnomovision' (a program to direct compilers to make passes
-  at assemblers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-That's all there is to it!
diff -uNrd ircd-hybrid-6.0/Makefile.in ircd-pi1.0a/Makefile.in
--- ircd-hybrid-6.0/Makefile.in	Thu Oct  5 23:00:46 2000
+++ ircd-pi1.0a/Makefile.in	Thu May 23 13:58:53 2002
@@ -1,134 +1,370 @@
-#************************************************************************
-#*   IRC - Internet Relay Chat, Makefile
-#*   Copyright (C) 1990, Jarkko Oikarinen
-#*
-#*   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: Makefile.in,v 1.18 2000/10/06 03:00:46 lusky Exp $
-#*/
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
 
-RM=@RM@
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Default CFLAGS
-CFLAGS = -g -O2 -DNDEBUG
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-# Default make flags - you may want to uncomment this on a multicpu machine
-#MFLAGS = -j 4
+@SET_MAKE@
+SHELL = @SHELL@
 
-#
-# For developers
-# CFLAGS= -g -O2 -Wall
-#
-# You may need to define the FD_SETSIZE in order to overrule
-# the system one.
-#CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
-#
-# NOTE: The rest of these definitions may or may not work, I haven't tested them --JRL
-#
-# use the following on MIPS:
-#CFLAGS= -DNDEBUG -systype bsd43 -DSYSTYPE_BSD43
-# For Irix 4.x (SGI), use the following:
-#CFLAGS= -DNDEBUG -g -cckr
-#
-# on NEXT use:
-#CFLAGS= -DNDEBUG -bsd
-#on NeXT other than 2.0:
-#IRCDLIBS= -lsys_s
-#
-# AIX 370 flags
-#CFLAGS= -DNDEBUG -D_BSD -Hxa
-#IRCDLIBS= -lbsd
-#
-# Dynix/ptx V2.0.x
-#CFLAGS= -DNDEBUG  -O -Xo
-#IRCDLIBS= -lsocket -linet -lnsl -lseq
-# 
-# Dynix/ptx V1.x.x
-#IRCDLIBS= -lsocket -linet -lnsl -lseq
-#
-#use the following on SUN OS without nameserver libraries inside libc
-#IRCDLIBS=-lresolv
-#
-# ESIX
-#CFLAGS= -DNDEBUG -O -I/usr/ucbinclude
-#IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
-#
-# LDFLAGS - flags to send the loader (ld). SunOS users may want to add
-# -Bstatic here.
-#
-#LDFLAGS=-Bstatic
-#
-#Dell SVR4
-#CC=gcc
-#CFLAGS= -DNDEBUG -O2
-#IRCDLIBS=-lsocket -lnsl -lucb
-#IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
 
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+ircddir = $(exec_prefix)/@IRCDDIR@
 
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
 
-SHELL=/bin/sh
-SUBDIRS=zlib src tools
-# ZSUBDIRS=zlib $(SUBDIRS)
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
 
-MAKE = make ${MFLAGS} 'CFLAGS=${CFLAGS}' 'INSTALL=${INSTALL}' 'LDFLAGS=${LDFLAGS}'
-# ZMAKE = make 'CFLAGS=${CFLAGS}' 'INSTALL=${INSTALL}' 'LDFLAGS=${LDFLAGS}'
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+PACKAGE = @PACKAGE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+SUBDIRS = include src tools doc
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/setup.h
+DIST_SOURCES =
 
-all:	build
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+	uninstall-info-recursive all-recursive install-data-recursive \
+	install-exec-recursive installdirs-recursive install-recursive \
+	uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = ./include/setup.h.in COPYING ChangeLog INSTALL \
+	Makefile.in TODO aclocal.m4 config.sub config.guess \
+	configure configure.in install-sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: Makefile all-recursive
 
-build:
-	-@if [ ! -f include/setup.h ] ; then \
-		echo "Hmm...doesn't look like you've run configure..."; \
-		echo "Doing so now."; \
-		sh configure; \
-	fi
-#	cd zlib; \
-#	${ZMAKE} build; cd ..
-	@for i in $(SUBDIRS); do \
-		echo "Building $$i";\
-		cd $$i;\
-		${MAKE} build; cd ..;\
+.SUFFIXES:
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+#$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+#	$(SHELL) ./config.status --recheck
+#$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+#	cd $(srcdir) && $(AUTOCONF)
+
+#$(ACLOCAL_M4):  configure.in 
+#	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+include/setup.h: include/stamp-h1
+	@if test ! -f $@; then \
+	  rm -f include/stamp-h1; \
+	  $(MAKE) include/stamp-h1; \
+	else :; fi
+
+include/stamp-h1: $(srcdir)/./include/setup.h.in $(top_builddir)/config.status
+	@rm -f include/stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status include/setup.h
+
+#$(srcdir)/./include/setup.h.in:  $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+#	cd $(top_srcdir) && $(AUTOHEADER)
+#	touch $(srcdir)/./include/setup.h.in
+
+distclean-hdr:
+	-rm -f include/setup.h
+uninstall-info:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  local_target="$$target"; \
+	  (cd $$subdir && $(MAKE) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then continue; fi; \
+	  local_target="$$target"; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 
-clean:
-	${RM} -f *~ core
-	@for i in $(SUBDIRS); do \
-		echo "Cleaning $$i";\
-		cd $$i;\
-		${MAKE} clean; cd ..;\
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+	mkdir $(distdir)
+	$(mkinstalldirs) $(distdir)/./include $(distdir)/src
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
 	done
-	-@if [ -f include/setup.h ] ; then \
-	echo "To really restart installation, make distclean" ; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	$(am__remove_distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	chmod a-w $(distdir)
+	dc_install_base=`cd $(distdir)/=inst && pwd` \
+	  && cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+	      || { echo "ERROR: files left after uninstall:" ; \
+	           find $$dc_install_base -type f -print ; \
+	           exit 1; } >&2 ) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;x'
+distcleancheck: distclean
+	if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
 	fi
+	test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check: check-recursive
+installdirs: installdirs-recursive
+installdirs:
 
-distclean:
-	${RM} -f Makefile *~ *.rej *.orig core ircd.core
-	${RM} -f config.status config.cache config.log
-	cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
-	@for i in $(SUBDIRS); do \
-		echo "Cleaning $$i";\
-		cd $$i;\
-		${MAKE} distclean; cd ..;\
-	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-depend:
-	@for i in $(SUBDIRS); do \
-		echo "Making dependencies in $$i";\
-		cd $$i;\
-		${MAKE} depend; cd ..;\
-	done
+#install: all
+#	@$(MAKE) $(AM_MAKEFLAGS) install-exec install-data
 
-install: all
-	@./tools/install_ircd
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -rf Makefile stamp-h stamp-h[0-9]* autom4te.cache $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-generic clean-recursive
+
+distclean: distclean-recursive distclean-generic distclean-hdr distclean-tags
+	-rm -f config.status config.cache config.log
+
+dvi: dvi-recursive
+
+info: info-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+maintainer-clean: maintainer-clean-recursive
+
+mostlyclean: mostlyclean-recursive
+
+uninstall: uninstall-info
+
+uninstall-info: uninstall-info-recursive
 
+install-cert:
+	(cd doc && make install-cert)        
+instell-req:
+	(cd doc && make install-req)        
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all check clean clean-generic \
+	clean-recursive dist dist-all dist-gzip distcheck \
+	distclean distclean-generic distclean-hdr distclean-recursive \
+	distclean-tags distcleancheck distdir dvi dvi-recursive \
+	info info-recursive install install-data \
+	install-data-recursive install-exec install-exec-recursive \
+	install-info install-info-recursive install-man \
+	install-recursive install-strip installcheck \
+	installdirs installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-recursive \
+	tags tags-recursive uninstall uninstall-info-recursive \
+	uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/README.FIRST ircd-pi1.0a/README.FIRST
--- ircd-hybrid-6.0/README.FIRST	Thu Jun 22 01:40:52 2000
+++ ircd-pi1.0a/README.FIRST	Wed Dec 31 19:00:00 1969
@@ -1,37 +0,0 @@
-ircd-hybrid-6 README
---------------------
-$Id: README.FIRST,v 1.9 2000/06/22 05:40:52 lusky Exp $
-
-If you don't read this first, we won't help you.
-:-)
-
-See the INSTALL document for info on configuring and compiling
-ircd-hybrid.
-
-IMPORTANT. I/K line handling has changed significantly.  There are also
-many new types of conf lines.  Please see RELNOTES and doc/example.conf
-for more information.  The default port is no longer specified in the M
-line, you must add a specific P line for it.
-
-TRANSLATION: You *MUST* fix your conf before upgrading from hybrid-5.
-
-LOTS OF THINGS HAVE CHANGED IN CONFIG.H.  PLEASE READ THROUGH IT.
-
-There is now a mailing list for general discussion of Hybrid.  To subscribe
-to the Hybrid List, send email to listmanager@the-project.org with
-a single line in the body containing "subscribe hybrid".
-
-SOLARIS USERS: this code appears to tickle a bug in older gcc and
-egcs ONLY on 64-bit Solaris7.  gcc-2.95 and SunPro C on 64bit should
-work fine, and any gcc or SunPro compiler on 32bit.
-
-SUPPORT PLATFORMS: this code should compile without any warnings
-on FreeBSD 3.x, RedHat 6.2, and Solaris 7/sparc.  Please let us know
-if you find otherwise.  It probably does not compile on AIX, IRIX,
-or libc5 Linux.
-
-CYGWIN USERS: This code is known to compile and run somewhat under
-Cygwin 1.1.2.  You will need BIND-4.9.7 and libcrypt to compile hybrid
-under Cygwin.  I have ported BIND 4.9.7 to Cygwin and written a standalone
-md5-based libcrypt that I will make available seperately.
-
diff -uNrd ircd-hybrid-6.0/README.small_nets ircd-pi1.0a/README.small_nets
--- ircd-hybrid-6.0/README.small_nets	Wed May 26 21:30:54 1999
+++ ircd-pi1.0a/README.small_nets	Wed Dec 31 19:00:00 1969
@@ -1,48 +0,0 @@
-  On a stand alone server, make sure you #undef all of
-NO_CHANOPS_ON_SPLIT, NO_JOIN_ON_SPLIT, PRESERVE_CHANNEL_ON_SPLIT
-NO_JOIN_ON_SPLIT_SIMPLE in config.h Otherwise, you will have trouble
-with non opered clients gaining ops in new channels.
-
-  ircd-hybrid has been primarily geared for EFnet, where 40k clients
-is becoming the norm. But for smaller non EFnet nets, thats going
-to cost your server memory, because it will be expecting the large numbers
-of clients on EFnet that will never happen on a smaller net.
-
-  You can easily tune your hybrid to use less memory on startup
-by modifying the file "list.c" in src
-
-  These comments will be found in list.c
-
-/* Number of Link's to pre-allocate at a time 
-   for Efnet 1000 seems reasonable, 
-   for smaller nets who knows? -Dianora
-   */
-
-#define LINK_PREALLOCATE 1024
-
-/* Number of aClient structures to preallocate at a time
-   for Efnet 1024 is reasonable 
-   for smaller nets who knows? -Dianora
-   */
-
-/* This means you call MyMalloc 30 some odd times,
-   rather than 30k times -Dianora
-*/
-
-#define CLIENTS_PREALLOCATE 1024
-
-  I suggest you trim these numbers as needed, to fit your estimated
-needs. You could use 64 for each for example, on a server that 
-normally never saw more than 60 people on the entire network.
-Keeping it a multiple of 2 is advisable, but not absolutely
-necessary. You will just waste a tiny bit of memory in one of the
-bit maps.
-
-  Other things to reduce, to use less startup memory.
-(from flier@globecom.net) All of these are in config.h
-
-   - reduce NICKNAMEHISTORYLENGTH from 15000 to say 1000
-   - reduce MAXSENDQLENGTH from 5050000 to 500000
-   - reduce INITIAL_DBUFS from 1000 to 300
-
-  - Dianora
diff -uNrd ircd-hybrid-6.0/RELNOTES ircd-pi1.0a/RELNOTES
--- ircd-hybrid-6.0/RELNOTES	Sun Oct 10 02:02:50 1999
+++ ircd-pi1.0a/RELNOTES	Wed Dec 31 19:00:00 1969
@@ -1,70 +0,0 @@
-ircd-hybrid-6 Release Notes
----------------------------
-$Id: RELNOTES,v 1.3 1999/10/10 06:02:50 lusky Exp $
-
-Operating system dependencies have been removed, there is no longer any
-special code for AIX, SEQUENT, DYNIX, HPUX, Solaris, or pyr. We have
-made a large effort to remove as many portability issues as possible.
-The code should compile and run on any modern UNIX operating system that
-supports POSIX.1 and ANSI-C. We know the code builds cleanly on BSD,
-Solaris, and Linux. If it fails to work for you, or works on another
-platform not listed here, let us know. We won't make any guarantees
-about changing much to support anything wierd, but if including a
-standard header clears up a problem we'll probably do that.  This code
-is known to _not_ compile on AIX.
-
-The code now uses the ANSI-C assert macro in many places, this means
-that if an invariant isn't, the server will core on the spot hopefully.
-Using the assert macro also tends to slow down the code a bit, if you
-like living dangerously and are running the beta, use -DNDEBUG when you
-build the server and it will turn off the asserts. Production servers
-should always be compiled with -DNDEBUG for maximum efficiency. NOTE: If
-you are running a server with the asserts turned on and it cores on you,
-please send us a stack trace if you can.
-  
-Command lines are different for this version of hybrid, most of the old
-flags for debugging and running ircd from a terminal are gone and a
-couple new ones have been added. Valid command line options that require
-compile time options are silently ignored. 
-
-Command line options for this version:
--d filename - specify d:line file
--f filename - specify config file
--h hostname - specify server name
--k filename - specify k:line file
--l filename - specify log file
--n          - do not fork, run in foreground
--v          - print version and exit
--x          - set debug level, if compiled for debug logging
-
-Minimal logging is enabled by default, for the alpha/beta release it is
-set to L_DEBUG in s_log.c by default, this can be changed to other
-levels if the log gets too noisy (it shouldn't). Look at the log level
-constants in s_log.h for allowable values. A SET option will be
-available in the future for setting the value in real time. If you
-define USE_SYSLOG in your config ircd will log to both the ircd.log file
-and syslog.
-
-Authentication and DNS lookups are handled a bit differently now,
-clients are completely ignored until both auth and dns have completed.
-This is not significantly different than earlier behavior but you should
-notice slightly faster client connects.
-
-
-I line handling has changed.  Ident lookups are now always done for
-connecting clients.   An @ in the I line no longer turns off the tilde
-'~' adornment in the case of an unidented client. You must use the
-'-' prefix in the I line to turn off the ~ prefix for an unidented client.
-Clients which do not ident will be sent into the kline/iline matching code
-with a leading ~ character.  i.e. to allow a client onto your server
-without a ~, use an I line such as:
-	I:NOMATCH::-*db@*some.host.on.the.net
-This will match this user, and will remove the ~ as seen on the net.
-
-KNOWN BUGS:
-There is a possibility that ircd will core dump if you there are errors
-in your conf file.
-
-Send bug reports to ircd-hybrid@the-project.org.  Please include a gdb
-backtrace and a copy of your config.h.
-
diff -uNrd ircd-hybrid-6.0/TODO ircd-pi1.0a/TODO
--- ircd-hybrid-6.0/TODO	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/TODO	Thu May 23 10:40:08 2002
@@ -0,0 +1,4 @@
+- improve certificate verification
+- show verification status in /cert
+- asm optimization of string and sprintf functions (currently broken)
+- global clone/floodnet detector
diff -uNrd ircd-hybrid-6.0/aclocal.m4 ircd-pi1.0a/aclocal.m4
--- ircd-hybrid-6.0/aclocal.m4	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/aclocal.m4	Thu May 23 13:45:44 2002
@@ -0,0 +1,857 @@
+# aclocal.m4 generated automatically by aclocal 1.6.1 -*- Autoconf -*-
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+AC_PREREQ([2.52])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
+ AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_][CC],
+                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_][CXX],
+                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.6.1])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4						-*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_$1_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST([DEPDIR])
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional \"$1\" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_PREREQ([2.52])
+
+# serial 6
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  We must strip everything past the first ":",
+# and everything past the last "/".
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+	      m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
+		    m4_if(regexp([$1], [^/.*]), -1,
+			  [.],
+			  patsubst([$1], [^\(/\).*], [\1])),
+		    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+	      patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+])# _AM_DIRNAME
+
+
+# The stamp files are numbered to have different names.
+# We could number them on a directory basis, but that's additional
+# complications, let's have a unique counter.
+m4_define([_AM_STAMP_Count], [0])
+
+
+# _AM_STAMP(HEADER)
+# -----------------
+# The name of the stamp file for HEADER.
+AC_DEFUN([_AM_STAMP],
+[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
+AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
+                               [:.*])))/stamp-h[]_AM_STAMP_Count])
+
+
+# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
+# ------------------------------------------------------------
+# We used to try to get a real timestamp in stamp-h.  But the fear is that
+# that will cause unnecessary cvs conflicts.
+AC_DEFUN([_AM_CONFIG_HEADER],
+[# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+AC_CONFIG_HEADERS([$1],
+                  [# update the timestamp
+echo 'timestamp for $1' >"_AM_STAMP([$1])"
+$2],
+                  [$3])
+])# _AM_CONFIG_HEADER
+
+
+# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
+# --------------------------------------------------------------
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
+])# AM_CONFIG_HEADER
+
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
+
diff -uNrd ircd-hybrid-6.0/autoconf/acconfig.h ircd-pi1.0a/autoconf/acconfig.h
--- ircd-hybrid-6.0/autoconf/acconfig.h	Thu Jul 22 01:41:13 1999
+++ ircd-pi1.0a/autoconf/acconfig.h	Wed Dec 31 19:00:00 1969
@@ -1,43 +0,0 @@
-/*
- * $Id: acconfig.h,v 1.3 1999/07/22 05:41:13 tomh Exp $
- */
-
-/* Define only one of POSIX, BSD, or SYSV signals.  */
-/* Define if your system has reliable POSIX signals.  */
-#undef POSIX_SIGNALS
-
-/* Define if your system has reliable BSD signals.  */
-#undef BSD_RELIABLE_SIGNALS
-
-/* Define if your system has unreliable SYSV signals.  */
-#undef SYSV_UNRELIABLE_SIGNALS
-
-/* Define MALLOCH to <malloc.h> if needed.  */
-#if !defined(STDC_HEADERS)
-#undef MALLOCH
-#endif
-
-/* Define if you have the poll() system call.  */
-#undef USE_POLL
-
-/* Chose only one of NBLOCK_POSIX, NBLOCK_BSD, and NBLOCK_SYSV */
-/* Define if you have posix non-blocking sockets (O_NONBLOCK) */
-#undef NBLOCK_POSIX
-
-/* Define if you have BSD non-blocking sockets (O_NDELAY) */
-#undef NBLOCK_BSD
-
-/* Define if you have SYSV non-blocking sockets (FIONBIO) */
-#undef NBLOCK_SYSV
-
-/* Define if you have the mmap() function.  */
-#undef USE_MMAP
-
-/* Define if you are running DYNIXPTX.  */
-#undef OS_DYNIXPTX
-
-/* Define if you are running HPUX.  */
-#undef OS_HPUX
-
-/* Define if you are running SOLARIS2.  */
-#undef OS_SOLARIS2
diff -uNrd ircd-hybrid-6.0/autoconf/config.guess ircd-pi1.0a/autoconf/config.guess
--- ircd-hybrid-6.0/autoconf/config.guess	Thu Oct  5 23:00:51 2000
+++ ircd-pi1.0a/autoconf/config.guess	Wed Dec 31 19:00:00 1969
@@ -1,694 +0,0 @@
-#! /bin/sh
-# $Id: config.guess,v 1.2 2000/10/06 03:00:51 lusky Exp $
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
-#
-# This file 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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    alpha:OSF1:*:*)
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
-	exit 0 ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-cbm-sysv4
-	exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
-      exit 0 ;;
-    amiga:OpenBSD:*:*)
-      echo m68k-cbm-openbsd${UNAME_RELEASE}
-      exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    NILE:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:NetBSD:*:*)
-	echo m68k-atari-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-atari-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3*:NetBSD:*:*)
-	echo m68k-sun-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-sun-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:NetBSD:*:*)
-	echo m68k-apple-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-apple-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	sed 's/^	//' << EOF >dummy.c
-	int main (argc, argv) int argc; char **argv; {
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	${CC-cc} dummy.c -o dummy \
-	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
-        fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i?86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=4.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-	    9000/8?? )            HP_ARCH=hppa1.0 ;;
-	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    i?86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit 0 ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE}
-	exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-	exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE}
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
-    F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-	echo m68k-hp-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp3[0-9][05]:OpenBSD:*:*)
-	echo m68k-hp-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    i*:CYGWIN*:*)
-	echo i386-pc-cygwin32
-	exit 0 ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin32
-	exit 0 ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    *:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us.
-	ld_help_string=`ld --help 2>&1`
-	if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-	  echo "powerpc-unknown-linux-gnu" ; exit 0
-	elif test "${UNAME_MACHINE}" = "alpha" ; then
-	  echo alpha-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "sparc" ; then
-	  echo sparc-unknown-linux-gnu ; exit 0
-	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-	  # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  test ! -d /usr/lib/ldscripts/. \
-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
-#ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-	fi
-	exit 0 ;;
-    i?86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit 0 ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    i?86:LynxOS:2.*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit 0 ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-cat >dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-#echo '(Unable to guess system type)' 1>&2
-
-exit 1
diff -uNrd ircd-hybrid-6.0/autoconf/config.sub ircd-pi1.0a/autoconf/config.sub
--- ircd-hybrid-6.0/autoconf/config.sub	Thu Oct  5 23:00:51 2000
+++ ircd-pi1.0a/autoconf/config.sub	Wed Dec 31 19:00:00 1969
@@ -1,928 +0,0 @@
-#! /bin/sh
-# $Id: config.sub,v 1.2 2000/10/06 03:00:51 lusky Exp $
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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 2 of the License, 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., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-if [ x$1 = x ]
-then
-	echo Configuration name missing. 1>&2
-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-	echo "or     $0 ALIAS" 1>&2
-	echo where ALIAS is a recognized configuration type. 1>&2
-	exit 1
-fi
-
-# First pass through any local machine types.
-case $1 in
-	*local*)
-		echo $1
-		exit 0
-		;;
-	*)
-	;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  linux-gnu*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple)
-		os=
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
-		| arme[lb] | pyramid \
-		| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-		| alpha | we32k | ns16k | clipper | i370 | sh \
-		| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-		| pdp11 | mips64el | mips64orion | mips64orionel \
-		| sparc | sparclet | sparclite | sparc64)
-		basic_machine=$basic_machine-unknown
-		;;
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i[3456]86)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
-	      | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-	      | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-	      | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-	      | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-cbm
-		;;
-	amigados)
-		basic_machine=m68k-cbm
-		os=-amigados
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-cbm
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	[ctj]90-cray)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[3456]86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i[3456]86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i[3456]86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i[3456]86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-        pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5)
-		basic_machine=i586-intel
-		;;
-	pentiumpro | p6)
-		basic_machine=i686-intel
-		;;
-	pentium-* | p5-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	k5)
-		# We don't have specific support for AMD's K5 yet, so just call it a Pentium
-		basic_machine=i586-amd
-		;;
-	nexen)
-		# We don't have specific support for Nexgen yet, so just call it a Pentium
-		basic_machine=i586-nexgen
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=rs6000-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-	        ;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-	        ;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
-        xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	mips)
-		basic_machine=mips-mips
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sparc)
-		basic_machine=sparc-sun
-		;;
-        cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-unixware* | svr4*)
-		os=-sysv4
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -linux-gnu* | -uxpv*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-ns2 )
-	        os=-nextstep2
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigados
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-        *-gould)
-		os=-sysv
-		;;
-        *-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-        *-sgi)
-		os=-irix
-		;;
-        *-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f301-fujitsu)
-		os=-uxpv
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-vxsim* | -vxworks*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
diff -uNrd ircd-hybrid-6.0/autoconf/configure.in ircd-pi1.0a/autoconf/configure.in
--- ircd-hybrid-6.0/autoconf/configure.in	Thu Oct  5 23:00:51 2000
+++ ircd-pi1.0a/autoconf/configure.in	Wed Dec 31 19:00:00 1969
@@ -1,188 +0,0 @@
-dnl $Id: configure.in,v 1.8 2000/10/06 03:00:51 lusky Exp $
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(include/class.h)
-
-AC_CONFIG_AUX_DIR(autoconf)
-AC_CONFIG_HEADER(include/setup.h zlib/setup.h)
-
-PACKAGE=ircd-hybrid
-VERSION=6.0
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_ISC_POSIX
-AC_CANONICAL_SYSTEM
-AC_PROG_MAKE_SET
-AC_PATH_PROG(RM,rm)
-AC_PATH_PROG(CP,cp)
-AC_PROG_INSTALL
-
-dnl Checks for libraries.
-dnl Replace `main' with a function in -lnsl:
-AC_CHECK_LIB(nsl, gethostbyname)
-AC_CHECK_FUNC(res_mkquery,, AC_CHECK_LIB(resolv, res_mkquery))
-AC_CHECK_LIB(socket, socket)
-AC_CHECK_FUNC(crypt,, AC_CHECK_LIB(descrypt, crypt,,AC_CHECK_LIB(crypt, crypt,,)))
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(sys/param.h unistd.h errno.h string.h stdlib.h stddef.h getopt.h) 
-
-dnl Check for stdarg.h - if we can't find it, halt configure
-AC_CHECK_HEADER(stdarg.h, , AC_MSG_ERROR(** stdarg.h could not be found - ircd-hybrid will not compile without it **))
-
-dnl Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
-
-dnl check for poll() call
-AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL),)
-
-dnl taken from ircd's Config script
-AC_MSG_CHECKING(for non-blocking socket implementation)
-AC_TRY_RUN(
-[
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
-{
-#if defined(O_NONBLOCK)
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
-#endif
-	exit(1);
-}
-], AC_DEFINE(NBLOCK_POSIX) AC_MSG_RESULT( O_NONBLOCK ),, AC_MSG_RESULT( cross compiling ))
-
-AC_MSG_CHECKING(for mmap support)
-AC_TRY_RUN(
-[
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-int main() {
-  return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); 
-}
-], AC_DEFINE(USE_MMAP) AC_MSG_RESULT(yes),AC_MSG_RESULT(no), AC_MSG_RESULT( unable to test ))
-
-AC_TRY_RUN(
-[
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
-{
-#if defined( O_NDELAY ) && !defined( NBLOCK_POSIX )
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
-#endif
-	exit(1);
-}
-], AC_DEFINE(NBLOCK_BSD) AC_MSG_RESULT( O_NDELAY ),, AC_MSG_RESULT(unable to test))
-
-AC_TRY_RUN(
-[
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
-{
-#if !defined(NBLOCK_BSD) && !defined(NBLOCK_POSIX) && defined(FIONBIO)
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, FIONBIO))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
-#endif /* !NBLOCK_POSIX && !NBLOCK_BSD && FIONBIO */
-	exit(1);
-}
-], AC_DEFINE(NBLOCK_SYSV) AC_MSG_RESULT(FIONBIO),, AC_MSG_RESULT(unable to test))
-
-dnl taken from ircd's Config script
-AC_MSG_CHECKING(signal implementation)
-AC_TRY_RUN(
-[
-int main()
-{
-#if defined(HAVE_SIGACTION)
-	exit(0);
-#else
-	exit(1);
-#endif
-}
-], AC_DEFINE(POSIX_SIGNALS) AC_MSG_RESULT(posix),
-    AC_TRY_RUN(
-[
-#include <signal.h>
-int calls = 0;
-void handler()
-{
-	if (calls) return;
- 	calls++;
-	kill(getpid(), SIGTERM);
-	sleep(1);
-}
-int main()
-{
-	signal(SIGTERM, handler);
-	kill(getpid(), SIGTERM);
-	exit (0);
-}
-], AC_DEFINE(BSD_RELIABLE_SIGNALS) AC_MSG_RESULT(bsd),
-    AC_DEFINE(SYSV_UNRELIABLE_SIGNALS) AC_MSG_RESULT(sysv), AC_MSG_RESULT(uknown)),
-AC_MSG_RESULT(unknown))
-
-dnl don't add more of these unless it's critical.  Trying to get rid of them.
-AC_MSG_CHECKING(operating system)
-case "$target" in
-*-solaris2*) AC_DEFINE(OS_SOLARIS2) AC_MSG_RESULT(Solaris 2.x) ;;
-*) AC_MSG_RESULT(nothing special required) ;;
-esac
-
-AC_OUTPUT(Makefile src/Makefile tools/Makefile zlib/Makefile)
-
-
diff -uNrd ircd-hybrid-6.0/autoconf/install-sh ircd-pi1.0a/autoconf/install-sh
--- ircd-hybrid-6.0/autoconf/install-sh	Thu Oct  5 23:00:51 2000
+++ ircd-pi1.0a/autoconf/install-sh	Wed Dec 31 19:00:00 1969
@@ -1,250 +0,0 @@
-#! /bin/sh
-# $Id: install-sh,v 1.4 2000/10/06 03:00:51 lusky Exp $
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff -uNrd ircd-hybrid-6.0/config.guess ircd-pi1.0a/config.guess
--- ircd-hybrid-6.0/config.guess	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/config.guess	Sun May  5 16:52:30 2002
@@ -0,0 +1,1320 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-02-15'
+
+# This file 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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	rm -f $dummy.c $dummy.o $dummy.rel ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
+	    UNAME_MACHINE_ARCH=unknown
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
+	.globl main
+	.align 4
+	.ent main
+main:
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
+	.end main
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+			0-0)
+				UNAME_MACHINE="alpha"
+				;;
+			1-0)
+				UNAME_MACHINE="alphaev5"
+				;;
+			1-1)
+				UNAME_MACHINE="alphaev56"
+				;;
+			1-101)
+				UNAME_MACHINE="alphapca56"
+				;;
+			2-303)
+				UNAME_MACHINE="alphaev6"
+				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+		    rm -f $dummy.c $dummy
+		fi ;;
+	esac
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:3*)
+	echo i386-pc-interix3
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 
+	CPU=mipsel 
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif 
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	rm -f $dummy.c
+	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+		echo i386-${UNAME_MACHINE}-nto-qnx
+	else
+		echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	fi
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -uNrd ircd-hybrid-6.0/config.sub ircd-pi1.0a/config.sub
--- ircd-hybrid-6.0/config.sub	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/config.sub	Sun May  5 16:52:30 2002
@@ -0,0 +1,1438 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-02-15'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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 2 of the License, 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dsp16xx \
+	| fr30 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
+	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
+	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+	| mipsisa32 \
+	| mn10200 | mn10300 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+	| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | ymp | sv1 | [cj]90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		os=-linux-gnu
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		os=-linux-gnu
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+        pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i686-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+	        ;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+	        ;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+	        ;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+	        ;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3d | t3e | t90)
+		basic_machine=${basic_machine}-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	windows32)
+		basic_machine=i386-pc
+		os=-windows32-msvcrt
+		;;
+        xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	mips)
+		if [ x$os = x-linux-gnu ]; then
+			basic_machine=mips-unknown
+		else
+			basic_machine=mips-mips
+		fi
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh3eb | sh4eb)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+        cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto*)
+		os=-nto-qnx
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+	        os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+	        os=-mint
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+        pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+        *-gould)
+		os=-sysv
+		;;
+        *-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+        *-sgi)
+		os=-irix
+		;;
+        *-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -uNrd ircd-hybrid-6.0/configure ircd-pi1.0a/configure
--- ircd-hybrid-6.0/configure	Thu Oct  5 23:00:46 2000
+++ ircd-pi1.0a/configure	Thu May 23 13:58:10 2002
@@ -1,28 +1,310 @@
 #! /bin/sh
-
-# $Id: configure,v 1.9 2000/10/06 03:00:46 lusky Exp $
-
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.53.
 #
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
-# Defaults:
-ac_help=
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conftest.sh
+  echo  "exit 0"   >>conftest.sh
+  chmod +x conftest.sh
+  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conftest.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
 ac_default_prefix=/usr/local
-# Any additions from configure.in:
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="src/ircd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
 
 # Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -31,10 +313,15 @@
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
@@ -48,17 +335,9 @@
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
 ac_prev=
 for ac_option
 do
-
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
     eval "$ac_prev=\$ac_option"
@@ -66,59 +345,59 @@
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case "$ac_option" in
+  case $ac_option in
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
+    bindir=$ac_optarg ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
+    ac_prev=build_alias ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
+    build_alias=$ac_optarg ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   | --da=*)
-    datadir="$ac_optarg" ;;
+    datadir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
 
   -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
       *) ac_optarg=yes ;;
     esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
+    eval "enable_$ac_feature='$ac_optarg'" ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -127,95 +406,47 @@
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
+    exec_prefix=$ac_optarg ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host ;;
+    ac_prev=host_alias ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
+    host_alias=$ac_optarg ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
+    includedir=$ac_optarg ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
+    infodir=$ac_optarg ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
+    libdir=$ac_optarg ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
+    libexecdir=$ac_optarg ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
   | --localstate | --localstat | --localsta | --localst \
@@ -224,19 +455,19 @@
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
+    localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
+    mandir=$ac_optarg ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
+  | --no-cr | --no-c | -n)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -250,26 +481,26 @@
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
+    oldincludedir=$ac_optarg ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
+    prefix=$ac_optarg ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
+    program_prefix=$ac_optarg ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
+    program_suffix=$ac_optarg ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -286,7 +517,7 @@
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
+    program_transform_name=$ac_optarg ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -296,7 +527,7 @@
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
+    sbindir=$ac_optarg ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -307,58 +538,57 @@
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
+    sharedstatedir=$ac_optarg ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
+    site=$ac_optarg ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
+    srcdir=$ac_optarg ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
+    sysconfdir=$ac_optarg ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
+    ac_prev=target_alias ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
+    target_alias=$ac_optarg ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
     ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
       *) ac_optarg=yes ;;
     esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
+    eval "with_$ac_package='$ac_optarg'" ;;
 
   -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -369,99 +599,110 @@
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
+    x_includes=$ac_optarg ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
+    x_libraries=$ac_optarg ;;
 
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
   *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
 fi
-exec 5>./config.log
 
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
 
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
 do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
   esac
 done
 
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
 
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=include/class.h
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
     srcdir=..
@@ -471,13 +712,391 @@
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
   else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
   fi
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --enable-debug          Enable debugging mode
+  --enable-assembler      Enable assembler optimizations
+  --enable-warnings       Enable compiler warnings
+  --enable-static         Enable static linking
+  --disable-enforce       IRCops can enforce everything (default)
+  --disable-backup        Disable automatic uplink backup
+  --enable-hub            Enable server-server routing
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-ircd-dir=DIR     Override default ircd root PREFIX/ircd
+  --with-ircd-user        Specify IRCD user account
+  --with-ssl              Enable SSL support
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
 
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+           test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.53.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+  case $ac_arg in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n ) continue ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    continue ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  case " $ac_configure_args " in
+    *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+    *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+       ac_sep=" " ;;
+  esac
+  # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
 if test -z "$CONFIG_SITE"; then
   if test "x$prefix" != xNONE; then
@@ -488,44 +1107,108 @@
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
 
 if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
 else
-  echo "creating cache $cache_file"
-  > $cache_file
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
 
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
 
 
 
+
+
+
+
+
+
+am__api_version="1.6"
 ac_aux_dir=
-for ac_dir in autoconf $srcdir/autoconf; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -534,230 +1217,1058 @@
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in autoconf $srcdir/autoconf" 1>&2; exit 1; }
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
 fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
+      done
+    done
+    ;;
+esac
+done
 
 
-PACKAGE=ircd-hybrid
-VERSION=6.0
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
-# Extract the first word of "gcc", so it can be a program name with args.
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+ PACKAGE=ircd
+ VERSION=pi1.0a
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+ac_config_headers="$ac_config_headers include/setup.h"
+
+
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:555: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:585: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
   set dummy $ac_cv_prog_CC
   shift
-  if test $# -gt 0; then
+  if test $# != 0; then
     # We chose a different compiler from the bogus one.
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    set dummy "$ac_dir/$ac_word" "$@"
+    set dummy "$as_dir/$ac_word" ${1+"$@"}
     shift
     ac_cv_prog_CC="$@"
   fi
 fi
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:636: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
- ;;
-    esac
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+  test -n "$ac_ct_CC" && break
+done
 
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+  CC=$ac_ct_CC
+fi
 
-cat > conftest.$ac_ext << EOF
+fi
 
-#line 679 "configure"
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 
-main(){return(0);}
-EOF
-if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+    a.out ) # We found the default executable, but exeext='' is most
+            # certainly right.
+            break;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
   else
-    ac_cv_prog_cc_cross=yes
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
   fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
 fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
 
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:715: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
 #endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
 else
-  ac_cv_prog_gcc=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+   { (exit 1); exit 1; }; }
 fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
 
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
 else
-  GCC=
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
 fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:743: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
-  ac_cv_prog_cc_g=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
 fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
+  CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
     CFLAGS="-g -O2"
@@ -771,212 +2282,441 @@
     CFLAGS=
   fi
 fi
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
 
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:775: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
-  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
-  echo "$ac_t""yes" 1>&6
-  ISC=yes # If later tests want to check for ISC.
-  cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
-  if test "$GCC" = yes; then
-    CC="$CC -posix"
-  else
-    CC="$CC -Xp"
-  fi
 else
-  echo "$ac_t""no" 1>&6
-  ISC=
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
 fi
+rmdir .deps 2>/dev/null
 
 
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+ac_config_commands="$ac_config_commands depfiles"
 
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
 
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
 
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
 
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:823: checking host system type" >&5
 
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
 
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:844: checking target system type" >&5
 
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
 
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
+depcc="$CC"   am_compiler_list=
 
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:862: checking build system type" >&5
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
 
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CC_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
 
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
 
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:885: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+
+        echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strerror ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_cposix_strerror=yes
 else
-  eval ac_cv_prog_make_${ac_make}_set=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_cposix_strerror=no
 fi
-rm -f conftestmake
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+  LIBS="$LIBS -lcposix"
+fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:914: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case "$RM" in
-  /*)
-  ac_cv_path_RM="$RM" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_RM="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
 fi
-RM="$ac_cv_path_RM"
-if test -n "$RM"; then
-  echo "$ac_t""$RM" 1>&6
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-# Extract the first word of "cp", so it can be a program name with args.
-set dummy cp; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:949: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+  RANLIB=$ac_ct_RANLIB
 else
-  case "$CP" in
-  /*)
-  ac_cv_path_CP="$CP" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_CP="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
+  RANLIB="$ac_cv_prog_RANLIB"
 fi
-CP="$ac_cv_path_CP"
-if test -n "$CP"; then
-  echo "$ac_t""$CP" 1>&6
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$ac_t""no" 1>&6
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
 fi
 
 # Find a good install program.  We prefer a C program (faster),
@@ -986,389 +2726,614 @@
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:993: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
       done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
+    done
+    ;;
+esac
+done
+
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
+    INSTALL=$ac_cv_path_install
   else
     # As a last resort, use the slow shell script.  We don't cache a
     # path for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
+    INSTALL=$ac_install_sh
   fi
 fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1047: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for deflate in -lz" >&5
+echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_deflate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1055 "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gethostbyname();
+   builtin and then its argument prototype would still apply.  */
+char deflate ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+deflate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_deflate=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_z_deflate=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
+if test $ac_cv_lib_z_deflate = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
 
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  { { echo "$as_me:$LINENO: error:
+WARNING: ircd needs a system with libz.so (zlib).
+You will need to get and install zlib then recompile ircd.
+You may obtain it from:
+ftp://sunsite.cnlab-switch.ch/mirror/infozip/zlib
+" >&5
+echo "$as_me: error:
+WARNING: ircd needs a system with libz.so (zlib).
+You will need to get and install zlib then recompile ircd.
+You may obtain it from:
+ftp://sunsite.cnlab-switch.ch/mirror/infozip/zlib
+" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
 
+
+echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_gethostbyname=no
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
 
   LIBS="-lnsl $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for res_mkquery""... $ac_c" 1>&6
-echo "configure:1094: checking for res_mkquery" >&5
-if eval "test \"`echo '$''{'ac_cv_func_res_mkquery'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for res_mkquery" >&5
+echo $ECHO_N "checking for res_mkquery... $ECHO_C" >&6
+if test "${ac_cv_func_res_mkquery+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1099 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_mkquery(); below.  */
+    which can conflict with char res_mkquery (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char res_mkquery();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char res_mkquery ();
+char (*f) ();
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_res_mkquery) || defined (__stub___res_mkquery)
 choke me
 #else
-res_mkquery();
+f = res_mkquery;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_res_mkquery=yes"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_res_mkquery=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_res_mkquery=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_res_mkquery=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-
-if eval "test \"`echo '$ac_cv_func_'res_mkquery`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_res_mkquery" >&5
+echo "${ECHO_T}$ac_cv_func_res_mkquery" >&6
+if test $ac_cv_func_res_mkquery = yes; then
   :
 else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for res_mkquery in -lresolv""... $ac_c" 1>&6
-echo "configure:1140: checking for res_mkquery in -lresolv" >&5
-ac_lib_var=`echo resolv'_'res_mkquery | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for res_mkquery in -lresolv" >&5
+echo $ECHO_N "checking for res_mkquery in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_mkquery+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char res_mkquery();
-
-int main() {
-res_mkquery()
-; return 0; }
-EOF
-if { (eval echo configure:1159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+   builtin and then its argument prototype would still apply.  */
+char res_mkquery ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+res_mkquery ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_resolv_res_mkquery=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_res_mkquery=no
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_mkquery" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_mkquery" >&6
+if test $ac_cv_lib_resolv_res_mkquery = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
 
   LIBS="-lresolv $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
 fi
 
-echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:1189: checking for socket in -lsocket" >&5
-ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1197 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char socket();
-
-int main() {
-socket()
-; return 0; }
-EOF
-if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+   builtin and then its argument prototype would still apply.  */
+char socket ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+socket ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_socket=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_socket_socket=no
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
 
   LIBS="-lsocket $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:1236: checking for crypt" >&5
-if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for crypt" >&5
+echo $ECHO_N "checking for crypt... $ECHO_C" >&6
+if test "${ac_cv_func_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1241 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char crypt(); below.  */
+    which can conflict with char crypt (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char crypt();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char crypt ();
+char (*f) ();
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_crypt) || defined (__stub___crypt)
 choke me
 #else
-crypt();
+f = crypt;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_crypt=yes"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_crypt=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_crypt=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_crypt=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-
-if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+echo "${ECHO_T}$ac_cv_func_crypt" >&6
+if test $ac_cv_func_crypt = yes; then
   :
 else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for crypt in -ldescrypt""... $ac_c" 1>&6
-echo "configure:1282: checking for crypt in -ldescrypt" >&5
-ac_lib_var=`echo descrypt'_'crypt | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for crypt in -ldescrypt" >&5
+echo $ECHO_N "checking for crypt in -ldescrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_descrypt_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldescrypt  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1290 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char crypt();
-
-int main() {
-crypt()
-; return 0; }
-EOF
-if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+   builtin and then its argument prototype would still apply.  */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_descrypt_crypt=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_descrypt_crypt=no
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo descrypt | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_descrypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_descrypt_crypt" >&6
+if test $ac_cv_lib_descrypt_crypt = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDESCRYPT 1
+_ACEOF
 
   LIBS="-ldescrypt $LIBS"
 
 else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:1327: checking for crypt in -lcrypt" >&5
-ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcrypt  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1335 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char crypt();
-
-int main() {
-crypt()
-; return 0; }
-EOF
-if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+   builtin and then its argument prototype would still apply.  */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_crypt_crypt=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_crypt_crypt=no
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPT 1
+_ACEOF
 
   LIBS="-lcrypt $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
 fi
@@ -1376,126 +3341,258 @@
 fi
 
 
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1379: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
   # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1411 "configure"
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1428 "configure"
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
+  # Broken: fails on valid input.
+continue
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-  CPP="$ac_cv_prog_CPP"
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  ac_cv_prog_CPP="$CPP"
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-echo "$ac_t""$CPP" 1>&6
 
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1459: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1464 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_cv_header_stdc=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1489 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <string.h>
-EOF
+
+_ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "memchr" >/dev/null 2>&1; then
   :
 else
-  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
@@ -1504,16 +3601,16 @@
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1507 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <stdlib.h>
-EOF
+
+_ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "free" >/dev/null 2>&1; then
   :
 else
-  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
 rm -f conftest*
@@ -1522,864 +3619,2043 @@
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then
   :
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1528 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 #include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-EOF
-if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   :
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_header_stdc=no
 fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
 fi
 fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
 #define STDC_HEADERS 1
-EOF
+_ACEOF
 
 fi
 
-for ac_hdr in sys/param.h unistd.h errno.h string.h stdlib.h stddef.h getopt.h
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
 do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1566: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1571 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 fi
+
 done
- 
 
-ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6
-echo "configure:1605: checking for stdarg.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+
+
+
+
+
+for ac_header in sys/param.h unistd.h errno.h string.h \
+                 stdlib.h stddef.h getopt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1610 "configure"
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
-#include <stdarg.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
 else
-  echo "$ac_t""no" 1>&6
-{ echo "configure: error: ** stdarg.h could not be found - ircd-hybrid will not compile without it **" 1>&2; exit 1; }
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
 fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-if test $ac_cv_prog_gcc = yes; then
-    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1640: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for stdarg.h" >&5
+echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6
 else
-    ac_pattern="Autoconf.*'x'"
-  cat > conftest.$ac_ext <<EOF
-#line 1646 "configure"
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking stdarg.h usability" >&5
+echo $ECHO_N "checking stdarg.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
-#include <sgtty.h>
-Autoconf TIOCGETP
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
+$ac_includes_default
+#include <stdarg.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
 else
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
 fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-  if test $ac_cv_prog_gcc_traditional = no; then
-    cat > conftest.$ac_ext <<EOF
-#line 1664 "configure"
+# Is the header present?
+echo "$as_me:$LINENO: checking stdarg.h presence" >&5
+echo $ECHO_N "checking stdarg.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
-#include <termio.h>
-Autoconf TCGETA
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
+#include <stdarg.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-rm -f conftest*
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
-  fi
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdarg.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for stdarg.h" >&5
+echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_stdarg_h=$ac_header_preproc
 fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6
 
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
-  if test $ac_cv_prog_gcc_traditional = yes; then
-    CC="$CC -traditional"
+fi
+if test $ac_cv_header_stdarg_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error:
+** stdarg.h could not be found - ircd will not compile without it **
+" >&5
+echo "$as_me: error:
+** stdarg.h could not be found - ircd will not compile without it **
+" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+CFLAGS=`echo $CFLAGS | sed s/\-g// | sed s/\-Wall//`
+CFLAGS=`echo $CFLAGS`
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG 1
+_ACEOF
+
+DEBUG="Yes"
+CFLAGS="-g $CFLAGS"
+else
+  DEBUG="No"
+fi;
+ASM="noarch"
+NASM="nasm -f elf"
+# Check whether --enable-assembler or --disable-assembler was given.
+if test "${enable_assembler+set}" = set; then
+  enableval="$enable_assembler"
+
+  echo "$as_me:$LINENO: checking whether to use assembler optimizations" >&5
+echo $ECHO_N "checking whether to use assembler optimizations... $ECHO_C" >&6
+  case "$host" in
+    *86-pc-linux-gnu | *86-gnu-linux )
+      if test "$DEBUG" = "Yes"
+      then
+        NASMFLAGS="-g -w+gnu-elf-extensions"
+      else
+        NASMFLAGS="-w+gnu-elf-extensions"
+      fi
+      ASM="i386"
+      ;;
+  esac
+  if test "$ASM" = "noarch"; then
+    echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  else
+    echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
   fi
+  echo "$as_me:$LINENO: checking for the netwide assembler" >&5
+echo $ECHO_N "checking for the netwide assembler... $ECHO_C" >&6
+  if test -x /usr/bin/nasm; then
+    echo "$as_me:$LINENO: result: $NASM" >&5
+echo "${ECHO_T}$NASM" >&6
+  else
+    if test -x /usr/local/bin/nasm; then
+      echo "$as_me:$LINENO: result: $NASM" >&5
+echo "${ECHO_T}$NASM" >&6
+    else
+      { { echo "$as_me:$LINENO: error: No nasm found!" >&5
+echo "$as_me: error: No nasm found!" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+
+
+
+fi;
+
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+  enableval="$enable_warnings"
+  CFLAGS="$CFLAGS -Wall"
+fi;
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  LDFLAGS="$LDFLAGS -static"
+fi;
+# Check whether --enable-enforce or --disable-enforce was given.
+if test "${enable_enforce+set}" = set; then
+  enableval="$enable_enforce"
+
+fi;
+if test "x$enable-enforce" != "xno"
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENFORCE 1
+_ACEOF
+
+  ENFORCE="Yes"
+else
+  ENFORCE="No"
 fi
 
+# Check whether --enable-backup or --disable-backup was given.
+if test "${enable_backup+set}" = set; then
+  enableval="$enable_backup"
 
-echo $ac_n "checking for poll""... $ac_c" 1>&6
-echo "configure:1687: checking for poll" >&5
-if eval "test \"`echo '$''{'ac_cv_func_poll'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi;
+if test "x$enable-backup" != "xno"
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define BACKUP 1
+_ACEOF
+
+  BACKUP="Yes"
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1692 "configure"
+  BACKUP="No"
+fi
+
+# Check whether --enable-hub or --disable-hub was given.
+if test "${enable_hub+set}" = set; then
+  enableval="$enable_hub"
+
+cat >>confdefs.h <<\_ACEOF
+#define HUB 1
+_ACEOF
+
+HUB="Yes"
+else
+  HUB="No"
+fi;
+
+echo "$as_me:$LINENO: checking for poll" >&5
+echo $ECHO_N "checking for poll... $ECHO_C" >&6
+if test "${ac_cv_func_poll+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char poll(); below.  */
+    which can conflict with char poll (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char poll();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char poll ();
+char (*f) ();
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
 #if defined (__stub_poll) || defined (__stub___poll)
 choke me
 #else
-poll();
+f = poll;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_poll=yes"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_poll=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_poll=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_poll=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $ac_cv_func_poll" >&5
+echo "${ECHO_T}$ac_cv_func_poll" >&6
+if test $ac_cv_func_poll = yes; then
 
-if eval "test \"`echo '$ac_cv_func_'poll`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
 #define USE_POLL 1
-EOF
+_ACEOF
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
+IRCDDIR="ircd"
+SSL="No"
 
-echo $ac_n "checking for non-blocking socket implementation""... $ac_c" 1>&6
-echo "configure:1739: checking for non-blocking socket implementation" >&5
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""cross compiling " 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1744 "configure"
-#include "confdefs.h"
+# Check whether --with-ircd-dir or --without-ircd-dir was given.
+if test "${with_ircd_dir+set}" = set; then
+  withval="$with_ircd_dir"
+  IRCDDIR="$withval"
+fi;
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
-{
-#if defined(O_NONBLOCK)
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
-#endif
-	exit(1);
-}
+echo "$as_me:$LINENO: checking for IRCD user" >&5
+echo $ECHO_N "checking for IRCD user... $ECHO_C" >&6
 
-EOF
-if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define NBLOCK_POSIX 1
-EOF
- echo "$ac_t""O_NONBLOCK " 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -fr conftest*
-fi
+# Check whether --with-ircd-user or --without-ircd-user was given.
+if test "${with_ircd_user+set}" = set; then
+  withval="$with_ircd_user"
 
+  user=`grep "^$withval:" /etc/passwd`
+  if test "$user" != ""
+  then
+    echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6
+    IRCDUSER="$withval"
+  else
+    echo "$as_me:$LINENO: result: error" >&5
+echo "${ECHO_T}error" >&6
+    { { echo "$as_me:$LINENO: error: Invalid user $withval" >&5
+echo "$as_me: error: Invalid user $withval" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
 
-echo $ac_n "checking for mmap support""... $ac_c" 1>&6
-echo "configure:1790: checking for mmap support" >&5
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""unable to test " 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1795 "configure"
-#include "confdefs.h"
 
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-int main() {
-  return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); 
-}
+  IRCDUSER=`id -un`
+  if test "$IRCDUSER" = "root"
+  then
+    IRCDUSER=`grep "^irc:" /etc/passwd | sed s/:.*//`
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^ircd:" /etc/passwd | sed s/:.*//`
+    fi
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^ircs:" /etc/passwd | sed s/:.*//`
+    fi
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^irc" /etc/passwd | sed s/:.*//`
+    fi
+  fi
+  if test "$IRCDUSER" = ""
+  then
+    IRCDUSER="root"
+  fi
+  echo "$as_me:$LINENO: result: $IRCDUSER" >&5
+echo "${ECHO_T}$IRCDUSER" >&6
 
-EOF
-if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define USE_MMAP 1
-EOF
- echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -fr conftest*
-fi
+fi;
 
+echo "$as_me:$LINENO: checking whether to enable SSL support" >&5
+echo $ECHO_N "checking whether to enable SSL support... $ECHO_C" >&6
 
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""unable to test" 1>&6
+# Check whether --with-ssl or --without-ssl was given.
+if test "${with_ssl+set}" = set; then
+  withval="$with_ssl"
+   case "$withval" in
+    yes)
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+      LIBS="$LIBS -lssl -lcrypto"
+      echo "$as_me:$LINENO: checking for SSL_accept in -lssl" >&5
+echo $ECHO_N "checking for SSL_accept in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1826 "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
-{
-#if defined( O_NDELAY ) && !defined( NBLOCK_POSIX )
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-	exit(1);
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SSL_accept ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+SSL_accept ();
+  ;
+  return 0;
 }
-
-EOF
-if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define NBLOCK_BSD 1
-EOF
- echo "$ac_t""O_NDELAY " 1>&6
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ssl_SSL_accept=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ssl_SSL_accept=no
 fi
-rm -fr conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_accept" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_accept" >&6
+if test $ac_cv_lib_ssl_SSL_accept = yes; then
 
 
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""unable to test" 1>&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSL 1
+_ACEOF
+
+                 SSL="Yes"
+                 echo "$as_me:$LINENO: checking for ASN1_UTCTIME_get in -lssl" >&5
+echo $ECHO_N "checking for ASN1_UTCTIME_get in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_ASN1_UTCTIME_get+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1875 "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
 #include "confdefs.h"
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <signal.h>
-alarmed()
-{
-	exit(1);
-}
-int main()
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ASN1_UTCTIME_get ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
 {
-#if !defined(NBLOCK_BSD) && !defined(NBLOCK_POSIX) && defined(FIONBIO)
-	char b[12], x[32];
-	int f, l = sizeof(x);
-	f = socket(AF_INET, SOCK_DGRAM, 0);
-	if (f >= 0 && !(fcntl(f, F_SETFL, FIONBIO))) {
-		signal(SIGALRM, alarmed);
-		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
-		alarm(0);
-		exit(0);
-	}
-#endif /* !NBLOCK_POSIX && !NBLOCK_BSD && FIONBIO */
-	exit(1);
+ASN1_UTCTIME_get ();
+  ;
+  return 0;
 }
-
-EOF
-if { (eval echo configure:1906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define NBLOCK_SYSV 1
-EOF
- echo "$ac_t""FIONBIO" 1>&6
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ssl_ASN1_UTCTIME_get=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ssl_ASN1_UTCTIME_get=no
 fi
-rm -fr conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ASN1_UTCTIME_get" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_ASN1_UTCTIME_get" >&6
+if test $ac_cv_lib_ssl_ASN1_UTCTIME_get = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSL 1
+_ACEOF
 
-echo $ac_n "checking signal implementation""... $ac_c" 1>&6
-echo "configure:1921: checking signal implementation" >&5
-if test "$cross_compiling" = yes; then
-  echo "$ac_t""unknown" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1926 "configure"
-#include "confdefs.h"
+fi
 
-int main()
-{
-#if defined(HAVE_SIGACTION)
-	exit(0);
-#else
-	exit(1);
-#endif
-}
+                 if test -d "/usr/include/openssl"; then true; else
+                   CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+                   LDFLAGS="$LDFLAGS -L/usr/local/lib"
+                 fi
 
-EOF
-if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define POSIX_SIGNALS 1
-EOF
- echo "$ac_t""posix" 1>&6
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  if test "$cross_compiling" = yes; then
-  echo "$ac_t""uknown" 1>&6
+  { { echo "$as_me:$LINENO: error: Could not find OpenSSL." >&5
+echo "$as_me: error: Could not find OpenSSL." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+      ;;
+    no)
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      ;;
+  esac
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
-#include "confdefs.h"
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
 
-#include <signal.h>
-int calls = 0;
-void handler()
-{
-	if (calls) return;
- 	calls++;
-	kill(getpid(), SIGTERM);
-	sleep(1);
-}
-int main()
-{
-	signal(SIGTERM, handler);
-	kill(getpid(), SIGTERM);
-	exit (0);
-}
+LIBS=`echo $LIBS`
+LDFLAGS=`echo $LDFLAGS`
 
-EOF
-if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  cat >> confdefs.h <<\EOF
-#define BSD_RELIABLE_SIGNALS 1
-EOF
- echo "$ac_t""bsd" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  cat >> confdefs.h <<\EOF
-#define SYSV_UNRELIABLE_SIGNALS 1
-EOF
- echo "$ac_t""sysv" 1>&6
-fi
-rm -fr conftest*
-fi
 
-fi
-rm -fr conftest*
+
+
+
+
+
+if test "${prefix}" = "NONE"; then
+  prefix="/usr/local"
 fi
 
+cat >>confdefs.h <<_ACEOF
+#define IRCDDIR "${prefix}/$IRCDDIR"
+_ACEOF
 
-echo $ac_n "checking operating system""... $ac_c" 1>&6
-echo "configure:1997: checking operating system" >&5
-case "$target" in
-*-solaris2*) cat >> confdefs.h <<\EOF
-#define OS_SOLARIS2 1
-EOF
- echo "$ac_t""Solaris 2.x" 1>&6 ;;
-*) echo "$ac_t""nothing special required" 1>&6 ;;
-esac
 
-trap '' 1 2 15
-cat > confcache <<\EOF
+cat >>confdefs.h <<_ACEOF
+#define IRCDUSER "$IRCDUSER"
+_ACEOF
+
+
+ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile tools/Makefile doc/Makefile src/noarch/Makefile src/i386/Makefile"
+
+cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
 #
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
 # So, don't put newlines in cache variables' values.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
   else
     echo "not updating unwritable cache $cache_file"
   fi
 fi
 rm -f confcache
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
 fi
 
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
 DEFS=-DHAVE_CONFIG_H
 
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
 # Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
 # Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
 
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conftest.sh
+  echo  "exit 0"   >>conftest.sh
+  chmod +x conftest.sh
+  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conftest.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
   esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
 done
+;;
+  esac
 
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
 
-trap 'rm -fr `echo "Makefile src/Makefile tools/Makefile zlib/Makefile include/setup.h zlib/setup.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
 
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RM@%$RM%g
-s%@CP@%$CP%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CPP@%$CPP%g
 
-CEOF
-EOF
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
 
-cat >> $CONFIG_STATUS <<\EOF
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
   else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+    as_ln_s='ln -s'
   fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
 fi
-EOF
+rm -f conf$$ conf$$.exe conf$$.file
 
-cat >> $CONFIG_STATUS <<EOF
+as_executable_p="test -f"
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile tools/Makefile zlib/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.53.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.53,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    shift
+    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+    shift
+    ;;
+  -*);;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_need_defaults=false;;
   esac
 
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+  case $1 in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    shift
+    CONFIG_FILES="$CONFIG_FILES $1"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    ac_need_defaults=false;;
 
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "src/noarch/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/noarch/Makefile" ;;
+  "src/i386/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/i386/Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "include/setup.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/setup.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/cs$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@CPP@,$CPP,;t t
+s,@ASM@,$ASM,;t t
+s,@NASM@,$NASM,;t t
+s,@NASMFLAGS@,$NASMFLAGS,;t t
+s,@HUB@,$HUB,;t t
+s,@IRCDDIR@,$IRCDDIR,;t t
+s,@IRCDUSER@,$IRCDUSER,;t t
+s,@SSL@,$SSL,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
   fi
+fi # test -n "$CONFIG_FILES"
 
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
   esac
 
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" ||
+        mkdir "$as_incr_dir" ||
+	{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
   esac
+done; }
 
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
 
 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 # NAME is the cpp macro being defined and VALUE is the value it is being given.
 #
 # ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
 ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
+ac_uD=',;t'
 
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="include/setup.h zlib/setup.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
   esac
 
-  echo creating $ac_file
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
 
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
 
-EOF
+_ACEOF
 
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
 
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
+cat >>conftest.undefs <<\_ACEOF
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
 
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
 
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
 rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
 do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
   echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
 done
-rm -f conftest.vals
+rm -f conftest.undefs
 
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
   else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" ||
+        mkdir "$as_incr_dir" ||
+	{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  esac
+done; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
     fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
   fi
-fi; done
+  # Run the commands associated with the file.
+  case $ac_file in
+    include/setup.h ) # update the timestamp
+echo 'timestamp for include/setup.h' >"include/stamp-h1"
+ ;;
+  esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  ac_builddir=.
 
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
 
-exit 0
-EOF
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$mf" : 'X\(//\)[^/]' \| \
+         X"$mf" : 'X\(//\)$' \| \
+         X"$mf" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$file" : 'X\(//\)[^/]' \| \
+         X"$file" : 'X\(//\)$' \| \
+         X"$file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { case $dirpart/$fdir in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy=$dirpart/$fdir
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" ||
+        mkdir "$as_incr_dir" ||
+	{ { echo "$as_me:$LINENO: error: cannot create $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  esac
+done; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
 chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
 
 
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
 
+echo ""
+echo "Ircd has been configured with the following options:"
+echo ""
+echo "       Server root: ${prefix}/${IRCDDIR}"
+#echo "     Server binary: ${prefix}/${IRCDDIR}/ircd"
+#echo "     Server config: ${prefix}/${IRCDDIR}/ircd.conf"
+#if test "$SSL" = "Yes"; then
+#  echo "Server certificate: ${prefix}/${IRCDDIR}/ircd.crt"
+#  echo "        Server key: ${prefix}/${IRCDDIR}/ircd.key"
+#fi
+echo "         IRCD User: ${IRCDUSER}"
+echo "         Debugging: ${DEBUG}"
+echo "           Enforce: ${ENFORCE}"
+echo "               Hub: ${HUB}"
+echo "    Backup uplinks: ${BACKUP}"
+echo "       SSL Support: ${SSL}"
+if test "$ASM" = "noarch"; then
+  echo "         Assembler: No"
+else
+  echo "         Assembler: $ASM"
+fi
+echo ""
+echo "              Host: ${host}"
+echo "          Compiler: ${CC}"
+echo "    Compiler flags: ${CFLAGS}"
+echo "Preprocessor flags: ${CPPFLAGS}"
+echo "      Linker flags: ${LDFLAGS}"
+echo "         Libraries: ${LIBS}"
+echo ""
+if test "$IRCDUSER" = "root"
+then
+  echo "Warning: ircd should not run as root!"
+fi
diff -uNrd ircd-hybrid-6.0/configure.in ircd-pi1.0a/configure.in
--- ircd-hybrid-6.0/configure.in	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/configure.in	Thu May 23 14:04:28 2002
@@ -0,0 +1,240 @@
+dnl
+dnl $Id: configure.in,v 1.20 2002/05/23 18:04:28 smoli Exp $
+dnl Process this file with autoconf to produce a  configure script.
+dnl
+
+AC_INIT
+AC_CONFIG_SRCDIR([src/ircd.c])
+AM_INIT_AUTOMAKE(ircd, pi1.0a)
+AM_CONFIG_HEADER(include/setup.h)
+
+dnl Checks for programs.
+AC_CANONICAL_HOST
+AC_PROG_CC
+AC_ISC_POSIX
+AC_PROG_RANLIB
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+
+dnl Checks for libraries.
+AC_CHECK_LIB(z,deflate,, AC_MSG_ERROR([
+WARNING: ircd needs a system with libz.so (zlib).
+You will need to get and install zlib then recompile ircd.
+You may obtain it from:
+ftp://sunsite.cnlab-switch.ch/mirror/infozip/zlib
+]))
+AC_CHECK_LIB(nsl, gethostbyname)
+AC_CHECK_FUNC(res_mkquery,,AC_CHECK_LIB(resolv, res_mkquery))
+AC_CHECK_LIB(socket, socket)
+AC_CHECK_FUNC(crypt,, AC_CHECK_LIB(descrypt, crypt,,AC_CHECK_LIB(crypt,crypt,,)))
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([sys/param.h unistd.h errno.h string.h \
+                 stdlib.h stddef.h getopt.h])
+
+dnl Check for stdarg.h - if we can't find it, halt configure
+AC_CHECK_HEADER(stdarg.h,,AC_MSG_ERROR([
+** stdarg.h could not be found - ircd will not compile without it **
+]))
+
+CFLAGS=`echo $CFLAGS | sed s/\-g// | sed s/\-Wall//`
+CFLAGS=`echo $CFLAGS`
+AC_ARG_ENABLE(debug,
+[  --enable-debug          Enable debugging mode],
+AC_DEFINE(DEBUG, 1, [Enable debugging mode])
+DEBUG="Yes"
+CFLAGS="-g $CFLAGS", DEBUG="No")
+ASM="noarch"
+NASM="nasm -f elf"
+AC_ARG_ENABLE(assembler,
+[  --enable-assembler      Enable assembler optimizations],
+[
+  AC_MSG_CHECKING(whether to use assembler optimizations)
+  case "$host" in
+    *86-pc-linux-gnu | *86-gnu-linux )
+      if test "$DEBUG" = "Yes"
+      then
+        NASMFLAGS="-g -w+gnu-elf-extensions"
+      else
+        NASMFLAGS="-w+gnu-elf-extensions"
+      fi
+      ASM="i386"
+      ;;
+  esac
+  if test "$ASM" = "noarch"; then
+    AC_MSG_RESULT(no)
+  else
+    AC_MSG_RESULT(yes)
+  fi
+  AC_MSG_CHECKING(for the netwide assembler)
+  if test -x /usr/bin/nasm; then
+    AC_MSG_RESULT($NASM)    
+  else
+    if test -x /usr/local/bin/nasm; then
+      AC_MSG_RESULT($NASM)
+    else
+      AC_MSG_ERROR([No nasm found!])
+    fi
+  fi
+  
+  
+])
+
+
+AC_ARG_ENABLE(warnings,
+[  --enable-warnings       Enable compiler warnings],[CFLAGS="$CFLAGS -Wall"])
+AC_ARG_ENABLE(static,
+[  --enable-static         Enable static linking], [LDFLAGS="$LDFLAGS -static"])
+AC_ARG_ENABLE(enforce,
+[  --disable-enforce       IRCops can enforce everything (default)])
+if test "x$enable-enforce" != "xno"
+then
+  AC_DEFINE(ENFORCE, 1, [Define this if you want your IRCops to enforce])
+  ENFORCE="Yes"
+else
+  ENFORCE="No"
+fi
+
+AC_ARG_ENABLE(backup,
+[  --disable-backup        Disable automatic uplink backup])
+if test "x$enable-backup" != "xno"
+then
+  AC_DEFINE(BACKUP, 1, [Define this if your server has an alternative uplink])
+  BACKUP="Yes"
+else
+  BACKUP="No"
+fi
+
+AC_ARG_ENABLE(hub,
+[  --enable-hub            Enable server-server routing],
+AC_DEFINE(HUB, 1, [Define this if you want to run your server as a hub])
+HUB="Yes", HUB="No")
+     
+AC_CHECK_FUNC(poll, AC_DEFINE(USE_POLL, 1, [Define this if you have the poll() system call]),)
+IRCDDIR="ircd"
+SSL="No"
+AC_ARG_WITH(ircd-dir,
+[  --with-ircd-dir[=DIR]     Override default ircd root [PREFIX/ircd]],
+[IRCDDIR="$withval"])
+
+AC_MSG_CHECKING(for IRCD user)
+AC_ARG_WITH(ircd-user,
+[  --with-ircd-user        Specify IRCD user account],
+[
+  user=`grep "^$withval:" /etc/passwd`
+  if test "$user" != ""
+  then
+    AC_MSG_RESULT($withval)
+    IRCDUSER="$withval"
+  else
+    AC_MSG_RESULT(error)
+    AC_MSG_ERROR([Invalid user $withval])
+  fi
+],
+[
+  IRCDUSER=`id -un`
+  if test "$IRCDUSER" = "root"
+  then
+    IRCDUSER=`grep "^irc:" /etc/passwd | sed s/:.*//`
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^ircd:" /etc/passwd | sed s/:.*//`
+    fi
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^ircs:" /etc/passwd | sed s/:.*//`
+    fi
+    if test "$IRCDUSER" = ""
+    then
+      IRCDUSER=`grep "^irc" /etc/passwd | sed s/:.*//`
+    fi
+  fi
+  if test "$IRCDUSER" = ""
+  then
+    IRCDUSER="root"
+  fi
+  AC_MSG_RESULT($IRCDUSER)
+])
+
+AC_MSG_CHECKING(whether to enable SSL support)
+AC_ARG_WITH(ssl,
+[  --with-ssl              Enable SSL support],
+[ case "$withval" in
+    yes)
+      AC_MSG_RESULT(yes)
+      LIBS="$LIBS -lssl -lcrypto"
+      AC_CHECK_LIB(ssl, SSL_accept,
+               [
+                 AC_DEFINE(HAVE_SSL, 1, [Define this if you want SSL support])
+                 SSL="Yes"
+                 AC_CHECK_LIB(ssl, ASN1_UTCTIME_get, AC_DEFINE(HAVE_SSL, 1, [Define this if OpenSSL has ASN1_UTCTIME_get]))
+                 if test -d "/usr/include/openssl"; then true; else
+                   CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+                   LDFLAGS="$LDFLAGS -L/usr/local/lib"
+                 fi
+               ],
+               AC_MSG_ERROR(Could not find OpenSSL.))
+      ;;
+    no)
+      AC_MSG_RESULT(no)
+      ;;
+  esac ],
+AC_MSG_RESULT(no))
+
+LIBS=`echo $LIBS`
+LDFLAGS=`echo $LDFLAGS`
+AC_SUBST(ASM)
+AC_SUBST(NASM)
+AC_SUBST(NASMFLAGS)
+AC_SUBST(HUB)
+AC_SUBST(IRCDDIR)
+AC_SUBST(IRCDUSER)
+AC_SUBST(SSL)
+if test "${prefix}" = "NONE"; then
+  prefix="/usr/local"
+fi
+AC_DEFINE_UNQUOTED(IRCDDIR, "${prefix}/$IRCDDIR", [IRCD server root])
+AC_DEFINE_UNQUOTED(IRCDUSER, "$IRCDUSER", [IRCD user])
+
+AC_CONFIG_FILES([Makefile \
+                 include/Makefile \
+                 src/Makefile \
+                 tools/Makefile \
+                 doc/Makefile \
+                 src/noarch/Makefile \
+                 src/i386/Makefile])
+AC_OUTPUT
+echo ""
+echo "Ircd has been configured with the following options:"
+echo ""
+echo "       Server root: ${prefix}/${IRCDDIR}"
+#echo "     Server binary: ${prefix}/${IRCDDIR}/ircd"
+#echo "     Server config: ${prefix}/${IRCDDIR}/ircd.conf"
+#if test "$SSL" = "Yes"; then
+#  echo "Server certificate: ${prefix}/${IRCDDIR}/ircd.crt"
+#  echo "        Server key: ${prefix}/${IRCDDIR}/ircd.key"
+#fi
+echo "         IRCD User: ${IRCDUSER}"
+echo "         Debugging: ${DEBUG}"
+echo "           Enforce: ${ENFORCE}"
+echo "               Hub: ${HUB}"
+echo "    Backup uplinks: ${BACKUP}"
+echo "       SSL Support: ${SSL}"
+if test "$ASM" = "noarch"; then
+  echo "         Assembler: No"
+else
+  echo "         Assembler: $ASM"
+fi
+echo ""
+echo "              Host: ${host}"
+echo "          Compiler: ${CC}"
+echo "    Compiler flags: ${CFLAGS}"
+echo "Preprocessor flags: ${CPPFLAGS}"
+echo "      Linker flags: ${LDFLAGS}"
+echo "         Libraries: ${LIBS}"
+echo ""
+if test "$IRCDUSER" = "root"
+then
+  echo "Warning: ircd should not run as root!"
+fi
diff -uNrd ircd-hybrid-6.0/doc/CIDR.txt ircd-pi1.0a/doc/CIDR.txt
--- ircd-hybrid-6.0/doc/CIDR.txt	Sun Nov 26 23:11:42 2000
+++ ircd-pi1.0a/doc/CIDR.txt	Wed Dec 31 19:00:00 1969
@@ -1,282 +0,0 @@
-$Id: CIDR.txt,v 1.2 2000/11/27 04:11:42 lusky Exp $
-
-CIDR Information
-----------------
-  Presently, we all use IPv4.  The format of IPv4 is the following:
-
-A.B.C.D
-
-  Where letters 'A' through 'D' are 8-bit values.  In English, this
-  means each digit can have a value of 0 to 255.  Example:
-
-129.56.4.234
-
-  Digits are called octets.  Oct meaning 8, hence 8-bit values.  An
-  octet cannot be greater than 255, and cannot be less than 0 (eg. a
-  negative number).
-
-  CIDR stands for "classless inter domain routing", details covered
-  in RFC's 1518 1519. It was introduced mainly due to waste within
-  A and B classes space. The goal was to make it possible to use
-  smaller nets than it would seem from (above) IP classes, for instance
-  by dividing one B class into 256 "C like" classes. The other goal was
-  to allow aggregation of routing information, so that routers could use
-  one aggregated route (like 194.145.96.0/20) instead of
-  advertising 16 C classes.
-
-  Class A are all these addresses which first bit is "0",
-  bitmap: 0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh (n=net, h=host)
-  IP range is 0.0.0.0 - 127.255.255.255
-
-  Class B are all these addresses which first two bits are "10",
-  bitmap: 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh (n=net, h=host)
-  IP range is 128.0.0.0 - 191.255.255.255
-
-  Class C are all these addresses which first three bits are "110",
-  bitmap: 110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh (n=net, h=host)
-  IP range is 192.0.0.0 - 223.255.255.255
-
-  Class D are all these addresses which first four bits are "1110",
-  this is multicast class and net/host bitmap doesn't apply here
-  IP range is 224.0.0.0 - 239.255.255.255
-  I bet they will never IRC, unless someone creates multicast IRC :)
-
-  Class E are all these addresses which first five bits are "11110",
-  this class is reserved for future use
-  IP range is 240.0.0.0 - 247.255.255.255
-
-  So, here is how CIDR notation comes into play.
-
-  For those of you who have real basic exposure to how networks are
-  set up, you should be aware of the term "netmask."  Basically, this
-  is a IPv4 value which specifies the "size" of a network.  You can
-  assume the word "size" means "range" if you want.
-
-  A chart describing the different classes in CIDR format and their
-  wildcard equivalents would probably help at this point:
-
-CIDR version	dot notation (netmask)	Wildcard equivalent
------------------------------------------------------------------
-A.0.0.0/8	A.0.0.0/255.0.0.0	A.*.*.*  or  A.*
-A.B.0.0/16	A.B.0.0/255.255.0.0	A.B.*.*  or  A.B.*
-A.B.C.0/24	A.B.C.0/255.255.255.0	A.B.C.*  or  A.B.C.*
-A.B.C.D/32	A.B.C.D/255.255.255.255	A.B.C.D
-
-
-  The question on any newbies mind at this point is "So what do all
-  of those values & numbers actually mean?"
-
-  Everything relating to computers is based on binary values (1s and
-  zeros).  Binary plays a *tremendous* role in CIDR notation.  Let's
-  break it down to the following table:
-
-          A            B            C            D
-       --------     --------     --------     --------
-/8  == 11111111  .  00000000  .  00000000  .  00000000  == 255.0.0.0
-/16 == 11111111  .  11111111  .  00000000  .  00000000  == 255.255.0.0
-/24 == 11111111  .  11111111  .  11111111  .  00000000  == 255.255.255.0
-/32 == 11111111  .  11111111  .  11111111  .  11111111  == 255.255.255.255
-
-  The above is basically a binary table for the most common netblock
-  sizes.  The "1"s you see above are the 8-bit values for each octet.
-  If you split an 8-bit value into each of it's bits, you find the
-  following:
-
-00000000
-^^^^^^^^_ 1sts place  (1)
-|||||||__ 2nds place  (2)
-||||||___ 3rds place  (4)
-|||||____ 4ths place  (8)
-||||_____ 5ths place  (16)
-|||______ 6ths place  (32)
-||_______ 7ths place  (64)
-|________ 8ths place  (128)
-
-  Now, since computers consider zero a number, you pretty much have
-  to subtract one (so-to-speak; this is not really how its done, but
-  just assume it's -1 :-) ) from all the values possible.  Some
-  examples of decimal values in binary:
-
-15  == 00001111  (from left to right: 8+4+2+1)
-16  == 00010000  (from left to right: 16)
-53  == 00110101  (from left to right: 32+16+4+1)
-79  == 01001111  (from left to right: 64+8+4+1)
-254 == 11111110  (from left to right: 128+64+32+16+8+4+2)
-
-  So, with 8 bits, the range (as I said before) is zero to 255.
-
-  If none of this is making sense to you at this point, you should
-  back up and re-read all of the above.  I realize it's a lot, but
-  it'll do you some good to re-read it until you understand :-).
-
-  So, let's modify the original table a bit by providing CIDR info
-  for /1 through /8:
-
-          A            B            C            D
-       --------     --------     --------     --------
-/1  == 10000000  .  00000000  .  00000000  .  00000000  == 128.0.0.0
-/2  == 11000000  .  00000000  .  00000000  .  00000000  == 192.0.0.0
-/3  == 11100000  .  00000000  .  00000000  .  00000000  == 224.0.0.0
-/4  == 11110000  .  00000000  .  00000000  .  00000000  == 240.0.0.0
-/5  == 11111000  .  00000000  .  00000000  .  00000000  == 248.0.0.0
-/6  == 11111100  .  00000000  .  00000000  .  00000000  == 252.0.0.0
-/7  == 11111110  .  00000000  .  00000000  .  00000000  == 254.0.0.0
-/8  == 11111111  .  00000000  .  00000000  .  00000000  == 255.0.0.0
-
-  At this point, all of this should making a lot of sense, and you
-  should be able to see the precision that you can get by using CIDR
-  at this point.  If not, well, I guess the best way to put it would
-  be that wildcards always assume /8, /16, or /24 (yes hello Piotr,
-  we can argue this later: I am referring to IPs *ONLY*, not domains
-  or FQDNs :-) ).
-
-  So, let's take all of the information above, and apply it to a
-  present-day situation on IRC.
-
-  Let's say you have a set of flooding clients who all show up from
-  the following hosts.  For lack-of a better example, I'll use a
-  subnet here at Best:
-
-nick1  (xyz@shell9.ba.best.com)  [206.184.139.140]
-nick2  (abc@shell8.ba.best.com)  [206.184.139.139]
-nick3  (foo@shell12.ba.best.com) [206.184.139.143]
-
-  Most people will assume the  they were all in the same class C
-  (206.184.139.0/24  or  206.184.139.*).
-
-  This, as a matter of fact, is not true.  Now, the reason *I* know
-  this is solely because I work on the network here; those IPs are
-  not delegated to a class C, but two portions of a class C (128 IPs
-  each).  That means the class C is actually split into these two
-  portions:
-
-Netblock               IP range
---------               --------
-206.184.139.0/25       206.184.139.0   to 206.184.139.127
-206.184.139.128/25     206.184.139.128 to 206.184.139.255
-
-  For the record, 206.184.139.0 and 206.184.139.128 are both known as
-  "network addresses" (not to be confused with "netblocks" or "ethernet
-  hardware addresses" or "MAC addresses").  Network addresses are
-  *ALWAYS EVEN*.
-
-  206.184.139.127 and 206.184.139.255 are what are known as broadcast
-  addresses.  Broadcast addresses are *ALWAYS ODD*.
-
-  Now, the aforementioned list of clients are in the 2nd subnet shown
-  above, not the first.  The reason for this should be obvious.
-
-  The remaining question is, "Well that's nice, you know what the netblock
-  is for Best.  What about us?  We don't know that!"
-
-  Believe it or not, you can find out the network block size by using
-  whois -h WHOIS.ARIN.NET on the IP in question.  ARIN keeps a list of
-  all network blocks and who owns them -- quite useful, trust me.  I
-  think I use ARIN 5 or 6 times a day, especially when dealing with
-  D-lines.  Example:
-
-$ whois -h whois.arin.net 206.184.139.140
-Best Internet Communications, Inc. (NETBLK-NBN-206-184-BEST)
-345 East Middlefield Road
-Mountain View, CA 94043
-
-Netname: NBN-206-184-BEST
-Netblock: 206.184.0.0 - 206.184.255.255
-Maintainer: BEST
-
-  Does this mean you should D-line 206.184.0.0/16?  Probably not.
-  That's an entire class B-sized block, while you're only trying
-  to deny access to a subnetted class C.
-
-  So then how do you get the *real* info?  Well, truth is, you don't.
-  You have to pretty much take a guess at what it is, if ARIN reports
-  something that's overly vague.  Best, for example, was assigned the
-  above class B-sized block.  We can subnet it however we want without
-  reporting back to ARIN how we have it subnetted.  We own the block,
-  and that's all that matters (to ARIN).
-
-  Not all subnets are like this, however.  Smaller subnets you may
-  find partitioned and listed on ARIN; I've seen /29 blocks for DSL
-  customers show up in ARIN before.
-
-  So, use ARIN any chance you get.  The more precision the better!
-
-  Now, there is a small issue I want to address regarding use of CIDR
-  notation.  Let's say you D-line the following in CIDR format (hi
-  sion ;-) ):
-
-205.100.132.18/24
-
-  Entries like this really makes my blood boil, solely because it adds
-  excessive confusion and is just basically pointless.  If you
-  examine the above, you'll see the /24 is specifying an entire
-  class C -- so then what's the purpose of using .18 versus .0?
-
-  There IS no purpose.  The netmask itself will mask out the .18 and
-  continue to successfully use 205.100.132.0/24.
-
-  Doing things this way just adds confusion, especially on non-octet-
-  aligned subnets (such as /8, /16, /24, or /32).  Seeing that on a
-  /27 or a /19 might make people go "wtf?"
-
-  I know for a fact this doc lacks a lot of necessary information,
-  like how the actual netmask/CIDR value play a role in "masking out"
-  the correct size, and what to do is WHOIS.ARIN.NET returns no
-  netblock information but instead a few different company names with
-  NIC handles.  I'm sure you can figure this stuff out on your own,
-  or just ask an administrator friend of yours who DOES know.  A lot
-  of us admins are BOFH types, but if you ask us the right questions,
-  you'll benefit from the answer quite thoroughly.
-
-  I'm also sure this doc has some things which are incorrect or are
-  "vague."  I apologize for that; all of this is how I understand
-  things as a programmer and as an admin.  I don't claim to be a
-  network administrator, nor do I claim to know everything about IPv4
-  or anything of the sort.  I just know what I know.
-
-  Oh, I almost forgot.  I believe Linux uses a different version of
-  "whois" than FreeBSD does.  If I remember right, the syntax for
-  whois on Linux is "whois <INFO>@whois.arin.net", while under FreeBSD
-  it's "whois -h whois.arin.net <INFO>".
-
-  Note that the FreeBSD whois client has shortcuts for the most commonly
-  used whois servers.  "whois -a <INFO>" is the shortcut for ARIN.
-
-  Also note that ARIN is not authoritative for all IP blocks on the 
-  Internet.  Take for example 212.158.123.66.  A whois query to ARIN
-  will return the following information:
-
-$ whois -h whois.arin.net 212.158.123.66
-European Regional Internet Registry/RIPE NCC (NET-RIPE-NCC-)
-   These addresses have been further assigned to European users.
-   Contact information can be found in the RIPE database, via the
-   WHOIS and TELNET servers at whois.ripe.net, and at
-   http://www.ripe.net/db/whois.html
-
-   Netname: RIPE-NCC-212
-   Netblock: 212.0.0.0 - 212.255.255.255
-   Maintainer: RIPE
-
-  This query tells us that it is a European IP block, and is further
-  handled by RIPE's whois server.  We must then query whois.ripe.net
-  to get more information.
-
-$ whois -h whois.ripe.net 212.158.123.66
-
-% Rights restricted by copyright. See http://www.ripe.net/ripencc/pub-services/d
-b/copyright.html
-
-inetnum:     212.158.120.0 - 212.158.123.255
-netname:     INSNET-P2P
-descr:       Point to Point Links for for London Nodes
-country:     GB
---snip--
-
-  This tells us the actual IP block that the query was a part of.
-
-  Other whois servers that you may see blocks referred to are: 
-  whois.ripn.net for Russia, whois.apnic.net for Asia and the Pacific,
-  whois.aunic.net for Australia, and whois.6bone.net for IPv6 blocks.
-
-Contributed by Jeremy Chadwick <jdc@best.net>
-and Piotr Kucharski <chopin@sgh.waw.pl>
diff -uNrd ircd-hybrid-6.0/doc/Makefile ircd-pi1.0a/doc/Makefile
--- ircd-hybrid-6.0/doc/Makefile	Thu Oct  5 23:00:53 2000
+++ ircd-pi1.0a/doc/Makefile	Wed Dec 31 19:00:00 1969
@@ -1,26 +0,0 @@
-#************************************************************************
-#*   IRC - Internet Relay Chat, Makefile
-#*   Copyright (C) 1990, Jarkko Oikarinen
-#*
-#*   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: Makefile,v 1.2 2000/10/06 03:00:53 lusky Exp $
-#*/
-
-all:
-
-install: all
-	@echo "Please do make install from the top level"
-
diff -uNrd ircd-hybrid-6.0/doc/Makefile.in ircd-pi1.0a/doc/Makefile.in
--- ircd-hybrid-6.0/doc/Makefile.in	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/Makefile.in	Thu May 23 13:52:37 2002
@@ -0,0 +1,268 @@
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+ircddir = $(exec_prefix)/@IRCDDIR@
+ircduser = @IRCDUSER@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -m 644
+install_sh_PROGRAM = $(install_sh)
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+PACKAGE = @PACKAGE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+CLEANFILES = *~
+subdir = doc
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER =
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.in blalloc.txt hybrid.txt memory.txt mtrie.txt \
+              opermyth.txt opers.txt rfc1459.txt rfc2811.txt rfc2812.txt \
+              tao.txt tsora.txt version.txt hub.conf leaf.conf ircd.8 \
+              ssl.txt ca.sh ca.cnf
+HUB = @HUB@
+SSL = @SSL@
+all:
+
+.SUFFIXES:
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+uninstall-info:
+tags: TAGS
+TAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check: all
+
+installdirs: $(ircddir)
+	$(mkinstalldirs) $(ircddir)
+
+install: all installdirs install-data install-man
+
+install-strip:
+	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-generic mostlyclean
+
+distclean: clean distclean-generic
+
+dvi:
+
+info:
+
+install-data:
+	@if test -f "${ircddir}/ircd.conf"; then true; else \
+	  if test "$(HUB)" = "Yes"; then \
+            if test "`id -u`" = "0" ; \
+	    then \
+  	      echo "$(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.conf ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -o ${ircduser} -m 600 hub.conf ${ircddir}/ircd.conf ; \
+	    else \
+  	      echo "$(INSTALL_PROGRAM) -m 600 ircd.conf ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -m 600 hub.conf ${ircddir}/ircd.conf ; \
+	    fi ; \
+	  else \
+            if test "`id -u`" = "0" ; \
+	    then \
+  	      echo "$(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.conf ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -o ${ircduser} -m 600 leaf.conf ${ircddir}/ircd.conf ; \
+	    else \
+  	      echo "$(INSTALL_PROGRAM) -m 600 ircd.conf ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -m 600 leaf.conf ${ircddir}/ircd.conf ; \
+	    fi ; \
+	  fi ; \
+	fi
+	@if test "`id -u`" = "0" ; \
+	then \
+	  echo "$(INSTALL_PROGRAM) -o ${ircduser} -m 644 opers.txt ${ircddir}" ; \
+	  $(INSTALL_PROGRAM) -o ${ircduser} -m 644 opers.txt ${ircddir} ; \
+	else \
+	  echo "$(INSTALL_PROGRAM) -m 644 opers.txt ${ircddir}" ; \
+	  $(INSTALL_PROGRAM) -m 644 opers.txt ${ircddir} ; \
+	fi
+
+install-cert:
+	@if test "$(SSL)" = "Yes"; then \
+	  if test -f "$(ircddir)/ircd.pem"; then true; else \
+            ./ca.sh cert ; \
+            if test "`id -u`" = "0" ; \
+	    then \
+  	      echo "$(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.pem ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.pem ${ircddir} ; \
+	    else \
+  	      echo "$(INSTALL_PROGRAM) -m 600 ircd.pem ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -m 600 ircd.pem ${ircddir} ; \
+	    fi ; \
+  	    rm -f ircd.pem ; \
+	  fi ; \
+	fi
+        
+install-req:
+	@if test "$(SSL)" = "Yes"; then \
+	  if test -f "$(ircddir)/ircd.pem"; then true; else \
+            ./ca.sh req ; \
+            if test "`id -u`" = "0" ; \
+	    then \
+  	      echo "$(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.pem ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -o ${ircduser} -m 600 ircd.pem ${ircddir} ; \
+	    else \
+  	      echo "$(INSTALL_PROGRAM) -m 600 ircd.pem ${ircddir}" ; \
+	      $(INSTALL_PROGRAM) -m 600 ircd.pem ${ircddir} ; \
+	    fi ; \
+            rm -f ircd.pem ; \
+            echo "" ; \
+            echo "Certificate request has been generated." ; \
+            echo "Now send 'req.pem' to your certificate authority." ; \
+            echo "After you receive your signed certificate, you" ; \
+            echo "append it to ${ircddir}/ircd.pem:" ; \
+            echo "" ; \
+            echo "For example: cat 04.pem >> ${ircddir}/ircd.pem" ; \
+	  fi ; \
+	fi
+
+install-man:
+	@if test "`id -u`" = "0"; \
+        then \
+	  echo "$(INSTALL_PROGRAM) -m 644 ircd.8 ${mandir}/man8" ; \
+	  $(INSTALL_PROGRAM) -m 644 ircd.8 ${mandir}/man8 ; \
+	fi
+
+uninstall-data:
+	rm -f ${ircddir}/ircd.conf
+	rm -f ${ircddir}/opers.txt
+
+uninstall-man:
+	@if test "`id -u`" = "0"; \
+        then \
+          echo "rm -f ${mandir}/man8/ircd.8" ; \
+  	  rm -f ${mandir}/man8/ircd.8 ; \
+	fi
+        
+uninstall-cert:
+	@if test "$(SSL)" = "Yes" ; then \
+	  echo "rm -f $(ircddir)/ircd.key" ; \
+	  echo "rm -f $(ircddir)/ircd.crt" ; \
+	  rm -f $(ircddir)/ircd.key $(ircddir)/ircd.crt ; \
+	fi
+
+installcheck:
+
+maintainer-clean: distclean maintainer-clean-generic
+
+mostlyclean: mostlyclean-generic
+
+uninstall: uninstall-data uninstall-man uninstall-cert
+
+.PHONY: GTAGS all check clean clean-binPROGRAMS clean-generic \
+        distclean distclean-compile distclean-depend \
+        distclean-generic distclean-tags distdir dvi info \
+        install install-binPROGRAMS install-data install-exec \
+        install-info install-man install-strip installcheck \
+        installdirs maintainer-clean maintainer-clean-generic \
+        mostlyclean mostlyclean-compile mostlyclean-generic \
+        tags uninstall uninstall-binPROGRAMS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/doc/README.TSora ircd-pi1.0a/doc/README.TSora
--- ircd-hybrid-6.0/doc/README.TSora	Thu Sep 17 10:25:02 1998
+++ ircd-pi1.0a/doc/README.TSora	Wed Dec 31 19:00:00 1969
@@ -1,330 +0,0 @@
-                       Protocol changes for +TSora
-                       ---------------------------
-
-
-Note: 
-
-The protocols described here implement TimeStamps on IRC channels and 
-nicks. The idea of IRC TimeStamps was started on Undernet, and first 
-implemented by Run <carlo@runaway.xs4all.nl>. The protocols used here 
-are not exactly the same as the ones used on Undernet; the nick-kill 
-handling is very similar and must be credited to Run, while the 
-"TimeStamped channel description" protocol is quite different.
-
-
-
-TSora servers keep track of which version of the TS protocol (if any) 
-their neighboring servers are using, and take it into account when 
-sending messages to them. This allows for seamless integration of TS 
-servers into a non-TS net, and for upgrades of the protocol.
-
-Each server knows which is the lowest and the highest version of the
-TS protocol it can interact with; currently both of these are set to 1:
-
-#define TS_CURRENT 1		/* the highest TS ver we can do */
-#define TS_MIN 1		/* the lowest TS ver we can do  */
-
-
-Timings and TS versions:
-========================
-
-. Keep a 'delta' value to be added to the result of all calls to time(),
-  initially 0.
-
-. Send a second argument to the PASS command, ending in the 'TS' string.
-
-. Send a
-
-  SVINFO <TS_CURRENT> <TS_MIN> <STANDALONE> :<UTC-TIME>
-  
-  just after "SERVER", where <STANDALONE> is 1 if we're connected to 
-  more TSora servers, and 0 if not, and <UTC-TIME> is our idea of the 
-  current UTC time, fixed with the delta.
-
-. When we receive a "SVINFO <x> <y> <z> :<t>" line from a connecting 
-  server, we ignore it if TS_CURRENT<y or x<TS_MIN, otherwise we
-  set a flag remembering that that server is TS-aware, remember the TS 
-  version to use with it (min(TS_CURRENT, x)). Additionally, if this is 
-  our first connected TS server, we set our delta to t-<OUR_UTC> if
-  z==0, and to (t-<OUR_UTC>)/2 if z!=0. The SVINFO data is kept around
-  until the server has effectively registered with SERVER, and used
-  *after* sending our own SVINFO to that server.
-
-
-Explanations:
-
-  Servers will always know which of their directly-linked servers can do 
-  TS, and will use the TS protocol only with servers that do understand 
-  it. This makes it possible to switch to full TS in just one 
-  code-replacement step, without incompatibilities.
-
-  As long as not all servers are TS-aware, the net will be divided into 
-  "zones" of linked TS-aware servers. Channel modes will be kept 
-  synchronized at least within the zone in which the channel was 
-  created, and nick collisions between servers in the same zone will 
-  result in only one client being killed.
-
-  Time synchronization ensures that servers have the same idea of the 
-  current time, and achieves this purpose as long as TS servers are 
-  introduced one by one within the same 'zone'. The merging of two zones 
-  cannot synchronize them completely, but it is to be expected that 
-  within each zone the effective time will be very close to the real 
-  time. 
-
-  By sending TSINFO after SERVER rather than before, we avoid the extra 
-  lag created by the identd check on the server. To be able to send 
-  immediately a connect burst of either type (TS or not), we need to 
-  know before that if the server does TS or not, so we send that 
-  information with PASS as an extra argument. And to avoid being 
-  incompatible with 2.9 servers, which check that this second argument 
-  begins with "2.9", we check that it *ends* with "TS".
-
-  The current time is only used when setting a TS on a new channel or 
-  nick, and once such a TS is set, it is never modified because of 
-  synchronization, as it is much more important that the TS for a 
-  channel or nick stays the same across all servers than that it is 
-  accurate to the second.
-
-  Note that Undernet's 2.8.x servers have no time synchronization at 
-  all, and have had no problems because of it - all of this is more to 
-  catch the occasional server with a way-off clock than anything.
-
-
-NICK handling patches (anti-nick-collide + shorter connect burst):
-==================================================================
-
-. For each nick, store a TS value = the TS value received if any, or our 
-  UTC+delta at the time we first heard of the nick. TS's are propagated 
-  to TS-aware servers whenever sending a NICK command.
-
-. Nick changes reset the TS to the current time.
-
-. When sending a connect burst to another TS server, replace the 
-  NICK/USER pair with only one NICK command containing the nick, the 
-  hopcount, the TS, the umode, and all the USER information.
-
-  The format for a full NICK line is:
-  NICK <nick> <hops> <TS> <umode> <user> <host> <server> :<ircname>
-
-  The umode is a + followed by any applying usermodes.
-
-  The format for a nick-change NICK line is:
-  :<oldnick> NICK <newnick> :<TS>
-
-. When a NICK is received from a TS server, that conflicts with an 
-  existing nick:
-  + if the userhosts differ or one is not known:
-    * if the timestamps are equal, kill ours and the old one if it
-      was a nick change
-    * if the incoming timestamp is older than ours, kill ours and 
-      propagate the new one
-    * if the incoming timestamp is younger, ignore the line, but kill 
-      the old nick if it was a nick change
-  + if the userhosts are the same:
-    * if the timestamps are equal, kill ours and the old one if it
-      was a nick change
-    * if the incoming timestamp is younger, kill ours and propagate
-      the new one
-    * if the incoming timestamp is older, ignore the line but kill
-      the old nick if it was a nick change
-
-. When a NICK is received from a non-TS server that conflicts with
-  an existing nick, kill both.
-
-. Do not send "Fake Prefix" kills in response to lines coming from TS 
-  servers; the sanitization works anyway, and this allows the "newer
-  nick overruled" case to work.
-
-Explanations:
-
-  The modified nick-introduction syntax allows for a slightly shorter 
-  connect-burst, and most importantly lets the server compare 
-  user@host's when determining which nick to kill:  if the user@host
-  is the same, then the older nick must be killed rather than the
-  newer.
-
-  When talking to a non-TS server, we need to behave exactly like one
-  because it expects us to. When talkign to a TS server, we don't kill
-  the nicks it's introducing, as we know it'll be smart enough to do it
-  itself when seeing our own introduced nick.
-
-  When we see a nick arriving from a non-TS server, it won't have a TS, 
-  but it's safe enough to give it the current time rather than keeping 
-  it 0; such TS's won't be the same all across the network (as long as 
-  there is more than one TS zone), and when there's a collision, the TS 
-  used will be the one in the zone the collision occurs in.
-
-  Also, it is important to note that by the time a server sees (and 
-  chooses to ignore) a nick introduction, the introducing server has 
-  also had the time to put umode changes for that nick on its queue, so 
-  we must ignore them too... so we need to ignore fake-prefix lines 
-  rather than sending kills for them. This is safe enough, as the rest 
-  of the protocol ensures that they'll get killed anyway (and the 
-  Undernet does it too, so it's been more than enough tested). Just for 
-  an extra bit of compatibility, we still kill fake prefixes coming from 
-  non-TS servers.
-
-  This part of the TS protocol is almost exactly the same as the 
-  Undernet's .anc (anti-nick-collide) patches, except that Undernet 
-  servers don't add usermodes to the NICK line.
-
-
-TimeStamped channel descriptions (avoiding hacked ops and desynchs):
-====================================================================
-
-. For each channel, keep a timestamp, set to the current time when the
-  channel is created by a client on the local server, or to the received 
-  value if the channel has been propagated from a TS server, or to 0 
-  otherwise. This value will have the semantics of "the time of creation 
-  of the current ops on the channel", and 0 will mean that the channel 
-  is in non-TS mode.
-
-  A new server protocol command is introduced, SJOIN, which introduces 
-  a full channel description: a timestamp, all the modes (except bans),
-  and the list of channel members with their ops and voices. This 
-  command will be used instead of JOIN and of (most) MODEs both in 
-  connect bursts and when propagating channel creations among TS 
-  servers. SJOIN will never be accepted from or sent to users.
-
-  The syntax for the command is:
-
-  SJOIN <TS> #<channel> <modes> :[@][+]<nick_1> ...  [@][+]<nick_n>
-
-  The fields have the following meanings:
-
-  * <TS> is the timestamp for the channel
-
-  * <modes> is the list of global channel modes, starting with a +
-    and a letter for each of the active modes (spmntkil), followed
-    by an argument for +l if there is a limit, and an argument for
-    +k if there's a key (in the same order they were mentioned in
-    the string of letters).
-
-    A channel with no modes will have a "+" in that field.
-
-    A special value of "0" means that the server does not specify the 
-    modes, and will be used when more than one SJOIN line is needed
-    to completely describe a channel, or when propagating a SJOIN
-    the modes of which were rejected.
-
-  * Each nick is preceded by a "@" if the user has ops, and a "+" if
-    the user has a voice. For mode +ov, both flags are used.
-
-  SJOINs will be propagated (when appropriate) to neighboring TS 
-  servers, and converted to JOINs and MODEs for neighboring non-TS 
-  servers.
-  
-  To propagate channels for which not all users fit in one 
-  SJOIN line, several SJOINs will be sent consecutively, only the first
-  one including actual information in the <mode> field.
-  
-  An extra ad-hoc restriction is imposed on SJOIN messages, to simplify 
-  processing: if a channel has ops, then the first <nick> of the first 
-  SJOIN sent to propagate that channel must be one of the ops.
-
-  Servers will never attempt to reconstruct a SJOIN from JOIN/MODE 
-  information being received at the moment from other servers.
-
-. For each user on a channel, keep an extra flag (like ops and voice)
-  that is set when the user has received channel ops from another 
-  server (in a SJOIN channel description), which we rejected (ignored). 
-  Mode changes (but NOT kicks) coming from a TS server and from someone 
-  with this flag set will be ignored. The flag will be reset when the 
-  user gets ops from another user or server.
-
-. On deops done by non-local users, coming from TS servers, on channels 
-  with a non-zero TS, do not check that the user has ops but check that 
-  their 'deopped' flag is not set. For kicks coming from a TS server, do 
-  not check either. This will avoid desynchs, and 'bad' modechanges are 
-  avoided anyway. Other mode changes will still only be taken into 
-  account and propagated when done by users that are seen as having ops.
-
-. When a MODE change that ops someone is received from a server for a 
-  channel, that channel's TS is set to 0, and the mode change is 
-  propagated. 
-
-. When a SJOIN is received for a channel, deal with it in this way:
-  * received-TS = 0: 
-    + if we have ops or the SJOIN doesn't op anyone, SJOIN propagated
-      with our own TS.
-    + otherwise, TS set to 0 and SJOIN propagated with 0.
-  * received-TS > 0, own-TS = 0: 
-    + if the SJOIN ops someone or we don't have ops, set our TS to the
-      received TS and propagate.
-    + otherwise, propagate with TS = 0.
-  * received-TS = own-TS: propagate.
-  * received-TS < own-TS: 
-    + if the SJOIN ops someone, remove *all* modes (except bans) from 
-      the channel and propagate these mode changes to all neighboring
-      non-TS servers, and copy the received TS and propagate the SJOIN.
-    + if the SJOIN does not op anyone and we have ops, propagate
-      with our own TS.
-    + otherwise, copy the received TS and propagate the SJOIN.
-  * received-TS > own-TS: 
-    + if the SJOIN does not introduce any ops, process and propagate
-      with our own TS.
-    + if we have ops: for each person the mode change would op, set the 
-      'deopped' flag; process all the JOINs ignoring the '@' and '+' 
-      flags; propagate without the flags and with our TS.
-    + if we don't have ops: set our TS to the received one, propagate
-      with the flags.
-
-
-Explanations:
-
-  This part of the protocol is the one that is most different (and 
-  incompatible) with the Undernet's: we never timestamp MODE changes, 
-  but instead we introduce the concept of time-stamped channel 
-  descriptions. This way each server can determine, based on its state 
-  and the received description, what the correct modes for a channel 
-  are, and deop its own users if necessary. With this protocol, there is 
-  *never* the need to reverse and bounce back a mode change. This is
-  both faster and more bandwith-effective.
-
-  The end goal is to have a protocol will eventually protect channels 
-  against hacked ops, while minimizing the impact on a mixed-server net. 
-  In order to do this, whenever there is a conflict between a TS server 
-  and a non-TS one, the non-TS one's idea of the whole situation 
-  prevails. This means that channels will only have a TS when they have 
-  been created on a TS-aware server, and will lose it whenever a server 
-  op comes from a non-TS server. Also, at most one 'zone' will have a TS 
-  for any given channel at any given time, ensuring that there won't be 
-  any deops when zones are merged. However, when TS zones are merged, if 
-  the side that has a TS also has ops, then the TS is kept across the 
-  whole new zone. Effective protection will only be ensured once all 
-  servers run TS patches and channels have been re-created, as there is 
-  no way servers can assign a TS to a channel they are not creating 
-  (like they do with nicks) without having unwanted deops later.
-
-  The visible effects of this timestamped channel-description protocol 
-  are that when a split rejoins, and one side has hacked ops, the other 
-  side doesn't see any server mode changes (just like with Undernet's
-  TS), but the side that has hacked ops sees:
-
-  * first the first server on the other side deopping and devoicing 
-    everyone, and fixing the +spmntkli modes
-  * then other users joining, and getting server ops and voices
-
-  The less obvious part of this protocol is its behavior in the case 
-  that the younger side of a rejoin has servers that are lagged with 
-  each other. In such a situation, a SJOIN that clears all modes and 
-  sets the legitimate ones is being propagated from one server, and 
-  lagged illegitimate mode changes and kicks are being propagated in the 
-  opposite direction. In this case, a kick done by someone who is being 
-  deopped by the SJOIN must be taken into account to keep the name list 
-  in sync (and since it can only be kicking someone who also was on the 
-  younger side), while a deop does not matter (and will be ignored by 
-  the first server on the other side), and an opping *needs* to be 
-  discareded to avoid hacked ops.
-
-  The main property of timestamped channel descriptions that makes them 
-  a very stable protocol even with lag and splits, is that they leave a 
-  server in the same final state, independently of the order in which 
-  channel descriptions coming from different servers are received. Even 
-  when SJOINs and MODEs for the same channel are being propagated in 
-  different direction because of several splits rejoining, the final 
-  state will be the same, independently of the exact order in which each 
-  server received the SJOINs, and will be the same across all the 
-  servers in the same zone.
-
-
diff -uNrd ircd-hybrid-6.0/doc/Tao-of-IRC.940110 ircd-pi1.0a/doc/Tao-of-IRC.940110
--- ircd-hybrid-6.0/doc/Tao-of-IRC.940110	Thu Sep 17 10:25:02 1998
+++ ircd-pi1.0a/doc/Tao-of-IRC.940110	Wed Dec 31 19:00:00 1969
@@ -1,272 +0,0 @@
-
-The Tao of Internet Relay Chat
-Copyright (C) Ove Ruben R Olsen 1994
-Version of 940110
-Contributing masters: Master ScottM
-
------
-Something is formed by the electrons, born in the silent cable. Shaping
-and growing and ungrowing. It is there yet not there. It is the source of
-Internet Relay Chat. I do not know the name, thus I will call it the Tao
-of Internet Relay Chat.
-
-If the Tao is great, then the IRC is running ceaselessly. If the IRC is 
-great then the server is running without ever stoping. If the server is 
-great then the client will always be the server. The luser is then pleased 
-and there is Chat in the world.
-
-The Tao of IRC squits far away and connects on returning.
-
-
------
-The genetic potential of birth, a lot to know, yet unknown.
-
-In the begining there was nothing. 
-
-Out of nothing the Tao gave birth to tolsun.oulu.fi. tolsun gave birth to
-OuluBox. 
-
-OuluBox gave birth to rmsg.
-
-rmsg was not Tao, so MUT gave birth to IRC.
-
-No one knows when IRC came into existance, the mighty master WiZ have it 
-to be at the end of the eight month in the year of the Dragon.
-
-
------
-Each channel has its purpose, however humble. Each channel is the Yin and
-Yang of IRC. Each channels has it's place within the IRC.
-
-In the beginning there was only channel 0, thus channel 0 is the soil of
-IRC. 
-
-Channel 1 to channel 10 then was open as the sea. Channel 11 to 999 was the 
-trees and forests of IRC. Channels above 999 should not be mentioned, and
-channels below 0 were unborn and contained many secrets.
-
-This was not the right Tao, so IRC gave birth to +channels. 
-
-+channels had the yin and yang. Mode does not.
-
-This was not the right Tao still, so IRC gave birth to #channels. 
-
-#channels have the yin and yang.
-
-Only channel 0 is the right path to Tao, but avoid speaking on channel 0.
-
-
------
-There was a great dispute among the Broom-Walkers of the Relay. Some of them
-wanted neither yin nor yang. Out of this Eris came into existance. Some of the
-Broom-Walkers then created Eris Free-net. 
-
-This was the right Tao.
-
-Kind Gentle and Boring Net was another wrong path to the Tao of Internet Relay 
-Chat.
-
-Some time later there was a quantity of some lusers who wanted to be 
-Broom-Walkers also. The Eris Free Broom-Walkers did not agree with them, 
-thus a new IRC was born. This IRC is called the Undernet. 
-
-But this is not the right Tao, either.
-
-
------
-There will always be disputes among the Broom-Walkers of Internet Relay Chat.
-
-This is the very nature of the IRC.
-
-
------
-Lusers that do not understand the Tao is always using the yang of Mode on 
-their channels. Lusers that do understand the Tao are always using Ignore
-on their channels.
-
-How could this not be so ?
-
-
------
-The wise sage luser is told about the Chat and uses it. The luser is told 
-about the IRC and is looking for it. The flock are told about the Tao and
-make a fool of the IRC.
-
-If there was no laughter, there would be no Tao.
-
-
------
-The master says:
-"Without the Tao of Internet Relay Chat, life becomes meaningless."
-
-The Relay of the old time was mysterious and sacred. We can neither imagine 
-its thoughts nor path; we are left but to describe.
-
-
------
-The sage luser must be aware like a frog crossing the highway.
-
-
------
-The great master Wumpus once dreamed that he was an automaton. When he awoke
-he exclaimed:
-	"I don't know whether I am Wumpus dreaming that I am a client,
-	 or a client dreaming that I am Wumpus!"
-
-So was the first Automata born. 
-
-The master Nap then said:
-	"Any automata should not speak unless spoken to.
-	 Any automata shall only whisper when spoken to."
-
-Thus replied the master Gnarfer:
-	"The lusers shall keep in mind that a automata can be either good or
-	 bad. Create good automata, and the IRC will hail you and you will 
-	 gain fame and fortune. Create bad automata and people will start to 
-	 hate you, and finaly you will be /KILLed to ethernal damnation"
-
-Many lusers have fallen into the clutches of ethernal damnation. They where 
-not following the Tao.
-
-
------
-There once was a luser who went to #BotSex. Each day he saw the automatons. 
-The luser decided that he also would have such a automata.
-He asked another luser for his automata. The other luser gave his automata
-away.
-
-The luser was not within the Tao, so he just started the automata. The automata
-had only Yang inside so all the lusers files where deleted.
-
-Some moons laither the same luser then had become a sage luser, and did create
-his automata from the very grounds with materials found inside the IRC.
-The luser was now within the Tao and his automata lived happily ever after.
-
-
------
-There once was a master who wrote automatons without the help of master Phone.
-A novice luser, seeking to imitate him, began with the help of master Phone.
-When the novice luser asked the master to evaluate his automata the master
-replied: "What is a working automata for the master is not for the luser.
-You must must BE the IRC before automating."
-
-
------
-Master BigCheese gave birth to master Troy; his duty clear. Master Troy gave 
-birth to master Phone, for the Tao of Irc must be eternal and must flow as the 
-ceaseless river of Time itself.
-
-
------
-Master Phone once said about the ircII client:
-	"public_msg is for a message from someone NOT on the channel
-	 public_other is for a message on a channel that doesn't belong to
-	 a window. public is for a message on a channel that belongs to a 
-	 window!"
-
-Out of this raised the mighty chaos.
-
-
------
-The sage luser came to the master who wrote automata without the help of 
-master Phone. The sage luser asked the master who wrote automata: "Which is 
-easiest to make. A automata with the help of master Phone or an automata 
-made with the help of a language ?"
-
-The master who wrote automata then replied:
-	"With the help of a language."
-
-The sage luser was disapointed and exclaimed: "But, with master Phone you
-do not need to know anything about the soil of IRC. Is not that the easiet
-way ?"
-
-"Not really" said the master who wrote automata, "when using master Phone
-you are closed inside a box. For sure, it is a great box for the lusers,
-but the master will need more power, thus a language is the only path to go.
-With the language the master will never have to limit himself. When using
-such a language the master will seek the best between the need and the
-availibility."
-
-"I see", said the sage luser.
-
-This is the essence of Tao of IRC automatas.
-
-
------
-A client should be light and be used for communication. The spirit of a good
-client is that it should be very convinient for the luser to use, but hard
-for the luser who want to create automata.
-There should never ever be too many functions or too few functions. 
-
-There should always be a ignore.
-
-Without ignore the client is not within the Tao of Chating.
-
-The client should always respond the luser with messages that will not 
-astnonish him too much. The server likewise. If the server does not, then it
-is the clients job to explain what the server says.
-
-A client which fails this, will be useless and cause confusion for the lusers.
-The only way to correct this is to use another client or to write a new one.
-
-
------
-A luser asked the masters on #IrcHelp: "My client does not work".
-The masters replied: "Upgrade your client".
-The luser then wondered why the master knew. The master then told him about
-the Protocol.
-
-"Your client does not work beaucse it does not understand the server. Why
-should it always work ? Only a fool would expect such. But, clients are made
-by humans, and humans are not perfect. Only Tao is.
-
-The IRC is solid. The IRC is floating, and will always be dynamic. Live with 
-that or /quit."
-
-
------
-The luser came to the masters of #IrcHelp, asking about the Tao of IRC within
-the client.
-The masters then said that the Tao of IRC always lies inside the client
-regardless of how the client connects to the server.
-
-"Is the Tao in irc ?" asked the luser.
-"It so is" replied the masters of #IrcHelp.
-"Is the Tao in the ircII, Kiwi, rxirc, vms, rockers and msa ?" asked the 
-luser.
-"In all of them and in the TPC, irchat, zenirc, zircon X11-irc and even the 
-dos irc has the Tao" said the master quietly.
-"Is the Tao in a telnet connection directly to the server ?" 
-
-The master then was quiet for a long time and said. "Please leave, such 
-questions are not within the Tao of IRC".
-
-
------
-The master says: "Without the Protocol of TCP the messages will not travel.
-                  Without the client, the server is useless."
-
-
------
-There once was a luser who used the ircII client. "ircII can do anything I 
-ever need for using IRC" said the emacs client user, "I have /ON's, I have 
-assignments, I have aliasing. Why don't you use this instead of the huge 
-emacs client, which also has a messy screen?"
-The emacs client user then replied by saying that "it is better to have a
-scripting language that is the client instead of have a client that has
-a scripting language." Upon hearing this, the ircII client luser fell silent.
-
-
------
-The master Wumpus said: "Time for you to leave. I did, now I'm happy."
-The master Gnarfer replied: "Use, but never overuse IRC, then you will also 
-be happy within IRC"
-
-
------
-A luser came unto the masters of #EU-Opers and asked, "How can I be, yet not 
-be, a user@host within the IRC?"
-The masters of #EU-Opers replied: "To be Tao is to be ones true self. To hide
-ones self is not Tao, and is not IRC, you have much to learn before you shall 
-be at rest within the Flow of Irc.  Please leave"
-
diff -uNrd ircd-hybrid-6.0/doc/ca.cnf ircd-pi1.0a/doc/ca.cnf
--- ircd-hybrid-6.0/doc/ca.cnf	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/ca.cnf	Sat May 18 00:05:54 2002
@@ -0,0 +1,93 @@
+# create RSA certs - Server
+
+RANDFILE = openssl.rnd
+
+[ ca ]
+default_ca	= CA_default
+
+[ CA_default ]
+dir		= .
+certs		= $dir/certs		# Where the issued certs are kept
+#crl_dir	= $dir/crl		# Where the issued crl are kept
+database	= $dir/ca.txt		# database index file.
+new_certs_dir	= $dir/newcerts		# default place for new certs.
+
+certificate	= $dir/ca.crt		# The CA certificate
+serial		= $dir/ca.ser		# The current serial number
+crl		= $dir/ca.crl		# The current CRL
+private_key	= $dir/ca.key		# The private key
+RANDFILE	= $dir/ca.rnd		# private random number file
+
+x509_extensions = usr_cert		# The extentions to add to the cert
+
+default_days	= 365                   # how long to certify for
+default_crl_days= 30                    # how long before next CRL
+default_md	= md5                   # which md to use.
+preserve	= no                    # keep passed DN ordering
+
+policy          = policy_match
+
+[ req ]
+default_bits		= 2048
+default_keyfile		= req.key
+encrypt_key		= yes
+distinguished_name	= req_dn
+x509_extensions		= v3_ca
+
+[ req_dn ]
+countryName			= Country Name (2 letter code)
+countryName_default		= CH
+countryName_min			= 2
+countryName_max			= 2
+
+stateOrProvinceName		= State or Province Name (full name)
+stateOrProvinceName_default	= 
+
+localityName                    = Locality Name (eg, city)
+localityName_default		= 
+
+0.organizationName              = Organization Name (eg, company)
+0.organizationName_default      = PiIRC
+
+organizationalUnitName          = Organizational Unit Name (eg, section)
+organizationalUnitName_default  = 
+
+0.commonName                    = Common Name (FQDN of your server)
+0.commonName_default            = 
+
+[ usr_cert ]
+basicConstraints=CA:FALSE
+nsCertType = client, server
+nsComment                       = "OpenSSL Generated Certificate"
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer:always
+
+[ v3_req ]
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer:always
+basicConstraints = CA:true 
+
+[ crl_ext ]
+authorityKeyIdentifier=keyid:always,issuer:always
+
+[ policy_match ]
+countryName             = match
+stateOrProvinceName     = match
+organizationName        = match
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+
+[ policy_anything ]
+countryName             = optional
+stateOrProvinceName     = optional
+localityName            = optional
+organizationName        = optional
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+
diff -uNrd ircd-hybrid-6.0/doc/ca.sh ircd-pi1.0a/doc/ca.sh
--- ircd-hybrid-6.0/doc/ca.sh	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/ca.sh	Thu May 23 13:13:34 2002
@@ -0,0 +1,31 @@
+#!/bin/sh
+case "$1" in
+	newca)
+		openssl req -new -x509 -config ca.cnf -keyout ca.key \
+			-out ca.crt -days 365
+		chmod 600 ca.key
+		touch ca.txt
+		echo "01" > ca.ser
+		mkdir -p certs newcerts
+	;;
+	req)
+		openssl req -new -config ca.cnf -keyout ircd.pem -out req.pem -days 365
+	;;
+	cert)
+		openssl req -new -x509 -days 365 -nodes \
+			-config ca.cnf -out ircd.pem \
+			-keyout ircd.pem
+		openssl x509 -subject -dates -fingerprint -noout \
+			-in ircd.pem
+	;;
+	sign)
+		openssl ca -config ca.cnf -policy policy_anything -out signed.crt -infiles req.crt
+	;;
+	*)
+		echo "newca  - generate a certificate authority"
+		echo "req    - generate a certificate request"
+		echo "cert   - generate a self-signed certificate"
+		echo "sign   - sign a certificate"
+	;;
+esac
+	
diff -uNrd ircd-hybrid-6.0/doc/example.conf ircd-pi1.0a/doc/example.conf
--- ircd-hybrid-6.0/doc/example.conf	Fri Dec  1 01:28:43 2000
+++ ircd-pi1.0a/doc/example.conf	Wed Dec 31 19:00:00 1969
@@ -1,475 +0,0 @@
-#   $Id: example.conf,v 1.25 2000/12/01 06:28:43 lusky Exp $
-#   IRC - Internet Relay Chat, doc/example.conf
-#   Copyright (C) 1992, Bill Wisner
-#
-#   Modified by Rodder, Jon Lusky <lusky@blown.net>,
-#   at one time, but he didn't credit his changes.
-#   Updated Dec 19, 1997 Diane Bruce aka db/Dianora <db@db.net>
-#   please also read example.conf.trillian, it covers
-#   elements this example misses.
-#   -db
-#   Updated again July 17, 1998 -db
-#   Updated 990102 to take out P: line connection limiting code
-#   Updated again July 5, 1999 -db
-#
-#   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.
-#
-#
-# IRC example configuration file
-#
-# This file describes the information that should be present in your IRC
-# configuration and how to present it.
-#
-# M: set your server's name. Fields are, in order, host name (domain style),
-#  optional bind address, a text name, and unused.
-#
-# NOTE:  The "optional bind address" is an address used in binding to a
-# local address when we connect outbound.  For example, if your server machine
-# is myhost.example.com (192.168.1.5) and you want IRCD to connect to others
-# from irc.example.com (192.168.1.250), you'd put 192.168.1.250 in the
-# "optional bind address" field.  If left blank, UNIX will choose the primary
-# address of the interface closest to the destination.
-#
-# NOTE:  As of hybrid-6, the port field no longer binds a port by default.
-# It is an inoperative and obsolete field.
-#
-M:hayes.ims.alaska.edu:192.168.1.250:University of Alaska Fairbanks:
-# 
-# A: administrative information. This line should have three fields, which
-#    may contain any arbitrary text. It is printed by the /ADMIN command.
-#
-A:University of Alaska Institute of Marine Science:Fairbanks, AK USA:Bill Wisner <wisner@ims.alaska.edu>
-
-#
-# .include lines, insert a file from DPATH directory into the conf
-# you could use this to insert a common file between several
-# ircd's if you wished. include files are handled after all the
-# other lines in the conf file are done. i.e. a .include is always
-# as if it was at the end of the conf file.
-# 
-.include "olines.conf"
-#
-# Y: define connection class.  A class must be defined in a Y: line before
-#    it is used in a C, N, or I line.  The fields are, in order, class number,
-#    ping frequency in seconds, connect frequency in seconds, maximum
-#    number of links (used for auto-connecting), and size of sendq.
-#    For servers a sendq of at least 4mb is recommended if not more.
-#
-# N.B. Y lines must be defined before I lines and O lines, since
-# both I lines and O lines make reference to Y lines or classes.
-#
-# For clients, the connect frequency field is used to set the maximum
-# number of connects from same IP address. i.e. setting this field to '1'
-# will limit every I line using this Y, to one connection per IP address.
-# leaving it blank or 0, will disable any such checking.
-#
-# Class numbers must be positive to ensure future modification of ircd to
-# use -1 internally could not be complicated with it's use externally.
-#
-Y:1:90:0:20:100000
-Y:2:90:300:10:4000000
-#
-# I: authorize clients to connect to your server. You can use domains,
-#    IP addresses, and asterisk wildcards. The second field can contain a
-#    password that the client must use in order to be allowed to connect.
-#    The optional fifth field may contain a connection class number.
-#
-I:NOMATCH::*.alaska.edu::1
-I:NOMATCH:password:acad3.alaska.edu::1
-#
-#    If using IDENT, to activate it, you need to place a "user@" in the
-#    host segment.
-#
-I:*@acad3.alask.edu::*@acad3.alaska.edu::1
-I:root@acad.alask.edu::root@acad.alaska.edu::1
-#
-# The above are bad examples of I-lines, what really happens is something
-# like this:
-#
-
-## both these are obsolete in hybrid-6
-##I:128.250.*::*.mu.oz.au::1
-##I:root@128.250.*::root@*.mu.oz.au::1
-
-## This is a correct example in hybrid-6, the username 
-## is not used for an IP I line (this may be changed, its a simple change
-## but EFnet is currently deprecating the use of non resolving client hosts)
-## If the IP block has a resolving host name, it will be shown instead
-## of the IP address. This just serves to allow on an entire block of ip's
-## without needing to specify each individual hostname.
-## Note, you must use an 'x' in the name field
-
-I:128.250.0.0/16::x::1
-
-#
-# You can also limit the number of connections from one host
-# to any value. This can be used to stop cloners
-# This is done using the normally unused confreq line in the Y line.
-#
-# i.e.
-# Allow 100 users in a "bad boy" class, but allow only ONE
-# user per IP to connect at a time.
-#
-Y:3:90:1:100:100000
-#
-# Remember to put your "bad boy" I line last in the file, so it
-# seen first and matches first before your standard I lines
-#
-# With hybrid ircd, max connections is taken from the class
-# not per I line. i.e. the 3 I lines following will always add
-# up to 100 or less, not 100 per I line.
-#
-I:NOMATCH::*@*ppp*::3
-I:NOMATCH::*@*slip*::3
-I:NOMATCH::*@*ts*::3
-#
-# a name pattern in the first field will never cause a match since it's only
-# ever matched against an IP# in the form a.b.c.d and a number in the third
-# field will never match since a hostname is always compared against this
-# field.  The '@' needs to be in the IP# section for ident to be used.
-
-#
-## additional prefix characters in I lines are defined
-##
-## from comstud
-##
-## 1) There are noticable differences in I: lines now.
-##   There are 4 special characters that you can stick in front
-##   of a hostname or ip# that do special things.
-##   These characers are:
-##   -  This will never put a ~ for a user not running identd
-##   +  This will force people matching this I: to require identd
-##   !  This means to only allow 1 connection per ip# in this I:
-##   $  (Not used in hybrid)
-##
-##  Examples:
-##
-## a) I:x::!*@*ppp*::class  will only allow X connections per ip# for people
-##     who have *ppp* in their hostname where X is given in the Y: line.
-##    If there is no ! and you have a limit in your Y: line, then it matches
-##      full user@host instead of just host.
-
-## b) I:x::-*@*.cris.com::class will never show a ~, even though they may
-##     not be running identd.  (This is equivilent to the old way of not
-##    specifying a @ in the I: line).
-
-## Additionally since ircd-hybrid-6
-## B/E/F lines were removed and replaced with 3 other special characters
-## in I lines
-## 
-## ^ This will exempt a user from K/G lines, limited protection from D lines
-## & User can run bots (old B line)
-## > This user is exempt from I line/server side connection limits
-##   (old F line)
-## _ This user is exempt from G lines
-##
-## A variant of amm's spoofing code was added
-## = Spoof this users IP, normally only used for opers
-##
-## < This user is exempt from idle restrictions if IDLE_CHECK is defined
-##
-
-## Examples
-## c) I:NOMATCH::^db@koruna.varner.com::3
-##    This user is exempt from k/g lines
-## d) I:NOMATCH::&jerdfelt@*mindspring.net::3
-##    This user can run a bot, and is also "e lined"
-## e) I:NOMATCH::>lusky@*vol.com::3
-##    This user is immune from I line limits
-## f) I:NOMATCH::^&>mpearce@*varner.com::3
-##    This user can run a bot, is exempt
-##    from client connect limits.
-## g) I:smurfers.are.lame::=dgalas@*somewhere.com::3
-##    Show this user as being dgalas@smurfers.are.lame
-##    an IP can be used instead as long as the name field does not begin 
-##    with an 'x'
-##    i.e. 
-##    I:192.168.0.0/24::x::3 #this is an IP I line
-##    I:192.168.0.0::db@*somesite.com::3 #this is a spoofed IP	
-#
-# O: authorize operators. Fields are, in order, host name the operator must
-#    be logged in from (wildcards allowed), operator's password, operator's
-#    nickname.
-## The 4th field is the port number used in c/n's, in ircd-hybrid
-## this field is used to contain oper flags for this oper
-## You may wish to constrain an oper from using global kill or unkline
-## for example.
-## The flags are:
-## K/k - allow/disallow kill and kline
-## O/o - allow/disallow global kill
-## R/r - allow/disallow remote squit/connect
-## U/u - allow/disallow unkline
-## G/g - allow/disallow gline
-## N/n - allow the use of +n , which should be restricted to tcm use only
-##     for privacy reasons. (+c probably belongs controlled here too but isn't)
-## H/h - allow the use of /rehash, default is H for O and o, add h to 
-##       disable an opers use of /rehash
-## D/d - allow the use of /die or /restart. Default is d for disallowing
-##       /die /restart 
-##
-## Default flags for opers are GKORUH
-## Default flags for local ops, KUH
-## These flags over-rule what the normal privs of an oper would be,
-## but they cannot allow a local oper to do global kills for example.
-##
-## The global kill of a global oper can be disabled by using o for
-## example, in the port field.
-##
-# The first example allows me to become an operator from any
-#    machine in alaska.edu by typing /oper crunchy frog.
-#
-O:*.alaska.edu:frog:crunchy
-#
-## This example allow this oper, to global kill, do remote squit/connect
-## unklines, glines, and use umode +n
-##
-O:db@*db.net:-encrypted password-:Dianora:ORUGN:3
-#
-##
-## This example disables this opers use of global kill, unkline, and gline
-## The oper can still do remote squits/connects
-##
-O:newbie@*some.net:-encrypted password-:newbie:oug:3
-##
-## This example disables this opers use of global kill, unkline,
-## gline and gline and remote squits/connects
-## essentially the same permissions as a local oper, but with the "vanity"
-## They can still local kill and kline for example.
-##
-O:vanity@*some.net:-encrypted password-:vanity:oug:3
-##
-## you could make someone vantiy even more, by disabling their
-## kill/kline privs... note they can still do full traces
-## umode +c (watch connections) and do rehash
-## But otherwise, this set of flags is not practical for
-## a normal oper.
-##
-O:vanity@*some.net:-encrypted password-:vanity:nougk:3
-#
-## a monitor bot could be given the following privs
-## k - no kline/kill
-## g - make sure no GLINE
-## o - no global kill (already taken care of by 'k' flag above)
-## r - no remote routing/squits
-## N - allow this monitor to use umode +n for nick changes
-##
-## Some admins do not like remote tcm kills/klines. If this
-## tcm oper gets compromised, the best they can do is
-## rehash/trace/umode +cn , i.e. no global kills or "fun" for the
-## compromised o line. But its still quite usuable for monitoring
-## clones and nick flooders.
-##
-#
-o:tcm@*varner.com:-encrypted password-:tcm:kgorN:3
-#
-## Of course, leaving out the flags entirely defaults to
-## reasonable defaults, so if you don't want to worry about it, then don't.
-## You can always add G later for example.
-#
-## O : Global operator
-## No explicit G or G-line flag, no N or allow umode +n flag
-##
-O:db@ircd.dianora.com:-encrypted password-:Dianora::3
-#
-# o : local operator.
-o:trainee@shell.box.com:password:MyNick::3
-#
-##
-## The fifth field of an O line, is the new class this oper will join
-##
-# C:, N: set up connections to other servers.
-#
-# C: specifies a server that your server may connect to.
-# N: allows a remote server to connect to your own.
-#
-# The two lines are usually given in pairs.
-#
-# These lines may contain a password in the second field.  In fact, to
-# maintain proper security, *all* IRC server links must have passwords.
-#
-# If a C: line contains four fields (the fourth being a TCP port number)
-# IRC will actively try to connect to that server. You should have at least
-# one such line.
-#
-# If an N: line contains four fields, the fourth should contain a number that
-# specifies how many components of your own server's name to strip off the
-# front and be replaced with a *.  This is done to implement hostmasking.
-# For example, to make hayes.ims.alaska.edu present itself to the world as
-# *.alaska.edu, I would use a 2 (to strip off the first two parts).  If you
-# use this, be sure to tell the administrator of the servers you link to --
-# they must add your hostmasked name to their configuration file or you will
-# be unable to connect.
-#
-# The host part of C/N lines MUST contain a valid hostname or IP address
-# The host part in the C:line MUST be identical to the host part in the N:line
-# The name part of the C/N lines MUST match the associated H/L line name
-# 
-# The fifth field may contain a connection class number.
-#
-# The following two lines tell my server to try connecting to
-# byron.u.washington.edu.
-#
-C:byron.u.washington.edu:crunchyfrog:byron.u.washington.edu:6667:2
-N:byron.u.washington.edu:crunchyfrog:byron.u.washington.edu:2:2
-#
-# The following two lines allow a server to connect to my server, but my
-# server will not make any attempt to connect to it.  Note that since the
-# server is local to me, I am not using hostmasking.
-#
-C:kaja.gi.alaska.edu:llamas:kaja.gi.alaska.edu::2
-N:kaja.gi.alaska.edu:llamas:kaja.gi.alaska.edu::2
-#
-# C and N lines may also use the "user@" combination in the same way as
-# the I-lines.
-#
-C:wisner@kaja.gi.alaska.edu:llamas:kaja.gi.alaska.edu::2
-N:wisner@kaja.gi.alaska.edu:llamas:kaja.gi.alaska.edu::2
-#
-# K: kill a user automatically upon connecting.  This is used to deny
-#    troublesome users access to your server.  The fields are, in order,
-#    hostname (wildcards are allowed), time of day, and username.
-
-## Timed k-lines and R: lines are not recommended by the hybrid
-## team. They might not even work. Timed-klines made more sense
-## for university ircd's but nowadays with so many open irc servers
-## around, it just seems pointless.
-## -Dianora
-
-# The second example restricts access from acad3.alaska.edu from
-# 9:00am to noon, and 2:00pm to 5:00pm.  This form is only supported if
-# TIMED_KLINES is defined.
-#
-K:*.alaska.edu::FSSPR
-K:acad3.alaska.edu:0900-1200,1400-1700:*
-#
-# R: restrict user access.  This is an extended form of the K: line.
-#    It looks for a match then runs an outside program that will determine
-#    whether the person should be allowed on.  The fields are hostname,
-#    program, and username.  A full pathname to the program should be used.
-#    The output of the program should be a string of the form "Y <message>"
-#    to allow the user, or "N <message>" to block them.  In the first case
-#    the message is ignored; in the latter, it is sent as an error message
-#    to the user.  R: lines are only functional if activated in config.h.
-#
-R:kaja.gi.alaska.edu:/usr/local/lib/irc/does-eric-get-in:ejo
-#
-#
-# L: leaf.  This forces the server listed to act as a leaf.  If such a
-#    server allows any other servers to connect to it, its link is
-#    dropped. If a port parameter is non-zero, it is used to control the
-#    maximum depth that link will allow, where depth is the tree depth of
-#    that branch.
-#
-L:::kaja.gi.alaska.edu
-L:::cm5.eng.umd.edu:1
-#
-#    A new extension to the L-line allows you to be selective
-#    about which other servers you wish the connecting server to behave as
-#    as a leaf towards.  The following would not allow any server connecting
-#    with a name that matches *.fi to introduce a server matching *.edu.
-#
-L:*.edu::*.fi
-#
-# H: Hub.  This is required to allow other servers which connect to you as
-#    a hub and introduce other servers.
-#
-H:*.au:*:*.au
-#
-# P : port. The port line allows the server to listen on various ports for
-#     connections.  Fields in order: unused,
-#     address to bind to, unused, port to listen on
-#
-# NOTE:  As of hybrid-6, you MUST have at least one P: line defining a port
-# to listen on, or the server won't do much.
-#
-P::::6667
-P::209.42.128.252::31337
-#
-# Listen on port 6665 on all available interfaces. Only allow connections from
-# net 128.32. This is checked before existance of other access is available.
-# 128.32.* == 128.32.0.0 where 0 is a wildcard.
-# Also listen to port 31337 on only 209.42.128.252.  Allow connections from
-# anywhere.
-#
-# D : dump.  Dumps all connect attempts from the matched IP
-# without any procesing.
-#
-#     First arg is target IP and CIDR mask, second is a comment.
-#
-D:208.148.84.3:bot host that changes domain names frequently
-D:128.183.0/24:NASA users aren't supposed to be on IRC
-#
-# d : immunity to D dump
-# As in D line , First arg is targe IP and CIDR mask, second is a comment.
-#
-d:199.0.154.0/24:Don't D line ais.net:
-
-#
-# server "clusters"
-# U: lines treat each of these servers as being part of your server cluster
-# klines placed on this server will be forwarded to the servers named
-# in the U lines here. LOCOPS will also be forwarded, but will appear
-# as "SLOCOPS" instead of "LOCOPS"
-#
-# i.e. irc_hub.somewhere.net has leaf servers irc1.somewhere.net 
-# irc2.somewhere.net
-
-# Hub server would have
-U:irc1.somewhere.net:
-U:irc2.somewhere.net
-
-# each client server would have
-U:irc_hub.somewhere.net
-
-
-#
-#
-# Q lines, not the old server Q lines, but Quarantine lines for
-# nicks. Only checked at NICK time, i.e. if added and hashed in
-# will not kill users who match this nick.
-#
-Q:dcc-*:dcc bots not allowed on this server
-Q:lamestbot:You have to be kidding me
-Q:crush:In memory of Janet Pippin
-Q:cwush:In memory of Janet Pippin
-Q:callas:Only allowed from this host:callas@oper.irc.arpa.com
-
-#
-# if JUPE_CHANNEL is defined you can also jupe a channel locally
-# i.e. no one on your server can join this channel.
-# You need the backslash to escape the # in the channel
-#
-Q:\#packet:I am tired of the packet fights for this channel
-#
-# X lines.
-# Used to match gecos fields and prohibit users or warn about users
-# who have matching strings in those fields from getting on the server.
-#
-# All X line matches are sent to opers in +r user mode
-# On an X line, a non 0 value for port exits that client
-# a 0 value, only warns on +r
-#
-# These three examples only warn
-X:*www*:Possible spambot warning 1::0
-X:*http*:Possible spambot warning 2::0
-X:*sex*:Possible spambot warning 3::0
-#
-# These two examples reject the client
-# use this to reject IPHONE users
-X:* vc:IPHONE user::1
-# This is a very probable spambot
-X:*see me at*:This has GOT to be a spambot::1
-X:*hi baby*:This has GOT to be a spambot::1
-
diff -uNrd ircd-hybrid-6.0/doc/example.conf.trillian ircd-pi1.0a/doc/example.conf.trillian
--- ircd-hybrid-6.0/doc/example.conf.trillian	Wed Jul 28 00:57:22 1999
+++ ircd-pi1.0a/doc/example.conf.trillian	Wed Dec 31 19:00:00 1969
@@ -1,369 +0,0 @@
-# IRC - Internet Relay Chat, doc/example.conf
-# Copyright (C) 1994, Helen Rose
-##
-## updated by Diane Bruce Dec 19 1997, aka db or Dianora 
-## My changes will be shown in ## marks
-##
-#
-#   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.
-#
-# This is an example configuration file for the IRC server
-# 
-# You only need an ircd.conf (IRC server configuration file) if you are
-# running an IRC server. If you are running a standalone client this file
-# is not necessary.
-#
-# This file will explain the various lines in the IRC server
-# configuration file. Not all lines are mandatory. You can check to make
-# sure that your configuration file is correct by using the program
-# "chkconf", provided in the server distribution (and when you do "make
-# install" this program will be installed in the same directory as the irc
-# server). 
-# 
-# The options for whether a line is needed or not are: 
-# MANDATORY: you absolutely MUST have this line
-# NETWORKED: you must have this line if you are connecting this irc
-#            server to any other server (servers can run standalone).
-# SUGGESTED: it is highly suggested that you use this line
-# OPTIONAL: it's completely up to you whether to define this or not
-# DISCOURAGED: you really really should not use this line if at all
-#              possible. 
-# NOT NECESSARY: an old or out of date line that isn't needed.
-#
-# MANDATORY lines are absolute *musts*, that is, if you do not have this
-# line then your server will not work properly. SUGGESTED lines are
-# close-to-mandatory (that is, the server will run without it, but you are
-# highly encouraged to use these lines).
-#
-# Note that "*" in a field indicates an "unused" field.
-#
-#
-# ========================================================================
-# NOTE! this entire configuration file is read UPSIDE-DOWN! So if you have
-# to put something in a specific order (for example, client-connection
-# lines), put them in reverse order!
-# ========================================================================
-#
-#
-# M: [MANDATORY]. This line sets your server's name, description, and
-# port number. Fields, in order, are: 
-#
-# M:hostname:*:Description Of Your Server:6667
-#
-M:csa.bu.edu:*:Boston University Computer Science Department:6667
-#
-# A: [MANDATORY]. This line lists your administrative information
-# (contact address, etc). To view this information, /admin (server) will
-# show it to you.
-#
-# The A: line has no set information, in fact, you can put arbitrary text
-# in there if you wish (it is encouraged that you put at *least* a contact
-# address for a person responsible for the irc server, however)
-#
-A:Boston University CS Department:Main Client Server:Helen Rose <hrose@cs.bu.edu>
-#
-# Y: [SUGGESTED]. These lines define connection classes. Connection
-# classes allow you to fine-tune your client and server connections. It is
-# suggested that clients and servers be placed in seperate classes, and if
-# you have lots of server connections (if you do have lots of servers you
-# shouldn't be reading this file :-) each set of servers (defined
-# arbitrarily by you) should have its own class. If you have clients
-# coming in from lots of different sites, you may want to seperate them
-# out into classes. For instance, you may want to put local users in one
-# class, with remote users in another class.
-#
-# The class numbers are not arbitrary. In auto-connecting servers -- that
-# is, servers that you have a port number (e.g. 6667) on the end of the C:
-# line (see below) the higher the number the higher the priority in
-# auto-connecting.
-#
-# The fields in order are: class number, ping frequency (in seconds),
-# connect frequency (in seconds), maximum number of links (used for
-# auto-connecting, and for limiting the number of clients in that class),
-# and sendq (this overrides any value set in include/config.h for #define
-# MAXSENDQLENGTH).
-#
-# Note that it is a good idea to have ping frequency the same at both ends
-# of the link.
-# 
-# in this case, connect-frequency is 0 indicating that this is a client
-# class (servers never connect to clients, it is the other way around).
-Y:1:90:0:20:100000
-#
-##
-## in the case of hybrid and Csr servers, the connect-frequency
-## field is now used as a count of number of clients to allow per IP
-## (or in the case of CSr the number of clients per IP or clients per
-## idented host; soon to be in Hybrid as well :-) )
-## i.e. to limit one set of I lines to 1 client connection per IP
-##
-##Y:1:90:1:20:100000
-## -db
-##
-#
-# this is a normal server connection (normal as of March, 1994)
-Y:2:90:300:1:600000
-#
-Y:10:90:0:3:100000
-#
-# I: [MANDATORY]. The I: lines are client-authorization lines. Without
-# these lines, no clients will be able to connect to your server.
-# Wildcards ("*") are permitted. Passwords are also permitted (clients can
-# be configured to send passwords).
-# 
-# Ident (for more information on this, see rfc1413) can also be used by
-# placing a @ in the appropriate fields.
-#
-# Fields are as follows:
-# I:IP-address-mask:optional password:domain-mask::connection class (opt)
-#
-# With a password..... This will allow anyone from anywhere to connect
-# as long as they know the password ("foobar"). Note listing this I: line
-# first, it will be read *last*, meaning it is the "fall-through". That
-# is, anyone who doesn't match the I: lines listed below must know the
-# password ("foobar") to connect.
-#
-I:*@*:foobar:*@*::1
-# This is a standard vanilla I: line which will permit anyone with an IP
-# address starting with 128.197 OR with a hostname ending in .bu.edu to
-# connect to the server. NOTE, the ircd matches on the *right-most* match,
-# so if I connect as hrose@csa.bu.edu (which is hrose@128.197.10.3) I will
-# show up on irc as hrose@csa.bu.edu since that is the first match it
-# found. (Even though the second match is valid).
-I:128.197.*::*.bu.edu::1
-# 
-# using ident
-I:*@128.197.*::*@*.bu.edu::1
-# and you can even specify just certain usernames running ident (as long
-# as the client's site is running the ident daemon):
-I:NOMATCH::hrose@csa.bu.edu::1
-# putting NOMATCH in the first field will stop the ircd from matching
-# automatically against the IP address and it will force the server to
-# match against the hostname. (the "NOMATCH" string is not mandatory, you
-# can use any arbitrary text in the first field).
-# 
-#
-# O: [OPTIONAL]. These lines define operator access. You do not need to
-# have an operator to run a server. A well configured leaf site should not
-# need an operator online, if it's connections are well defined, the irc
-# administrator can use kill -HUP on the ircd to reload the configuration
-# file. 
-##
-## *sigh* unfortunately, O lines are now pretty mandatory
-## in a modern EFnet
-## -db
-##
-# The fields are as follows:
-# O:hostname (ident "@" permitted):password:NickName
-# if the person in "NickName" is not coming from the hostname defined in
-# the first field then the person will get the error message "No O: lines
-# for your host". 
-# NOTE that since Crypted Passwords are defined by default in
-# include/config.h this text probably will not be plaintext. See
-# ircd/crypt/README for more information.
-#
-O:*.bu.edu:Zaphod:Trillian::10
-#
-# and this line forces ident:
-O:hrose@csa.bu.edu:Zaphod:Trillian::10
-# 
-# This line is a "local operator", it is specified with a lower-case "o"
-# -- it is the only lower-case type in the ircd.conf file.
-#
-# this line permits the nickname "jhs" with the password of "ITBites" to
-# be a local operator only (be able to issue commands locally -- can /kill
-# and /squit and /connect -- but *only* locally)
-#
-o:*.bu.edu:ITBites:jhs::10
-#
-# a crypted password line (NOTE that if you have crypted passwords, *all*
-# of you passwords must be crypted! In fact, if you are getting an error
-# "Incorrect Password" it may well be because crypted passwords are
-# defined and you have used plaintext.  So my example of plaintext and
-# crypted strings in the same IRC server configuration file is an
-# impossibility (but it is just theoretical, which is why I explained both).
-#
-O:rocker@csa.bu.edu:T0eiVgHrqeKTQ:Rocker::10
-#
-# U: [NOT NECESSARY]. This line defines the default server for the IRC
-# client that ships with the server -- the default client is in irc/irc
-# You should not use U: lines but instead use the UPHOST definition in
-# include/config.h 
-U:csa.bu.edu:foobar:csa.bu.edu
-##
-## U lines are now obsolete in hybrid. ignore.
-## - db
-##
-#
-# The host part of C/N lines MUST contain a valid hostname or IP address
-# The host part in the C:line MUST be identical to the host part in the N:line
-# The name part of the C/N lines MUST match the associated H/L line name
-# 
-# C: [NETWORKED]. These lines define what servers your server tries to
-# connect to. 
-# N: [NETWORKED]. These lines define what servers your server permits
-# connections to be initiated from. 
-# C/N lines MUST be used in pairs. You cannot have one without the other. 
-#
-# C: lines contain the following fields:
-# C:remote server's hostname:passwd:remote server's name:port:conn class
-# (connection class)
-# N: lines contain the following fields:
-# N:remote server's hostname:passwd:remote server's name:host mask:conn class
-# (connection class)
-# "host mask" is the number of parts in *your* hostname to mask to. For
-# instance, with my servername being "csa.bu.edu", if I wanted to present
-# my servername to be "*.bu.edu" I would have a host-mask portion of "1". 
-#
-# it is *strongly* advised that your C/N line passwords be different for
-# security's sake.
-#
-# ident is allowed in the server's hostname part of the field.
-# these lines tell the server to automatically (note the port number, that
-# means automatic connection) connect to cs-ftp.bu.edu:
-C:hrose@cs-ftp.bu.edu:bigspark:cs-ftp.bu.edu:6667:2
-N:hrose@cs-ftp.bu.edu:bigalpha:cs-ftp.bu.edu::2
-#
-# This server's connection lines are more vanilla, masking the host to
-# *.bu.edu (as described above):
-C:irc-2.mit.edu:camelsrk00l:irc-2.mit.edu::2
-N:irc-2.mit.edu:andsoarellamas:irc-2.mit.edu:1:2
-#
-# K: [OPTIONAL]. These lines define user@host patterns to be banned from
-# this particular server (with an optional time field). Note that K: lines
-# are *not* global, and if you ban a user they can still use any other IRC
-# server (unless they have specifically been banned there as well).
-# 
-# the fields are defined as:
-# K:hostmask:time field:username
-# wildcards are permitted in any one of the fields, in other words, you can
-# K:*::* if you wanted (but your server wouldn't be used much ;-)
-#
-# This K: line bans the username "FSSPR" (the wildcards are used to make
-# sure that any ident-checking character will match) on any machine from
-# the University of Alaska.
-K:*.alaska.edu::*FSSPR*
-#
-# This K: line bans any users from acs*.bu.edu between the hours of 8am
-# and 12pm and 1pm and 5pm (the time is always the server's local time):
-K:acs*.bu.edu:0800-1200,1300-1700:*
-# Note that 24 hour time is used (no "AM" or "PM").
-#
-# R: [DISCOURAGED]. These lines restrict user access based on a more
-# stringent checking system than is available in the K: line. It looks for
-# a match (based on hostname and username) and then runs an outside
-# program (which MUST be specified using a full pathname). The output of
-# the program should be a string in the form "Y <message>" (which permits
-# access for the user) or "N <message>" (which denies access for the
-# user). If "Y <message>" is received by the server, the server ignores
-# the message and permits access for the user. If "N <message>" is
-# returned, the server tells the user that he/she is not permitted to
-# access that irc server, and gives the reason.
-#
-# Again, like K: lines, R: lines are local and thus not very effective in
-# blocking certain machines from having IRC access.
-#
-# Use of R: requires that you have defined R_LINES in include/config.h
-#
-# The fields are as follows:
-# R:hostmask:/full/path/to/program:username
-# you can use wildcards in either the hostmask or username portion
-#
-R:csl.bu.edu:/home/hrose/bin.sun3/sun3access:*
-##
-## R lines are HIGHLY discouraged in hybrid right now
-## -db
-##
-#
-# Q: [DISCOURAGED]. These lines "quarantine" specified servers.  Because
-# of the way they operates, the same Q: lines MUST be installed by
-# everyone or the net will keep breaking. I CANNOT EMPHASIZE THIS ENOUGH.
-# Do NOT use Q: lines lightly!
-#
-# The fields are as follows:
-# Q:*:reason why quarantine is in place:servername
-#
-Q::this server is too slow and lags the net:cm5.eng.umd.edu
-##
-## Q line support was completely removed from hybrid. So, even
-## if you did add a Q line, it wouldn't do anything :-)
-## -db
-##
-#
-# L: [OPTIONAL]. These lines "Leaf" specified servers. They are only
-# useful if you are a non-leaf site yourself. There are two ways you can
-# use L: lines. The first will limit one particular site to a particular
-# tree depth (including 0, which would mean the server has to connect with
-# no servers linked behind it otherwise the connection will fail). The
-# second will allow you to be selective about which other servers you wish
-# the connecting server to behave as a leaf towards.
-#
-# The fields are as follows:
-# L:disallow connections to this hostmask::server name:depth
-# For example, this will force kaja.gi.alaska.edu to connect only as a
-# leaf (if it is not a leaf, the link will be dropped):
-L:::kaja.gi.alaska.edu
-# This line will force cm5.eng.umd.edu to have a depth of only 1 below it
-# (that is, it is allowed to have only leaves connected to it):
-L:::cm5.eng.umd.edu:1
-#
-# This line will prohibit anything matching *.edu to be connected behind
-# any server matching *.au:
-L:*.edu::*.au
-#
-# H: [OPTIONAL]. These lines define who you permit to act as a "hub" to
-# you (that is, who you permit to connect non-leafed servers to you).
-#
-# the first field may use wildcards, the third field *must* be an exact
-# match for a server's name (NOT a server's hostname, if they differ, the
-# server's name must be used). If the servername is a wildcard (e.g. *.au)
-# that is an acceptable name for the third field. 
-#
-# The fields are as follows:
-# H:servers which are permitted entry::hub server
-#
-# Example, permit cs-ftp.bu.edu to allow any servers behind it to connect:
-H:*::cs-ftp.bu.edu
-#
-# Example, permit irc-2.mit.edu to allow any MIT servers behind it to
-# connect: 
-H:*.mit.edu::irc-2.mit.edu
-#
-# P: [OPTIONAL]. This field allows the server to listen on various ports
-# (other than 6667) for connections. Any internet domain port that is
-# below 1024 means the ircd has to be run from inetd. The server can
-# listen to ports in the UNIX domain or the internet domain. If you wish
-# to create a port in the UNIX domain you must compile with UNIXPORT
-# defined in include/config.h. If you are permitting connections to a
-# seperate port, you can control access to that port by the host field.
-#
-# The fields are as follows::
-# P:hostmask or UNIX socket file:*:*:port number
-# for example, an internet domain socket on port 6665 for South African
-# users: 
-P:*.za:*:*:6665
-#
-# This line is an example of a UNIX domain socket in /tmp
-P:/tmp/.ircd:*:*:6666
-##
-## There IS no UNIX domain socket support in hybrid, thats how
-## we gained some speed :-)
-## It makes no sense at all, when you read the new-server requirements
-## an irc server has to be run on a dedicated server now. UNIX domain
-## sockets aren't much use if no shell users are allowed on the server.
-## -db
-##
-## D line E line etc. are described in the other example.conf
-## -db
diff -uNrd ircd-hybrid-6.0/doc/hub.conf ircd-pi1.0a/doc/hub.conf
--- ircd-hybrid-6.0/doc/hub.conf	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/hub.conf	Thu May 23 12:06:25 2002
@@ -0,0 +1,126 @@
+# $Id: hub.conf,v 1.4 2002/05/23 16:06:25 shifty Exp $
+#
+# Pi-IRC hub configuration file
+#
+# M: set your server's name. Fields are, in order, host name (domain style),
+#  optional bind address, a text name, and unused.
+#
+# NOTE:  The "optional bind address" is an address used in binding to a
+# local address when we connect outbound.  For example, if your server machine
+# is myhost.example.com (192.168.1.5) and you want IRCD to connect to others
+# from irc.example.com (192.168.1.250), you'd put 192.168.1.250 in the
+# "optional bind address" field.  If left blank, UNIX will choose the primary
+# address of the interface closest to the destination.
+#
+M:ircs.zeropain.com::Die fast and painless!:
+# 
+# A: administrative information. This line should have three fields, which
+#    may contain any arbitrary text. It is printed by the /ADMIN command.
+#
+A:line1:line2:line3
+
+#
+# Y: define connection class.  A class must be defined in a Y: line before
+#    it is used in a C, N, or I line.  The fields are, in order, class number,
+#    ping frequency in seconds, connect frequency in seconds, maximum
+#    number of links (used for auto-connecting), and size of sendq.
+#    For servers a sendq of at least 4mb is recommended if not more.
+#
+# N.B. Y lines must be defined before I lines and O lines, since
+# both I lines and O lines make reference to Y lines or classes.
+#
+# For clients, the connect frequency field is used to set the maximum
+# number of connects from same IP address. i.e. setting this field to '1'
+# will limit every I line using this Y, to one connection per IP address.
+# leaving it blank or 0, will disable any such checking.
+#
+# Class numbers must be positive to ensure future modification of ircd to
+# use -1 internally could not be complicated with it's use externally.
+#
+# class 1 for the downlinks...
+Y:1:90:300:32:4194304
+
+# class 2 for the backup uplink...
+Y:2:90:300:1:8388608
+
+# class 3 for the main uplink...
+Y:3:90:300:1:8388608
+
+# class 4 for the operator...
+Y:4:359:0:1;65535
+
+# I & O-line for the operator with passwd...:
+I:ircs.zeropain.com:blah:=*::4
+# /oper slashdot -password-
+O:*:TrkvKsN9roxKo:blah:KORUGHDEN:4
+
+# C:, N: set up connections to other servers.
+#
+# C: specifies a server that your server may connect to.
+# N: allows a remote server to connect to your own.
+#
+# The two lines are usually given in pairs.
+#
+# These lines may contain a password in the second field.  In fact, to
+# maintain proper security, *all* IRC server links must have passwords.
+#
+# The host part of C/N lines MUST contain a valid hostname or IP address
+# The host part in the C:line MUST be identical to the host part in the N:line
+# The name part of the C/N lines MUST match the associated H/L line name
+# 
+# The fifth field may contain a connection class number.
+#
+# The following two lines tell my server to try connecting to
+# byron.u.washington.edu.
+#
+
+# main uplink
+#C:irc.duisburg.icebear.de:-password-:irc.duisburg.icebear.de::3
+#N:irc.duisburg.icebear.de:-password-:irc.duisburg.icebear.de::3
+
+#H:*:*:irc.duisburg.icebear.de
+
+# backup uplink(s)
+#C:irc.wesel.icebear.de:-password-:irc.wesel.icebear.de::2
+#N:irc.wesel.icebear.de:-password-:irc.wesel.icebear.de::2
+
+#H:*:*:irc.wesel.icebear.de
+
+#
+# P : port. The port line allows the server to listen on various ports for
+#     connections.  Fields in order: unused,
+#     address to bind to, SSL, port to listen on
+#
+# NOTE:  As of hybrid-6, you MUST have at least one P: line defining a port
+# to listen on, or the server won't do much.
+#
+P:::SSL:6799
+#P::::6800
+
+# Our leaves
+C:ircs.pleasedontmakemekillyou.com:blah:ircs.pleasedontmakemekillyou.com::1
+N:ircs.pleasedontmakemekillyou.com:blah:ircs.pleasedontmakemekillyou.com:SSL:1
+L:::irc.avenger.mine.nu
+
+#C:irc.fireball.mine.nu:-password-:irc.fireball.mine.nu::1
+#N:irc.fireball.mine.nu:-password-:irc.fireball.mine.nu:SSL:1
+#L:::irc.fireball.mine.nu
+
+# SSL Line
+#
+# S:ciphers:passphrase:cvl:svl:
+#
+# ciphers = permitted cipher string
+#           (entries are separated
+#            by a '/' rather than ':')
+#
+# cvl = client verification level
+# svl = server verification level
+#
+# verification level:
+#   0 - ignore peer certificate
+#   1 - verify peer certificate if present
+#   2 - require valid peer certificate
+#   3 - verify peer with locally installed certificate
+#
+S:HIGH+RSA/MEDIUM+RSA/@STRENGTH:blah:1:2:
diff -uNrd ircd-hybrid-6.0/doc/hybrid.txt ircd-pi1.0a/doc/hybrid.txt
--- ircd-hybrid-6.0/doc/hybrid.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/hybrid.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,70 @@
+ircd-hybrid-6 Release Notes
+---------------------------
+$Id: hybrid.txt,v 1.2 2002/05/05 02:54:48 smoli Exp $
+
+Operating system dependencies have been removed, there is no longer any
+special code for AIX, SEQUENT, DYNIX, HPUX, Solaris, or pyr. We have
+made a large effort to remove as many portability issues as possible.
+The code should compile and run on any modern UNIX operating system that
+supports POSIX.1 and ANSI-C. We know the code builds cleanly on BSD,
+Solaris, and Linux. If it fails to work for you, or works on another
+platform not listed here, let us know. We won't make any guarantees
+about changing much to support anything wierd, but if including a
+standard header clears up a problem we'll probably do that.  This code
+is known to _not_ compile on AIX.
+
+The code now uses the ANSI-C assert macro in many places, this means
+that if an invariant isn't, the server will core on the spot hopefully.
+Using the assert macro also tends to slow down the code a bit, if you
+like living dangerously and are running the beta, use -DNDEBUG when you
+build the server and it will turn off the asserts. Production servers
+should always be compiled with -DNDEBUG for maximum efficiency. NOTE: If
+you are running a server with the asserts turned on and it cores on you,
+please send us a stack trace if you can.
+  
+Command lines are different for this version of hybrid, most of the old
+flags for debugging and running ircd from a terminal are gone and a
+couple new ones have been added. Valid command line options that require
+compile time options are silently ignored. 
+
+Command line options for this version:
+-d filename - specify d:line file
+-f filename - specify config file
+-h hostname - specify server name
+-k filename - specify k:line file
+-l filename - specify log file
+-n          - do not fork, run in foreground
+-v          - print version and exit
+-x          - set debug level, if compiled for debug logging
+
+Minimal logging is enabled by default, for the alpha/beta release it is
+set to L_DEBUG in s_log.c by default, this can be changed to other
+levels if the log gets too noisy (it shouldn't). Look at the log level
+constants in s_log.h for allowable values. A SET option will be
+available in the future for setting the value in real time. If you
+define USE_SYSLOG in your config ircd will log to both the ircd.log file
+and syslog.
+
+Authentication and DNS lookups are handled a bit differently now,
+clients are completely ignored until both auth and dns have completed.
+This is not significantly different than earlier behavior but you should
+notice slightly faster client connects.
+
+
+I line handling has changed.  Ident lookups are now always done for
+connecting clients.   An @ in the I line no longer turns off the tilde
+'~' adornment in the case of an unidented client. You must use the
+'-' prefix in the I line to turn off the ~ prefix for an unidented client.
+Clients which do not ident will be sent into the kline/iline matching code
+with a leading ~ character.  i.e. to allow a client onto your server
+without a ~, use an I line such as:
+	I:NOMATCH::-*db@*some.host.on.the.net
+This will match this user, and will remove the ~ as seen on the net.
+
+KNOWN BUGS:
+There is a possibility that ircd will core dump if you there are errors
+in your conf file.
+
+Send bug reports to ircd-hybrid@the-project.org.  Please include a gdb
+backtrace and a copy of your config.h.
+
diff -uNrd ircd-hybrid-6.0/doc/ircd.8 ircd-pi1.0a/doc/ircd.8
--- ircd-hybrid-6.0/doc/ircd.8	Thu Sep 17 10:25:02 1998
+++ ircd-pi1.0a/doc/ircd.8	Sat May  4 22:05:00 2002
@@ -1,12 +1,12 @@
-.\" @(#)ircd.8 2.0 (beta version) 29 Mar 1989 
-.TH IRCD 8 "29 March 1989"
+.\" @(#)ircd.8 pi0.4 04 May 2002
+.TH IRCD 4 " May 2002"
 .SH NAME
 ircd \- The Internet Relay Chat Program Server 
 .SH SYNOPSIS
 .hy 0
 .IP \fBircd\fP
-[-a] [-c] [-i] [-o] [-q] [-t] [-d directory] [-f configfile]
-[-x debuglevel] [-h hostname] [-p portnum] [-s]
+[-n] [-v] [-x] [-d dlinefile] [-f configfile]
+[-h hostname] [-k klinefile] [-l logfile]
 .SH DESCRIPTION
 .LP
 \fIircd\fP is the server (daemon) program for the Internet Relay Chat
@@ -19,82 +19,39 @@
 to and thus allow the user to begin talking to other users. 
 .SH OPTIONS
 .TP
-.B \-d directory
-This option tells the server to change to that directory and use
-that as a reference point when opening \fIircd.conf\fP and other startup
-files.
-.TP
-.B \-o
-Starts up a local ircdaemon. Standard input can be used to send IRC
-commands to the daemon. The user logging in from standard input will
-be given operator privileges on this local ircd. If ircd is a setuid program,
-it will call setuid(getuid()) before going to local mode. This option
-can be used in inetd.conf to allow users to open their own irc clients
-by simply connecting their clients to the correct ports. For example:
-.TP
-.B
-irc stream tcp nowait irc /etc/ircd ircd \\-f/etc/ircd.conf \\-o
-
-allows users connecting to irc port (specified in /etc/services) to start
-up their own ircdaemon. The configuration file should be used to check from
-which hosts these connections are allowed from. This option also turns
-on the autodie option -a.
-.TP
-.B \-a
-Instructs the server to automatically die off if it loses all it's clients.
+.B \-n
+Send debugging output to stderr and don't fork. Exteremely useful
+when IRCD runs and immediately exits.
 .TP
-.B \-t
-Instructs the server to direct debugging output to standard output.
+.B \-v
+Print version and exit.
 .TP
 .B \-x#
 Defines the debuglevel for ircd. The higher the debuglevel, the more stuff
-gets directed to debugging file (or standard output if -t option was used
+gets directed to debugging file (or standard output if -n option was
+used
 as well).
 .TP
-.B \-i
-The server was started by inetd and it should start accepting connections
-from standard input. The following inetd.conf-line could be used to start
-up ircd automatically when needed:
-.TP
-.B
-ircd stream tcp wait irc /etc/ircd ircd \-i
-
-allows inetd to start up ircd on request.
+.B \-d dlinefile
+Specifies the D: line file.
 .TP
 .B \-f filename
 Specifies the ircd.conf file to be used for this ircdaemon. The option
 is used to override the default ircd.conf given at compile time.
 .TP
-.B \-c
-This flag must be given if you are running ircd from \fI/dev/console\fP or
-any other situation where fd 0 isnt a tty and you want the server to fork
-off and run in the background. This needs to be given if you are starting
-\fIircd\fP from an \fIrc\fP (such as \fI/etc/rc.local\fP) file.
-.TP
-.B \-q
-Using the -q option stops the server from doing DNS lookups on all the
-servers in your \fIircd.conf\fP file when it boots. This can take a lengthy
-amount of time if you have a large number of servers and they are not all
-close by.
-.TP
 .B \-h hostname
 Allows the user to manually set the server name at startup. The default
 name is hostname.domainname.
 .TP
-.B \-p portname
-Specifies the port where the daemon should start waiting for connections.
-This overrides the default which is given at compile time.
-.TP
-.B \-s
-Send debugging output to stderr and don't fork. Exteremely useful
-when IRCD runs and immediately exits.
+.B \-k klinefile
+Specifies the K: line file.
 .TP
 .SH
 If you plan to connect your \fIircd\fP server to an existing Irc-Network,
 you will need to alter your local IRC CONFIGURATION FILE (typically named
 "ircd.conf") so that it will accept and make connections to other \fIircd\fP
-servers.  This file contains the hostnames, Network Addresses, and sometimes
-passwords for connections to other ircds around the world.  Because 
+servers.  This file contains the hostnames, Network Addresses and pass-
+words for connections to other ircds around the world.  Because 
 description of the actual file format of the "ircs.conf" file is beyond the
 scope of this document, please refer to the file INSTALL in the IRC source
 files documentation directory.
@@ -143,3 +100,4 @@
 Jarkko Oikarinen, currently jto@tolsun.oulu.fi,
 manual page written by Jeff Trim, jtrim@orion.cair.du.edu,
 later modified by jto@tolsun.oulu.fi.
+again modified by smoli@www.blah.ch
diff -uNrd ircd-hybrid-6.0/doc/leaf.conf ircd-pi1.0a/doc/leaf.conf
--- ircd-hybrid-6.0/doc/leaf.conf	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/leaf.conf	Thu May 23 12:06:25 2002
@@ -0,0 +1,217 @@
+# $Id: leaf.conf,v 1.4 2002/05/23 16:06:25 shifty Exp $
+#
+# Pi-IRC leaf configuration file.
+#
+# If you want to run a hub, get doc/pi-hub.conf!!!
+#
+# M: set your server's name. Fields are, in order, host name (domain style),
+#  optional bind address, a text name, and unused.
+#
+# NOTE:  The "optional bind address" is an address used in binding to a
+# local address when we connect outbound.  For example, if your server machine
+# is myhost.example.com (192.168.1.5) and you want IRCD to connect to others
+# from irc.example.com (192.168.1.250), you'd put 192.168.1.250 in the
+# "optional bind address" field.  If left blank, UNIX will choose the primary
+# address of the interface closest to the destination.
+#
+# NOTE:  As of hybrid-6, the port field no longer binds a port by default.
+# It is an inoperative and obsolete field.
+#
+M:ircs.pleasedontmakemekillyou.com::Don't challenge me, bro!:
+# 
+# A: administrative information. This line should have three fields, which
+#    may contain any arbitrary text. It is printed by the /ADMIN command.
+#
+A:line1:line2:line3
+
+# allow 500 users, 360 sec ping frequency, max. 4 hosts per ip, 64k sendq
+#
+# if you want to have more than 1000 users you have to change HARD_FDLIMIT_
+# and INIT_MAXCLIENTS in config.h before compiling.
+Y:1:359:4:500:65536
+
+# allow 1 server, 90 sec ping frequency, 300 secs connect frequency, 4M sendq
+Y:2:90:300:1:4194304
+
+# allow 1 server, 90 sec ping frequency, 300 secs connect frequency, 4M sendq
+Y:3:90:300:1:4194304
+
+#
+# I: authorize clients to connect to your server. You can use domains,
+#    IP addresses, and asterisk wildcards. The second field can contain a
+#    password that the client must use in order to be allowed to connect.
+#    The optional fifth field may contain a connection class number.
+#
+I:NOMATCH::*@*::1
+
+#
+## additional prefix characters in I lines are defined
+##
+## from comstud
+##
+## 1) There are noticable differences in I: lines now.
+##   There are 4 special characters that you can stick in front
+##   of a hostname or ip# that do special things.
+##   These characers are:
+##   -  This will never put a ~ for a user not running identd
+##   +  This will force people matching this I: to require identd
+##   !  This means to only allow 1 connection per ip# in this I:
+##   $  (Not used in hybrid)
+##
+##  Examples:
+##
+## a) I:x::!*@*ppp*::class  will only allow X connections per ip# for people
+##     who have *ppp* in their hostname where X is given in the Y: line.
+##    If there is no ! and you have a limit in your Y: line, then it matches
+##      full user@host instead of just host.
+
+## b) I:x::-*@*.cris.com::class will never show a ~, even though they may
+##     not be running identd.  (This is equivilent to the old way of not
+##    specifying a @ in the I: line).
+
+## Additionally since ircd-hybrid-6
+## B/E/F lines were removed and replaced with 3 other special characters
+## in I lines
+## 
+## ^ This will exempt a user from K/G lines, limited protection from D lines
+## & User can run bots (old B line)
+## > This user is exempt from I line/server side connection limits
+##   (old F line)
+## _ This user is exempt from G lines
+##
+## A variant of amm's spoofing code was added
+## = Spoof this users IP, normally only used for opers
+##
+## < This user is exempt from idle restrictions if IDLE_CHECK is defined
+##
+
+## Examples
+## c) I:NOMATCH::^db@koruna.varner.com::3
+##    This user is exempt from k/g lines
+## d) I:NOMATCH::&jerdfelt@*mindspring.net::3
+##    This user can run a bot, and is also "e lined"
+## e) I:NOMATCH::>lusky@*vol.com::3
+##    This user is immune from I line limits
+## f) I:NOMATCH::^&>mpearce@*varner.com::3
+##    This user can run a bot, is exempt
+##    from client connect limits.
+## g) I:smurfers.are.lame::=dgalas@*somewhere.com::3
+##    Show this user as being dgalas@smurfers.are.lame
+##    an IP can be used instead as long as the name field does not begin 
+##    with an 'x'
+##    i.e. 
+##    I:192.168.0.0/24::x::3 #this is an IP I line
+##    I:192.168.0.0::db@*somesite.com::3 #this is a spoofed IP	
+
+I:pleasedontmakemekillyou.com::=*@client62-2-69-*.hispeed.ch::1
+
+#
+# O: authorize operators. Fields are, in order, host name the operator must
+#    be logged in from (wildcards allowed), operator's password, operator's
+#    nickname.
+## The 4th field is the port number used in c/n's, in ircd-hybrid
+## this field is used to contain oper flags for this oper
+## You may wish to constrain an oper from using global kill or unkline
+## for example.
+## The flags are:
+## K/k - allow/disallow kill and kline
+## O/o - allow/disallow global kill
+## R/r - allow/disallow remote squit/connect
+## U/u - allow/disallow unkline
+## G/g - allow/disallow gline
+## N/n - allow the use of +n , which should be restricted to tcm use only
+##     for privacy reasons. (+c probably belongs controlled here too but isn't)
+## H/h - allow the use of /rehash, default is H for O and o, add h to 
+##       disable an opers use of /rehash
+## D/d - allow the use of /die or /restart. Default is d for disallowing
+##       /die /restart 
+## E/e - allow to enforce channel mode/kick/invite/topic
+##
+## Default flags for opers are KORUGH
+## Default flags for local ops, KUH
+## These flags over-rule what the normal privs of an oper would be,
+## but they cannot allow a local oper to do global kills for example.
+##
+## The global kill of a global oper can be disabled by using o for
+## example, in the port field.
+##
+## This example allow this oper, to global kill, do remote squit/connect
+## unklines, glines, use umode +n, enforce and die.
+##
+O:pleasedontmakemekillyou.com:TrkvKsN9roxKo:smoln:KORUGHDE:1
+#
+
+# C:, N: set up connections to other servers.
+#
+# C: specifies a server that your server may connect to.
+# N: allows a remote server to connect to your own.
+#
+# The two lines are usually given in pairs.
+#
+# These lines may contain a password in the second field.  In fact, to
+# maintain proper security, *all* IRC server links must have passwords.
+#
+# If a C: line contains four fields (the fourth being a TCP port number)
+# IRC will actively try to connect to that server. You should have at least
+# one such line.
+#
+# If an N: line contains four fields, the fourth should contain a number that
+# specifies how many components of your own server's name to strip off the
+# front and be replaced with a *.  This is done to implement hostmasking.
+# For example, to make hayes.ims.alaska.edu present itself to the world as
+# *.alaska.edu, I would use a 2 (to strip off the first two parts).  If you
+# use this, be sure to tell the administrator of the servers you link to --
+# they must add your hostmasked name to their configuration file or you will
+# be unable to connect.
+#
+# The host part of C/N lines MUST contain a valid hostname or IP address
+# The host part in the C:line MUST be identical to the host part in the N:line
+# The name part of the C/N lines MUST match the associated H/L line name
+# 
+# The fifth field may contain a connection class number.
+#
+# main link (highest connection class)
+#
+C:ircs.zeropain.com:blah:ircs.zeropain.com:6799:3
+N:ircs.zeropain.com:blah:ircs.zeropain.com:SSL:3
+#
+# backup link
+#
+#C:hub.wservices.ch:-password-:hub.wservices.ch:6800:2
+#N:hub.wservices.ch:-password-:hub.wservices.ch:SSL:2
+#
+# P : port. The port line allows the server to listen on various ports for
+#     connections.  Fields in order: unused,
+#     address to bind to, SSL, port to listen on
+#
+# NOTE:  As of hybrid-6, you MUST have at least one P: line defining a port
+# to listen on, or the server won't do much.
+#
+P:::SSL:994
+P::::6665
+P::::6666
+P::::6667
+P::::6668
+P::::6669
+
+# Allow server to introduce other servers
+H:*:*:ircs.zeropain.com
+
+# SSL Line
+#
+# S:ciphers:passphrase:cvl:svl:
+#
+# ciphers = permitted cipher string
+#           (entries are separated
+#            by a '/' rather than ':')
+#
+# cvl = client verification level
+# svl = server verification level
+#
+# verification level:
+#   0 - ignore peer certificate
+#   1 - verify peer certificate if present
+#   2 - require valid peer certificate
+#   3 - verify peer with locally installed certificate
+#
+S:HIGH+RSA/MEDIUM+RSA/@STRENGTH:blah:1:2:
diff -uNrd ircd-hybrid-6.0/doc/memory.txt ircd-pi1.0a/doc/memory.txt
--- ircd-hybrid-6.0/doc/memory.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/memory.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,48 @@
+  On a stand alone server, make sure you #undef all of
+NO_CHANOPS_ON_SPLIT, NO_JOIN_ON_SPLIT, PRESERVE_CHANNEL_ON_SPLIT
+NO_JOIN_ON_SPLIT_SIMPLE in config.h Otherwise, you will have trouble
+with non opered clients gaining ops in new channels.
+
+  ircd-hybrid has been primarily geared for EFnet, where 40k clients
+is becoming the norm. But for smaller non EFnet nets, thats going
+to cost your server memory, because it will be expecting the large numbers
+of clients on EFnet that will never happen on a smaller net.
+
+  You can easily tune your hybrid to use less memory on startup
+by modifying the file "list.c" in src
+
+  These comments will be found in list.c
+
+/* Number of Link's to pre-allocate at a time 
+   for Efnet 1000 seems reasonable, 
+   for smaller nets who knows? -Dianora
+   */
+
+#define LINK_PREALLOCATE 1024
+
+/* Number of aClient structures to preallocate at a time
+   for Efnet 1024 is reasonable 
+   for smaller nets who knows? -Dianora
+   */
+
+/* This means you call MyMalloc 30 some odd times,
+   rather than 30k times -Dianora
+*/
+
+#define CLIENTS_PREALLOCATE 1024
+
+  I suggest you trim these numbers as needed, to fit your estimated
+needs. You could use 64 for each for example, on a server that 
+normally never saw more than 60 people on the entire network.
+Keeping it a multiple of 2 is advisable, but not absolutely
+necessary. You will just waste a tiny bit of memory in one of the
+bit maps.
+
+  Other things to reduce, to use less startup memory.
+(from flier@globecom.net) All of these are in config.h
+
+   - reduce NICKNAMEHISTORYLENGTH from 15000 to say 1000
+   - reduce MAXSENDQLENGTH from 5050000 to 500000
+   - reduce INITIAL_DBUFS from 1000 to 300
+
+  - Dianora
diff -uNrd ircd-hybrid-6.0/doc/mtrie.txt ircd-pi1.0a/doc/mtrie.txt
--- ircd-hybrid-6.0/doc/mtrie.txt	Thu Oct  5 23:00:53 2000
+++ ircd-pi1.0a/doc/mtrie.txt	Fri Nov  2 19:23:13 2001
@@ -1,4 +1,4 @@
-$Id: mtrie.txt,v 1.2 2000/10/06 03:00:53 lusky Exp $
+$Id: mtrie.txt,v 1.1.1.1 2001/11/03 00:23:13 shifty Exp $
 
 
 In hybrid-6 dich_conf has been removed.
diff -uNrd ircd-hybrid-6.0/doc/old/Authors ircd-pi1.0a/doc/old/Authors
--- ircd-hybrid-6.0/doc/old/Authors	Fri Mar 26 00:30:05 1999
+++ ircd-pi1.0a/doc/old/Authors	Wed Dec 31 19:00:00 1969
@@ -1,137 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, doc/AUTHORS
- *   Copyright (C) 1990
- *
- * AUTHORS FILE:
- *   This file attempts to remember all contributors to the IRC
- *   developement. Names can be only added this file, no name
- *   should never be removed. This file must be included into all
- *   distributions of IRC and derived works.
- *
- *   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.
- */
-
-IRC was conceived of and written by Jarkko Oikarinen <jto@tolsun.oulu.fi>.
-IRC was originally written in University of Oulu, Computing Center.
-Jan 1991 - IRC 2.6  jto@tolsun.oulu.fi
-	- Multiple Channels and protocol changes
-
-Contributions were made by a cast of dozens, including the following:
-
-Markku Jarvinen <mta@tut.fi>: Emacs-like editing facility for the client
-
-Kimmo Suominen <kim@kannel.lut.fi>: HP-UX port
-
-Jeff Trim <jtrim@orion.cair.du.edu>: enhancements and advice
-
-Vijay Subramaniam <vijay@lll-winken.llnl.gov>: advice and ruthless publicity
-
-Karl Kleinpaste <karl@cis.ohio-state.edu>: user's manual
-
-Greg Lindahl <gl8f@virginia.edu>: AUTOMATON code, the Wumpus GM automaton,
-myriad bug fixes
-
-Bill Wisner <wisner@hayes.fai.alaska.edu>: numerous bug fixes and code
-enhancements
-
-Tom Davis <conslt16@zeus.unl.edu> and Tim Russell <russell@zeus.unl.edu>:
-VMS modifications
-
-Markku Savela <msa@tel4.tel.vtt.fi>: advice, support, and being the
-incentive to do some of our *own* coding. :)
-
-Tom Hopkins <hoppie@buengf.bu.edu>: bug fixes, quarantine lines,
-consolidation of various patches.
-
-Christopher Davis <ckd@cs.bu.edu>: EFnet/Anet gateway coding,
-many automata ;), documentation fixing.
-
-Helen Rose <hrose@cs.bu.edu>: documentation updating, and fixing.
-
-Tom Hinds <rocker@bucsf.bu.edu>: emacs client updating.
-
-Tim Miller <cerebus@bu-pub.bu.edu>: various server and client-breaking
-features.
-
-Darren Reed <avalon@coombs.anu.edu.au>: various bug fixes and enhancements.
-Introduced nickname and channelname hash tables into the server.
-
-The version 2.2 release was coordinated by Mike Bolotski
-<mikeb@salmon.ee.ubc.ca>.
-
-The version 2.4 release was coordinated by Markku Savela and
-Chelsea Ashley Dyerman
-
-The version 2.5.2 release was coordinated by Christopher Davis, Helen Rose,
-and Tom Hopkins.
-
-The versions 2.6.2, 2.7 and 2.8 releases were coordinated by Darren Reed.
-
-Contributions for the 2.8 release from the following people:
-Matthew Green <phone@coombs.anu.edu.au>
-Chuck Kane <ckane@ece.uiuc.edu>
-Matt Lyle <matt@oc.com>
-Vesa Ruokonen <ruokonen@lut.fi>
-
-Markku Savela <Markku.Savela@vtt.fi> / April 1990
-Fixed various bugs in 2.2PL1 release server (2.2msa.4) and changed
-sockets to use non-blocking mode (2.2msa.9). [I have absolutely
-nothing to do with clients :-]
-
-Chelsea Ashley Dyerman <chelsea@earth.cchem.berkeley.edu> / April 1990
-Rewrote the Makefiles, restructuring of source tree. Added libIrcd.a to
-the Makefile macros, numerous reformatting of server text messages, and
-added mkversion.sh to keep track of compilation statistics. Numerous
-bug fixes and enhancements, and co-coordinator of the 2.4 release.
-
-jarlek@ifi.uio.no added mail functions to irc.
-
-Armin Gruner <gruner@informatik.tu-muenchen.de> / May, June 1990:
-* Patched KILL-line feature for ircd.conf, works now.
-  Enhancement:  Time intervals can be specified in passwd-field.
-  Result: KILL-Line is only active during these intervals
-* Patched PRIVMSG handling, now OPER can specify masks for sending
-  private messages, advantage: msg to all at a specified server or host.
-* Little tests on irc 2.5 alpha, fixed some little typos in client code.
-  Change: common/debug.c has been moved to ircd/s_debug.c, and a
-  irc/c_debug.c has been created, for the benefit that wrong server msg
-  are displayed if client does not recognize them. (strange, if a server
-  sends an 'unknown command', isn't it?)
-
-Tom Hopkins <hoppie@buengf.bu.edu> / September, October 1990:
-* Patched msa's K lines for servers (Q lines).
-* Consolidated several patches, including Stealth's logging patch. 
-* Fixed several minor bugs. 
-* Has done lots of other stuff that I can't seem to remember, but he
-  always works on code, so he has to have done alot more than three
-  lines worth. :) 
-
-Thanks go to those persons not mentioned here who have added their advice,
-opinions, and code to IRC.
-
-Various modifications, bugreports, cleanups and testing by:
-
-Hugo Calendar <hugo@ucscb.ucsc.edu>
-Bo Adler <adler@csvax.cs.caltech.edu>
-Michael Sandrof <ms5n+@andrew.cmu.edu>
-Jon Solomon <jsol@cs.bu.edu>
-Jan Peterson <jlp@hamblin.math.byu.edu>
-Nathan Glasser <nathan@brokaw.lcs.mit.edu>
-Helen Rose <hrose@eff.org>
-Mike Pelletier <stealth@caen.engin.umich.edu>
-Basalat Ali Raja <gwydion@tavi.rice.edu>
-Eric P. Scott <eps@toaster.sfsu.edu>
-Dan Goodwin <fornax@wpi.wpi.edu>
-Noah Friedman <friedman@ai.mit.edu>
diff -uNrd ircd-hybrid-6.0/doc/old/Etiquette ircd-pi1.0a/doc/old/Etiquette
--- ircd-hybrid-6.0/doc/old/Etiquette	Fri Mar 26 00:30:05 1999
+++ ircd-pi1.0a/doc/old/Etiquette	Wed Dec 31 19:00:00 1969
@@ -1,84 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, doc/etiquette
- *   Copyright (C) 1990, Lea Viljanen and Ari Husa
- *
- *   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.
- */
-
-HOW TO BEHAVE ON IRC
-
-Authors:      Lea Viljanen (LadyBug)  viljanen@kreeta.helsinki.fi
-              Ari Husa     (luru)     so-luru@tolsun.oulu.fi 
-
-
-1) Language
-
-   The most widely understood and spoken language on IRC is English. 
-However! As IRC is used in many different countries, English is by
-no means the only language. If you want to speak some other language
-than English (for example with your friends), go to a separate channel
-and set the topic (with /topic) to indicate that. For example
-   /topic Finnish only!
-would mean that this channel would be reserved for Finnish discussion.
-On the other hand, you should check the topic (with /list command) 
-before you move to a channel to see if there are any restrictions about 
-language.
-   On a channel not restricted by /topic, please speak a language
-everybody can understand. If you want to do otherwise, change channels
-and set the topic accordingly.
-
-
-2) Hello/Goodbye
-
-   It's not necessary to greet everybody on a channel personally.
-Usually one "Hello" or equivalent is enough. And don't expect everybody
-to greet you back. On a channel with 20 people that would mean one
-screenful of hellos. It's sensible not to greet, in order not to be rude
-to the rest of the channel. If you must say hello, do it with a private /msg.
-The same applies to goodbyes.
-
-
-3) Discussion
-
-   When you come to a new channel it's advised you to listen
-for a while to get an impression of what's discussed. Please feel free
-to join in, but do not try to force your topic into the discussion
-if that doesn't come naturally.
-
-
-4) {}|[]\
-
-   IRC has quite a lot of people from Scandinavian countries,
-the above characters are letters in their alphabet. This 
-has been explained on IRC about a thousand and one times, so
-read the following, do not ask it on IRC:
-
-   {     is an A with 2 dots over it
-   }     is an A with a small circle above it
-   |     is either an O with 2 dots over it or an O with a dash (/) through it
-   [, ], and \ are the preceding three letters in upper case.
-
-   There are a lot of people from Japan as well, who use Kanji characters
-which may look quite exotic as well. As I don't know Kanji I don't
-even try to explain any of the characters.
-
-5) ATTENTION!
-
-   Remember, people on IRC form their opinions about you only by 
-your actions, writings and comments on IRC. So think before you type.
-Do not "dump" to a channel or user (send large amounts of unwanted
-information). This is likely to get you /kicked off the channel or
-/killed off from irc. Dumping causes network 'burbs', connections going
-down because servers cannot handle the large amount of traffic any more.
diff -uNrd ircd-hybrid-6.0/doc/old/README ircd-pi1.0a/doc/old/README
--- ircd-hybrid-6.0/doc/old/README	Fri Mar 26 00:30:05 1999
+++ ircd-pi1.0a/doc/old/README	Wed Dec 31 19:00:00 1969
@@ -1,8 +0,0 @@
-This stuff is so ancient it's not even funny anymore.  Take it with
-a grain of salt when you read it. --JRL
-
-The Bill Wisner example.conf has been updated, I have also included
-Helen Roses example.conf as example.conf.trillian (taken from
-the CSR tree ) as it is superiour in some respects to Bill's version.
-Updated as well to reflect hybrid . --Dianora
-
diff -uNrd ircd-hybrid-6.0/doc/old/US-Admin/Networking ircd-pi1.0a/doc/old/US-Admin/Networking
--- ircd-hybrid-6.0/doc/old/US-Admin/Networking	Fri Mar 26 00:46:07 1999
+++ ircd-pi1.0a/doc/old/US-Admin/Networking	Wed Dec 31 19:00:00 1969
@@ -1,212 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, doc/NETWORKING
- *   Copyright (C) 1990, Helen Rose
- *
- *   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.
- */
-
-                                               Author: Helen Rose
-                                                       hrose@cs.bu.edu
-                                               Date: 10 Oct 1990
-
-*** Please read this before doing any connecting or writing to ask for
-connections. The information contained in this section is crucial to the
-way IRC is run.
-
-In August of 1990, IRC suffered a critical split in viewpoints of key
-people in the IRC heirarchy. The result was IRC split into two networks,
-EFnet (Eris Free network) and Anet (Anarchy network). This split continues
-today. There is some debate over whether IRC will ever reunite, however,
-neither side is willing to bend from their standpoint. 
-
-     Below is a paragraph from each side, listing their viewpoints on why their
-respective net is "better" than the other. Please read these, and decide
-for yourself which is the better network. Currently, there are about 95
-servers on EFnet (and the same number of users) and 15 servers on Anet (and
-about half the number of users). 
-
-Anet
-====
-joshua@coombs.anu.edu.au
-(DCLXVI == Josh Geller)
-   Arguments in favor of joining Anet include stabler links, ease of 
-connecting (just connect your server to eris.berkeley.edu; if you decide 
-later you wish to be on EFnet you merely have to add whatever patches are
-required and get a link from the appropriate EFnet server), no likelihood
-of regulation of numbers of servers (there has been some talk of limiting
-the number of servers on EFnet).
-
-EFnet
-*===*
-ckd@cs.bu.edu, hrose@cs.bu.edu
-(ckd = Christopher Davis, Trillian = Helen Rose)
-   Arguments in favor of joining EFnet are virtually limitless. From a
-redundant backbone plan (which assures everyone of getting a close,
-fast link and tries to keep traffic off of long haul networks) to the
-fact that the obvious security hole that exists with open-server servers
-does not exist. (Anyone running an open server allows any user with
-telnet access to crash the server's machine without too much work.)
-
-
----real networking document---
-Throughout this document every effort will be made to apply to *BOTH* ANet
-and EFnet. If this is not possible, EFnet will be referred to, considering
-it is the side where the majority is located.
-
-Anet has one network coordinator:richardt@legato.com. Mail to him for all
-correspondence. At this time, no backbone layouts have been published for
-Anet.
-
-EFnet is coordinated in several areas:
-
-ckd@cs.bu.edu and hrose@cs.bu.edu coordinate the US routing. They also
-coordinate all incoming connections to the US. If you are in the United
-States and need a link, please mail to "operlist-request@cs.bu.edu"
-supplying the information listed below.
-
-savela@tel.vtt.fi, irc@tolsun.oulu.fi, and d88-skl@nada.kth.se coordinate
-the NORDUnet connections. (msa, WiZ, and meLazy on irc, respectively)
-
-muts@fysak.fys.ruu.nl coordinates Dutch servers.
-
-stumpf@Informatik.TU-Muenchen.de and Gruner@Informatik.TU-Muenchen.de
-coordinate German servers. (Maex and Armin/Gonzo)
-
-phil@cnam.cnam.fr coordinates the one French IRC server, and any others
-that might want be started.
-
-avalon@coombs.anu.oz.au coordinates the Australian servers. 
-
-bowles@is.s.u-tokyo.ac.jp coordinates the Japanese servers. 
-
-==how to get an IRC connection==
-
-(1) If you are in the United States and on Anet, mail to
-    richardt@legato.com.
-
-(2) If you are in the United States and on EFnet:
-      a) find out if your system has /etc/ping (sometimes /usr/etc/ping)
-      and ping the following hosts-
-
-      server/machine name        IP Address     Geographical Location
-      bucsd.bu.edu               128.197.10.2   Boston, MA
-      irc.mit.edu                18.70.0.224    Cambridge, MA
-      poe.acc.virginia.edu       128.143.20.20  Charlottesville, VA
-      sindri.cs.cornell.edu      128.84.254.96  Ithaca, NY
-      polaris.ctr.columbia.edu   128.59.64.79   New York City, NY
-      fairhope.andrew.cmu.edu    128.2.11.213   Pittsburgh, PA
-      *.umich.edu                141.212.66.36  Ann Arbor, MI
-      h.ece.uiuc.edu             128.174.115.18 Urbana-Champaign, IL
-      minnie.cc.utexas.edu       128.83.135.13  Austin, TX
-      ucsu.colorado.edu          128.138.129.83 Boulder, CO
-      badger.ugcs.caltech.edu    131.215.128.29 Pasadena, CA
-      *.spies.com                130.143.3.3    Cupertino, CA
-      *.washington.edu           128.95.152.35  Seattle, WA
-
-(yes, this seems like alot, but the backbone structure is quite complex and
-redundant so when we have a network break, servers can pick up other
-servers within moments)
-
-     b) a simple ping hostname (or ping IP address) will suffice. Ping the
-     five geographically closest machines. Let the ping run for 100 packets.
-     This allows the network coordinators to best evaluate your position 
-     on the network and to give you a connection that is fastest. 
-     Note: when using the SunOS version of ping, use ping -s machinename;
-           "regular" SunOS ping is useless.
-
-    c) mail these results to operlist-request@cs.bu.edu requesting a link. 
-
-  (3) If you are in Europe and are requesting a link, mail to the
-      appropriate contact listed above, and they will instruct you on how to
-      secure a link for your server.
-
-These are the results of the typical /etc/ping command:
-
-(note that since bucsd.bu.edu runs SunOS, I used ping -s...)
-
-bucsd% /usr/etc/ping -s betwixt.cs.caltech.edu
-PING betwixt.cs.caltech.edu: 56 data bytes
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=0. time=169. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=1. time=190. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=2. time=200. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=3. time=170. ms
-[...]
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=18. time=180. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=19. time=220. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=20. time=170. ms
-64 bytes from betwixt.cs.caltech.edu (131.215.128.4): icmp_seq=21. time=200. ms
-^^            ^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^            ^^       ^^^^^^^
-Size of packet   hostname             IP address      packet number  trip time
-
-----betwixt.cs.caltech.edu PING Statistics----
-22 packets transmitted, 22 packets received, 0% packet loss
-round-trip (ms)  min/avg/max = 160/179/220
-
-When you send pings to operlist-request, please only send the results
-(the above three lines)--we *don't* need each packet's time.
-
-Guidelines:
-
-Avg Time        Connection is
-========        =============
-20-50 ms        Optimal
-50-80 ms        Excellent
-80-120 ms       Very Good
-120-180 ms      Average
-180-240 ms      Acceptable
-240-300 ms      Below Average
-300-400 ms      Bad
-400+    ms      Find a better link, if possible
-
-** *** WHERE TO FIND HELP!!! ***
-** 
-** If you have any other questions about connecting to an irc server, please
-** mail to operlist-request@cs.bu.edu.  If you have problems mailing there,
-** try mailing hrose@cs.bu.edu or ckd@cs.bu.edu. 
-** 
-** *** WHERE TO FIND HELP!!! ***
-
-If you are in need of further help, you may find it by using your IRC
-client, entering IRC, and sending a /wallops. Be sure to read the help
-information on /wallops before doing so. Please use /wallops for IRC
-questions or help only, and not for questions like "have you seen nicky
-I need to talk to him". /wallops with care, or you will be annoying
-every operator on IRC.
-
-Appendix
-========
-
-Open client servers
-Until such a time that your server becomes connected, you should use your
-irc client and connect to open client servers.  Some of these servers are-
-
-irc.mit.edu
-bucsd.bu.edu
-fairhope.andrew.cmu.edu
-hermes.tcad.ee.ufl.edu
-mingin.engin.umich.edu
-minnie.cc.utexas.edu
-badger.ugcs.caltech.edu
-ucsu.colorado.edu
-dharma.cpac.washington.edu
-
-fysak.fys.ruu.nl
-nic.funet.fi
-coombs.anu.edu.au
-
-Start up your irc client, and then type /help for help.
-Happy IRC'ing!
-
-
diff -uNrd ircd-hybrid-6.0/doc/old/US-Admin/Operators ircd-pi1.0a/doc/old/US-Admin/Operators
--- ircd-hybrid-6.0/doc/old/US-Admin/Operators	Fri Mar 26 00:46:07 1999
+++ ircd-pi1.0a/doc/old/US-Admin/Operators	Wed Dec 31 19:00:00 1969
@@ -1,253 +0,0 @@
-Internet Relay Chat Operator Etiquette Guide
-
-January, 1991
-
-Welcome! You've either been selected to be an IRC Operator or you have set
-up your server and thus have taken on the dual task of IRC Server
-Administrator and IRC Operator. Your future days will be filled with hours
-of fun chatting on IRC, and then wondering why everyone you talked to went
-away, because the links had apparently broken. 
-
-Linking:
-========
-
-You will be assigned links from the IRC Routing Coordinators. Please use
-these links and these links ONLY. The links have been designed to maximize
-efficiency and make delays in chatting minimal. You will be given two
-links, one to each regional backbone site. Connect to the primary site
-first and then to the secondary site. You should not need to connect to any
-other sites. You will be informed if this policy changes.
-
-Kills and Walls:
-===============
-
-/kill and /wall are special operator commands. You should use them with
-care, and only if absolutely needed. The format are as follows:
-/kill USERNAME comment. comment can be a phrase of almost any length
-(within reason) and should be used for specifying the reason of the kill.
-example: /kill Trillian She's a Ghost
-IRC Ghosts are created after a net split has occured and the net has yet to
-relink. 
-
-/wall PHRASE. This is used for an emergency command like the net is about
-to split into little pieces, and everyone should reconfigure their links
-as soon as possible. You will see a WALL when it happens, an operators
-nickname will appear with # signs around it.
-#Trillian# Server bucsd.bu.edu coming down for upgrade. Prepare to
-reconfigure links.
-
-/wallops PHRASE This is used to talk to ALL operators at once. It is not
-often warranted, but is useful. Often, when there is an important IRC
-situation that requires all the operators attention, /wallops is used. The
-form for wallops is a nickname with ! signs around it.
-!Trillian! Australia should leaf off of eris, not carry all the US traffic.
-
-
-/TRACE command
-/TRACE is useful to know what servers are connected to what. Sometimes
-/trace can be confusing, especially you are using it for the first time.
-Here is an example of a trace from bucsd.bu.edu to betwixt.cs.caltech.edu.
-
-/TRACE betwixt.cs.caltech.edu
-IRC log started Mon Aug 26 17:04
-*** Link eff.org<2.6.1a> ==> h.ece.uiuc.edu
--bucsd.bu.edu- *** Link bucsd.bu.edu<2.6.1a> ==> h.ece.uiuc.edu
--h.ece.uiuc.edu- *** Serv Class[3] h.ece.uiuc.edu ==> ucsu.colorado.EDU
--h.ece.uiuc.edu- *** Serv Class[2] h.ece.uiuc.edu ==> bucsd.bu.edu
--h.ece.uiuc.edu- *** Serv Class[10] h.ece.uiuc.edu ==> silver.ucs.indiana.edu
--h.ece.uiuc.edu- *** Serv Class[11] h.ece.uiuc.edu ==> monitor.ece.uiuc.edu[h.ece.uiuc.edu]
--h.ece.uiuc.edu- *** User Class[0] h.ece.uiuc.edu ==> Razorbone[uxa.cso.uiuc.edu]
--h.ece.uiuc.edu- *** Serv Class[10] h.ece.uiuc.edu ==> MHD54.MOORHEAD.MSUS.EDU[134.29.97.1]
--h.ece.uiuc.edu- *** Serv Class[4] h.ece.uiuc.edu ==> *.umich.edu[mingin.engin.umich.edu]
--h.ece.uiuc.edu- *** User Class[0] h.ece.uiuc.edu ==> BooServ[sunc4.cs.uiuc.edu]
--h.ece.uiuc.edu- *** Serv Class[10] h.ece.uiuc.edu ==> nic.stolaf.edu
--h.ece.uiuc.edu- *** Oper Class[0] h.ece.uiuc.edu ==> SodaPop[h.ece.uiuc.edu]
--h.ece.uiuc.edu- *** Serv Class[4] h.ece.uiuc.edu ==> oddjob.uchicago.edu
--h.ece.uiuc.edu- *** User Class[0] h.ece.uiuc.edu ==> Deviant[isca01.isca.uiowa.edu]
--h.ece.uiuc.edu- *** Serv Class[10] h.ece.uiuc.edu ==> *.uc.edu[hilbert.che.uc.edu]
--h.ece.uiuc.edu- *** Class    0 Entries linked: 4
--h.ece.uiuc.edu- *** Class   11 Entries linked: 1
--h.ece.uiuc.edu- *** Class   10 Entries linked: 4
--h.ece.uiuc.edu- *** Class    4 Entries linked: 2
--h.ece.uiuc.edu- *** Class    3 Entries linked: 1
--h.ece.uiuc.edu- *** Class    2 Entries linked: 1
-
-This shows that from eff.org (running version 2.6.1a to h.ece.uiuc.edu,
-routing goes through bucsd.bu.edu before reaching h.ece.uiuc.edu. 
-"h" is connected to ucsu.colorado.edu, silver.ucs.indiana.edu,
-monitor.ece.uiuc.edu (which resolves to [h.ece.uiuc.edu], hence the
-square brackets), mhd54.moorhead.msus.edu, *.umich.edu (which resolves
-to mingin.engin.umich.edu), nic.stolaf.edu, oddjob.uchicago.edu,
-*.uc.edu (which resolves to hilbert.che.uc.edu), and bucsd.bu.edu, which
-is known as its "uplink". It is quite normal for a server to have
-several "uplinks" if it is busy. An uplink is the link towards the top
-of the tree which carries alot of traffic. "h" also has several users on
-it, RazorBone, BooServ, and Deviant. SodaPop is also an active operator
-on h.ece.uiuc.edu. You can tell each host from what each person is
-logged into by looking just past their nickname. For example, Deviant is
-logged in from isca01.isca.uiowa.edu.
-
-/SQUIT server {comment}
-   /squit isolates a specified link from the next closest uplink server.
-This is usually used in conjunction with CONNECT (explained later) to
-reroute traffic. This will be described in detail in the section
-"routing", preceding CONNECT.
-   SQUIT can be used in one of two ways. It can be used on a local
-server, which would cause the server name specified to be unlinked
-relative to your path; or you can send a message to another server
-instructing it to issue an SQUIT to that server, in which case the
-break will be relative to the remote server.
-
-   Usage (and examples): 
-
-      /squit E
-
-     If the network looks like this initially (and you are on server A)
-
- 
-          A <---> B <---> C <---> D
-                          ^
-                          |
-                          v
-                  G <---> E <---> F <---> ... (rest of the net)
-                          
-
-    Then after issuing the previous /squit the network would look like this:
-
-          A <---> B <---> C <---> D
-                          
-                          
-                  G <---> E <---> F <---> ...
-
-
-    /squit E {comment}
-
-	It usually helps to give a reason why you are sending a
-	SQUIT for a server. This can be accomplished by sending
-	the command "/squit server This link is making the US route
-	through Finland". The SQUIT will then be sent out, and the 
-	server sending the squit will WALLOP sending the comment
-	so all operators can see it. 
-
-/CONNECT server {portnum server2}
-   /connect is used to establish a link between two servers. These
-connections must be authorized by each server's ircd.conf file, but
-any operator can issue a CONNECT between authorized servers. This
-command is most often used in conjunction with SQUIT to reroute
-traffic. 
-   If only one argument is given, this command causes the server you
-are on to attempt to connect to the server specified. For example,
-"/connect B" (in the previous example) would cause your server (A) to
-connect to B. 
-   Suppose you wanted to reconnect server F to server E? You cannot
-contact server F since it is no longer part of your network. However,
-you can tell server E to connect to it. A remote CONNECT can be issued
-to server E. 
-
-   Examples (assume you are on server A):
-
-   /connect B
-
-   If the network initially looks like this:
-
-         A      B <---> ... (rest of network)
-
-   Then afterwards (if the connection succeeds) the network will look
-   like this:
-
-        A <---> B <---> ... 
-
-
-   In the example where you wanted to reconnect server E to F, the
-   following syntax would be appropriate (note: we are assuming that
-   F's irc socket port is 6667, which is the default)
-
-   /connect F 6667 E
-
-   If the network initially looks like this:
-
-         A <---> B <---> C <---> D
-                         ^
-                         |
-                         v
-                 G <---> E      F <---> ... 
-
-   Then after your CONNECT request the network topology will look like this:
-
-         A <---> B <---> C <---> D
-                         ^
-                         |
-                         v
-                 G <---> E <---> F <---> ... 
-
-    Be careful when connecting servers that you know which command to
-    use! If you simply issued "/connect F" from your server, the
-    network would look like this:
-
-
-    ... <---> F <--->  A <---> B <---> C <---> D
-                                       ^
-                                       |
-                                       v
-                               G <---> E 
-
-    which for various reasons (discussed below) might be very
-    undesirable. 
-
-Routing
-=======
-
-   When and how should you do rerouting? This depends on where your
-server is topologically located and whether you route traffic. If you
-are a leaf node (i.e. only connect to one server at a time) then
-chances are you won't need to do any routing at all.  Your ircd.conf
-file should be written to connect to the best possible servers first
-before trying alternates. At the most, you may decide to squit an
-alternate server and connect to your primary if/when it goes back up.
-This only involves local squits, however.
-
-   If you are operating a backbone site, you may find yourself
-rerouting things quite often. If the EFnet servers (see the file
-doc/networking) badger.ugcs.caltech.edu (Pasadena, CA),
-irc.mit.edu (Boston, MA), minnie.cc.utexas.edu (Austin, TX) and
-ucsu.colorado.edu (Boulder, CO) were routing traffic in the following way:
-
-    ... <---> minnie <---> badger <---> bucsd <---> ucsu <---> ...
-
-It would make sense to either squit ucsu and reconnect it to minnie,
-or disconnect minnie from badger and connect to ucsu, because
-topologically (and geographically) ucsu and minnie are rather close. 
-There are occasions when US traffic for some reasons winds up being
-routed through Australia. This is another case where traffic should
-definitely be rerouted. However, there are sometimes occasions when
-routing is going through "backdoor" methods. If you see something
-totally outrageous (like the east coast and the west coast being
-connected by eff.org) please /WALLOPS and ask before you send any
-squits, because chances are, it's like that for a reason. 
-
-   Of course, any operator can remotely squit or connect servers, so
-if you see a problem and you're sure you know how to fix it, it's a
-good idea to do so. If the operator of a server which is is being
-routed poorly is online, it's probably best to contact him/her first,
-though.
-
-   Chances are that hub operators will be more familiar with the
-general topology of the network and which servers connect to which
-(which is why most of the manual routing is left to them), so if you
-have any problems, talk to the other operators via /wallops. That's
-what it's there for!
-   Also, be aware that servers will notify all the operators online of
-remote SQUITs and CONNECTs via WALLOPS.
-
-Please let us know if there should be any additions to this guide. Again,
-this is not MANDATORY, this is just a GUIDE. Please conduct yourself as 
-an IRC Operator would...you are looked upon for assistance, both emotional
-and mental. 
-
-Helen Rose			Christopher Davis
-<hrose@cs.bu.edu>		<ckd@cs.bu.edu>
-
-Noah Friedman
-<friedman@ai.mit.edu>
-
-January, 1991
diff -uNrd ircd-hybrid-6.0/doc/old/US-Admin/README ircd-pi1.0a/doc/old/US-Admin/README
--- ircd-hybrid-6.0/doc/old/US-Admin/README	Fri Mar 26 00:46:07 1999
+++ ircd-pi1.0a/doc/old/US-Admin/README	Wed Dec 31 19:00:00 1969
@@ -1,3 +0,0 @@
-This stuff is so ancient it's not even funny anymore.  Take it with
-a grain of salt if you bother to read it.
-
diff -uNrd ircd-hybrid-6.0/doc/opers.txt ircd-pi1.0a/doc/opers.txt
--- ircd-hybrid-6.0/doc/opers.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/opers.txt	Sun May  5 00:07:36 2002
@@ -0,0 +1,264 @@
+This file outlines the features that ircd-hybrid has for IRC Operators.
+$Id: opers.txt,v 1.5 2002/05/05 04:07:36 smoli Exp $
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+Usermodes: (* designates that the umode is oper only)
+
+     USERMODE     DESCRIPTION
+-----------------------------------------------------------------
+         +O     - Designates this client is a local IRC Operator.
+                  Use the /oper command to attain this.
+         +o     - Designates this client is a global IRC Operator.
+                  Use the /oper command to attain this.
+         +i     - Designates this client 'invisible'.
+         +w     - Can see server wallops.
+       * +z     - Can see oper wallops.
+         +s     - Can see generic server messages and oper kills.
+       * +c     - Can see client connections and exits.
+       * +r     - Can see 'rejected' client notices.
+         +k     - Can see server kill messages.
+       * +f     - Can see 'I-line is full' notices.
+       * +y     - Can see stats/links/admin requests to name a few.
+       * +d     - Can see server debug messages.
+       * +n     - Can see client nick changes.
+       * +b     - Can see possible bot warnings.
+       * +x     - Can see new server introduction messages.
+       * +e     - Can enforce everything
+         +S     - SSL encrypted connection
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+Oper Commands: (+ indicates that /quote must be used with ircII)
+
+COMMAND         - USAGE and DESCRIPTION
+-------------------------------------------------------------------
+  SQUIT         - SQUIT <server> [reason]
+                  Splits <server> away from your side of the net with
+                  [reason].
+
+  KILL          - KILL <nick> <reason>
+                  Disconnects user <nick> from the IRC server he/she
+                  is connected to with reason <reason>.
+                  Local Opers can only kill clients on his/her server.
+                  Global Opers can kill clients on any server on the
+                  IRC network.
+
+  STATS         - STATS <letter> [server|nick]
+                  Queries server [server] (or your own server if no
+                  server parameter is given) for info corresponing to
+                  <letter>.
+                  LETTER (* = Oper only.)
+                  ------ (^ = Can be configured to be oper only.)
+                    c - Shows C/N lines
+                  ^ b - Shows B lines (Obsolete)
+                  ^ d - Shows D lines
+                  ^ e - Shows E lines (Obsolete)
+                  ^ f - Shows F lines (Obsolete)
+                    g - Shows G lines
+                    h - Shows H/L lines
+                  ^ i - Shows I lines
+                    K - Shows K lines (or matched klines)
+                    k - Shows temporary K lines (or matched temp klines)
+                    L - Shows IP and generic info about [nick]
+                    l - Shows hostname and generic info about [nick]
+                    m - Shows commands and their usage
+                  ^ o - Shows O/o lines
+                  ^ P - Shows configured ports
+                    p - Shows opers connected and their idle times (disabled
+                              if LTRACE option is enabled - see below)
+                  * q - Shows quaranteened nicks
+                    r - Shows resource usage by ircd (only in DEBUGMODE)
+                  * s - Shows the server cache
+                  * t - Shows generic server stats
+                    U - Shows U lines
+                    u - Shows server uptime
+                    v - Shows connected servers and their idle times
+                    x - Shows X lines
+                  * y - Shows Y lines
+                  * z - Shows memory stats
+                    ? - Shows connected servers and sendq info about them
+
+  CONNECT       - CONNECT <server_A> [port] [server_B]
+                  When [server_B] is used, CONNECT asks [server_B] to
+                  connect to <server_A>.  Global Opers only.
+
+                  When [server_B] is not used, CONNECT trys to connect
+                  your server to <server_A>.  Local and Global Opers.
+
+                  When [port] is used, the connection will be attempted
+                  to [port].
+                  When [port] is not used, 6667 is used as a default.
+
++ WALLOPS       - WALLOPS :<message>
+                  Sends a WALLOPS message of <message> to all opers
+                  who are umode +w and +z (see above)
+
+                  Server sent wallops go to all users who are umode
+                  +w, oper or not.
+
++ OPERWALL      - OPERWALL :<message>
+                  Sends an OPERWALL message of <message> to all
+                  opers who are umode +w and +z
+
++ LOCOPS        - LOCOPS :<message>
+                  Sends an LOCOPS message of <message. o to all
+                  opers on local server who are umode +w and +z
+
++ LWALLOPS      - LWALLOPS :<message>
+                  -- If compiled with LWALLOPS --
+                  Same as LOCOPS (see above)
+
+  TRACE         - TRACE [server|nick]
+                  TRACE shows client info about [server|nick] or about
+                  the server you are on if no [server|nick] is given.
+
+                  All users that use TRACE can see the path to
+                  [server|nick] if given and all servers and opers
+                  connected, as well as the connection class they
+                  fall into.
+
+                  Opers can see all clients connected to a server
+                  with TRACE as well as the connection class they
+                  fall into.
+
++ LTRACE        - LTRACE [server|nick]
+                  -- If compiled with LTRACE --
+                  Displays only Oper, Serv, Link, and Class reports even if
+                  the O-line is active.  Useful for just showing pertinent
+                  info of a specific server.  Note however that if the
+                  target server is not running this option then you will
+                  still receive a normal trace output.
+
+  REHASH        - REHASH [option]
+                  When no [option] is given, ircd will re-read the
+                  ircd.conf file.
+
+                  [option] can be one of the following:
+                    DNS     - Re-read the /etc/resolv.conf file
+                    IP      - Reloads the IP hash for the new and
+                              improved ACKPATCH.  Should never need 
+                              to be used.
+                    TKLINES - Clears temporary klines
+                    GLINES  - Clears G lines
+                    GC      - Performs garbage collecting of excess
+                              memory.
+                    MOTD    - Re-reads MOTD file
+                    OMOTD   - Re-reads Oper MOTD file
+                    HELP    - Re-reads this HELP file
+                    DLINES  - Re-hashes D-lines
+
+  RESTART       - RESTART
+                  Restarts the IRC server.
+
+  CLOSE         - CLOSE
+                  Close any connections from clients who have not fully
+                  registered yet.
+
+  DIE           - DIE server.name [reason]
+                  Terminates the IRC server with optional reason 
+                  [reason]
+
++ HASH          - HASH
+                  Shows some stats about ircd's internal hashes.
+
++ DNS           - DNS
+                  Shows some stats about ircd's asynchronous resolving
+                  code
+
++ KLINE         - KLINE <nick|user@host> :[reason]
+                  Adds a KLINE to the ircd.conf or klines.conf file which
+                  will ban the specified user from using that server.
+                  The banned client will receive a message saying he/she
+                  is banned with reason [reason]
+
+                  KLINE user@ip.ip.ip.ip :[reason]
+                  will kline the user at the unresolved ip.
+                  ip.ip.ip.ip can be in CIDR form i.e. 192.168.0.0/24
+                  or 192.168.0.* (which is converted to CIDR form internally)
+
+                  For a temporary KLINE, length of kline is given in
+                  minutes as the first parameter i.e.
+                  KLINE 10 <nick|user@host> :cool off for 10 minutes
+
++ UNKLINE       - UNKLINE <user@host>
+                  Will attempt to unkline the given <user@host>
+                  Will unkline a temporary kline.
+
++ DLINE         - DLINE <nick|ip> :[reason]
+                  Adds a DLINE to the ircd.conf or klines.conf file
+                  which will deny any connections from the IP address
+                  of the banned client.  The banned client will receive
+                  a message saying he/she is banned with reason [reason]
+
+                  In order to use <nick> rather than <ip>, <nick> must
+                  be on your server.
+
++ HTM           - HTM [option]
+                  When no [option] is given, HTM shows the current 
+                  High Traffic Mode rate and whether HTM is on or off.
+
+                  [option] can be one of the following:
+                    ON        - Forces High Traffic Mode to be on.  With
+                                this on, ircd is more efficient in
+                                reading server-to-server traffic and
+                                oper traffic, but will be less efficient
+                                than normal with normal client traffic.
+                    OFF       - Forces High Traffic Mode to be off.
+                                (see above)
+                    TO <rate> - Sets the High Traffic Mode rate to
+                                <rate>.  Ircd will automatically go
+                                into High Traffic Mode when <rate>
+                                is reached, and will automatically turn
+                                it off when things calm down.
+                    QUIET     - When set, ircd will not notify opers
+                                when it goes into and out of High
+                                Traffic Mode.
+                    NOISY     - When set, ircd will notify opers
+                                when it goes into and out of High
+                                Traffic Mode.
++ SET           - SET <option> <value>
+                  <option> can be one of the following:
+                    LOG       - Sets the Logging level for what is logged
+                                to ircd.log and syslog.
+                    MAX       - Sets the number of max connections
+                                to <value>.  (This number cannot exceed
+                                HARD_FDLIMIT in config.h)
+
+                    -- The following three are if compiled with FLUD --
+                     FLUDNUM   - Sets the number of flud messages to 
+                                 trip flud alarm to <value>
+                     FLUDTIME  - Sets the number of seconds in which 
+                                  FLUDNUM msgs must occur to <value>
+                     FLUDBLOCK - Sets the number of seconds to block 
+                                 fluds to <value>
+
+                    -- The following is if compiled with NO_CHANOPS_ON_SPLIT
+                       or NO_JOIN_ON_SPLIT or PRESERVE_CHANNEL_ON_SPLIT
+                     SPLITDELAY - Sets how long after the connect burst
+                                  starts before ops can be hacked on new
+                                  channels. 5(minutes) is usually plenty.
+                                  Disable using 0.
+
+                     SMALLNET   - Below this number of servers present
+                                  means special split handling is now on.
+
+                     -- The following is if compiled with ANTI_SPAMBOT
+                      SPAMNUM   - Sets how many join/parts to channels
+                                  constitutes a possible spambot.
+                      SPAMTIME  - Below this time on a channel
+                                  counts as a join/part as above.
+
++ GLINE         - GLINE <user@host> :[reason]
+                   -- if compiled with GLINE --
+                   Attempts to add a global IRC-network wide ban on
+                   <user@host> for the reason [reason].
+
+                   It takes three different opers on three different 
+                   servers to do the same GLINE within a short interval,
+                   to have a GLINE triggered for a compiled time of hours.
+
++ TESTLINE       - TESTLINE <user@host>|ip
+                   -- Looks up given user@host or user@ip 
+                   returns info on any found I line or K line for that user,
+                   or D-line on ip.
diff -uNrd ircd-hybrid-6.0/doc/rfc2811.txt ircd-pi1.0a/doc/rfc2811.txt
--- ircd-hybrid-6.0/doc/rfc2811.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/rfc2811.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,1067 @@
+
+
+
+
+
+
+Network Working Group                                            C. Kalt
+Request for Comments: 2811                                    April 2000
+Updates: 1459
+Category: Informational
+
+
+                Internet Relay Chat: Channel Management
+
+Status of this Memo
+
+   This memo provides information for the Internet community.  It does
+   not specify an Internet standard of any kind.  Distribution of this
+   memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+Abstract
+
+   One of the most notable characteristics of the IRC (Internet Relay
+   Chat) protocol is to allow for users to be grouped in forums, called
+   channels, providing a mean for multiple users to communicate
+   together.
+
+   There was originally a unique type of channels, but with the years,
+   new types appeared either as a response to a need, or for
+   experimental purposes.
+
+   This document specifies how channels, their characteristics and
+   properties are managed by IRC servers.
+
+Table of Contents
+
+   1.  Introduction ...............................................   2
+   2.  Channel Characteristics ....................................   3
+      2.1  Namespace ..............................................   3
+      2.2  Channel Scope ..........................................   3
+      2.3  Channel Properties .....................................   4
+      2.4  Privileged Channel Members .............................   4
+         2.4.1  Channel Operators .................................   5
+         2.4.2  Channel Creator ...................................   5
+   3.  Channel lifetime ...........................................   5
+      3.1  Standard channels ......................................   5
+      3.2  Safe Channels ..........................................   6
+   4.  Channel Modes ..............................................   7
+      4.1  Member Status ..........................................   7
+         4.1.1  "Channel Creator" Status ..........................   7
+
+
+
+Kalt                         Informational                      [Page 1]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+         4.1.2  Channel Operator Status ...........................   8
+         4.1.3  Voice Privilege ...................................   8
+      4.2  Channel Flags ..........................................   8
+         4.2.1  Anonymous Flag ....................................   8
+         4.2.2  Invite Only Flag ..................................   8
+         4.2.3  Moderated Channel Flag ............................   9
+         4.2.4  No Messages To Channel From Clients On The Outside    9
+         4.2.5  Quiet Channel .....................................   9
+         4.2.6  Private and Secret Channels .......................   9
+         4.2.7  Server Reop Flag ..................................  10
+         4.2.8  Topic .............................................  10
+         4.2.9  User Limit ........................................  10
+         4.2.10  Channel Key ......................................  10
+      4.3  Channel Access Control .................................  10
+         4.3.1  Channel Ban and Exception .........................  11
+         4.3.2  Channel Invitation ................................  11
+   5.  Current Implementations ....................................  11
+      5.1  Tracking Recently Used Channels ........................  11
+      5.2  Safe Channels ..........................................  12
+         5.2.1  Channel Identifier ................................  12
+         5.2.2  Channel Delay .....................................  12
+         5.2.3  Abuse Window ......................................  13
+         5.2.4  Preserving Sanity In The Name Space ...............  13
+         5.2.5  Server Reop Mechanism .............................  13
+   6.  Current problems ...........................................  14
+      6.1  Labels .................................................  14
+         6.1.1  Channel Delay .....................................  14
+         6.1.2  Safe Channels .....................................  15
+      6.2  Mode Propagation Delays ................................  15
+      6.3  Collisions And Channel Modes ...........................  15
+      6.4  Resource Exhaustion ....................................  16
+   7.  Security Considerations ....................................  16
+      7.1  Access Control .........................................  16
+      7.2  Channel Privacy ........................................  16
+      7.3 Anonymity ...............................................  17
+   8.  Current support and availability ...........................  17
+   9.  Acknowledgements ...........................................  17
+   10. References ................................................   18
+   11. Author's Address ..........................................   18
+   12. Full Copyright Statement ...................................  19
+
+1. Introduction
+
+   This document defines in detail on how channels are managed by the
+   IRC servers and will be mostly useful to people working on
+   implementing an IRC server.
+
+
+
+
+
+Kalt                         Informational                      [Page 2]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   While the concepts defined here are an important part of IRC, they
+   remain non essential for implementing clients.  While the trend seems
+   to be towards more and more complex and "intelligent" clients which
+   are able to take advantage of knowing the internal workings of
+   channels to provide the users with a more friendly interface, simple
+   clients can be implemented without reading this document.
+
+   Many of the concepts defined here were designed with the IRC
+   architecture [IRC-ARCH] in mind and mostly make sense in this
+   context.  However, many others could be applied to other
+   architectures in order to provide forums for a conferencing system.
+
+   Finally, it is to be noted that IRC users may find some of the
+   following sections of interest, in particular sections 2 (Channel
+   Characteristics) and 4 (Channel Modes).
+
+2. Channel Characteristics
+
+   A channel is a named group of one or more users which will all
+   receive messages addressed to that channel.  A channel is
+   characterized by its name, properties and current members.
+
+2.1 Namespace
+
+   Channels names are strings (beginning with a '&', '#', '+' or '!'
+   character) of length up to fifty (50) characters.  Channel names are
+   case insensitive.
+
+   Apart from the the requirement that the first character being either
+   '&', '#', '+' or '!' (hereafter called "channel prefix"). The only
+   restriction on a channel name is that it SHALL NOT contain any spaces
+   (' '), a control G (^G or ASCII 7), a comma (',' which is used as a
+   list item separator by the protocol).  Also, a colon (':') is used as
+   a delimiter for the channel mask.  The exact syntax of a channel name
+   is defined in "IRC Server Protocol" [IRC-SERVER].
+
+   The use of different prefixes effectively creates four (4) distinct
+   namespaces for channel names.  This is important because of the
+   protocol limitations regarding namespaces (in general).  See section
+   6.1 (Labels) for more details on these limitations.
+
+2.2 Channel Scope
+
+   A channel entity is known by one or more servers on the IRC network.
+   A user can only become member of a channel known by the server to
+   which the user is directly connected.  The list of servers which know
+
+
+
+
+
+Kalt                         Informational                      [Page 3]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   of the existence of a particular channel MUST be a contiguous part of
+   the IRC network, in order for the messages addressed to the channel
+   to be sent to all the channel members.
+
+   Channels with '&' as prefix are local to the server where they are
+   created.
+
+   Other channels are known to one (1) or more servers that are
+   connected to the network, depending on the channel mask:
+
+      If there is no channel mask, then the channel is known to all
+      the servers.
+
+      If there is a channel mask, then the channel MUST only be known
+      to servers which has a local user on the channel, and to its
+      neighbours if the mask matches both the local and neighbouring
+      server names.  Since other servers have absolutely no knowledge of
+      the existence of such a channel, the area formed by the servers
+      having a name matching the mask has to be contiguous for the
+      channel to be known by all these servers.  Channel masks are best
+      used in conjunction with server hostmasking [IRC-SERVER].
+
+2.3 Channel Properties
+
+   Each channel has its own properties, which are defined by channel
+   modes.  Channel modes can be manipulated by the channel members.  The
+   modes affect the way servers manage the channels.
+
+   Channels with '+' as prefix do not support channel modes.  This means
+   that all the modes are unset, with the exception of the 't' channel
+   flag which is set.
+
+2.4 Privileged Channel Members
+
+   In order for the channel members to keep some control over a channel,
+   and some kind of sanity, some channel members are privileged.  Only
+   these members are allowed to perform the following actions on the
+   channel:
+
+        INVITE  - Invite a client to an invite-only channel (mode +i)
+        KICK    - Eject a client from the channel
+        MODE    - Change the channel's mode, as well as
+                  members' privileges
+        PRIVMSG - Sending messages to the channel (mode +n, +m, +v)
+        TOPIC   - Change the channel topic in a mode +t channel
+
+
+
+
+
+
+Kalt                         Informational                      [Page 4]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+2.4.1 Channel Operators
+
+   The channel operators (also referred to as a "chop" or "chanop") on a
+   given channel are considered to 'own' that channel.  Ownership of a
+   channel is shared among channel operators.
+
+   Channel operators are identified by the '@' symbol next to their
+   nickname whenever it is associated with a channel (i.e., replies to
+   the NAMES, WHO and WHOIS commands).
+
+   Since channels starting with the character '+' as prefix do not
+   support channel modes, no member can therefore have the status of
+   channel operator.
+
+2.4.2 Channel Creator
+
+   A user who creates a channel with the character '!' as prefix is
+   identified as the "channel creator".  Upon creation of the channel,
+   this user is also given channel operator status.
+
+   In recognition of this status, the channel creators are endowed with
+   the ability to toggle certain modes of the channel which channel
+   operators may not manipulate.
+
+   A "channel creator" can be distinguished from a channel operator by
+   issuing the proper MODE command.  See the "IRC Client Protocol"
+   [IRC-CLIENT] for more information on this topic.
+
+3. Channel lifetime
+
+   In regard to the lifetime of a channel, there are typically two
+   groups of channels: standard channels which prefix is either '&', '#'
+   or '+', and "safe channels" which prefix is '!'.
+
+3.1 Standard channels
+
+   These channels are created implicitly when the first user joins it,
+   and cease to exist when the last user leaves it.  While the channel
+   exists, any client can reference the channel using the name of the
+   channel.
+
+   The user creating a channel automatically becomes channel operator
+   with the notable exception of channels which name is prefixed by the
+   character '+', see section 4 (Channel modes).  See section 2.4.1
+   (Channel Operators) for more details on this title.
+
+
+
+
+
+
+Kalt                         Informational                      [Page 5]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   In order to avoid the creation of duplicate channels (typically when
+   the IRC network becomes disjoint because of a split between two
+   servers), channel names SHOULD NOT be allowed to be reused by a user
+   if a channel operator (See Section 2.4.1 (Channel Operators)) has
+   recently left the channel because of a network split.  If this
+   happens, the channel name is temporarily unavailable.  The duration
+   while a channel remains unavailable should be tuned on a per IRC
+   network basis.  It is important to note that this prevents local
+   users from creating a channel using the same name, but does not
+   prevent the channel to be recreated by a remote user. The latter
+   typically happens when the IRC network rejoins.  Obviously, this
+   mechanism only makes sense for channels which name begins with the
+   character '#', but MAY be used for channels which name begins with
+   the character '+'.  This mechanism is commonly known as "Channel
+   Delay".
+
+3.2 Safe Channels
+
+   Unlike other channels, "safe channels" are not implicitly created.  A
+   user wishing to create such a channel MUST request the creation by
+   sending a special JOIN command to the server in which the channel
+   identifier (then unknown) is replaced by the character '!'.  The
+   creation process for this type of channel is strictly controlled.
+   The user only chooses part of the channel name (known as the channel
+   "short name"), the server automatically prepends the user provided
+   name with a channel identifier consisting of five (5) characters.
+   The channel name resulting from the combination of these two elements
+   is unique, making the channel safe from abuses based on network
+   splits.
+
+   The user who creates such a channel automatically becomes "channel
+   creator".  See section 2.4.2 (Channel Creator) for more details on
+   this title.
+
+   A server MUST NOT allow the creation of a new channel if another
+   channel with the same short name exists; or if another channel with
+   the same short name existed recently AND any of its member(s) left
+   because of a network split.  Such channel ceases to exist after last
+   user leaves AND no other member recently left the channel because of
+   a network split.
+
+   Unlike the mechanism described in section 5.2.2 (Channel Delay), in
+   this case, channel names do not become unavailable: these channels
+   may continue to exist after the last user left.  Only the user
+   creating the channel becomes "channel creator", users joining an
+   existing empty channel do not automatically become "channel creator"
+   nor "channel operator".
+
+
+
+
+Kalt                         Informational                      [Page 6]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   To ensure the uniqueness of the channel names, the channel identifier
+   created by the server MUST follow specific rules.  For more details
+   on this, see section 5.2.1 (Channel Identifier).
+
+4. Channel Modes
+
+   The various modes available for channels are as follows:
+
+        O - give "channel creator" status;
+        o - give/take channel operator privilege;
+        v - give/take the voice privilege;
+
+        a - toggle the anonymous channel flag;
+        i - toggle the invite-only channel flag;
+        m - toggle the moderated channel;
+        n - toggle the no messages to channel from clients on the
+            outside;
+        q - toggle the quiet channel flag;
+        p - toggle the private channel flag;
+        s - toggle the secret channel flag;
+        r - toggle the server reop channel flag;
+        t - toggle the topic settable by channel operator only flag;
+
+        k - set/remove the channel key (password);
+        l - set/remove the user limit to channel;
+
+        b - set/remove ban mask to keep users out;
+        e - set/remove an exception mask to override a ban mask;
+        I - set/remove an invitation mask to automatically override
+            the invite-only flag;
+
+   Unless mentioned otherwise below, all these modes can be manipulated
+   by "channel operators" by using the MODE command defined in "IRC
+   Client Protocol" [IRC-CLIENT].
+
+4.1 Member Status
+
+   The modes in this category take a channel member nickname as argument
+   and affect the privileges given to this user.
+
+4.1.1 "Channel Creator" Status
+
+   The mode 'O' is only used in conjunction with "safe channels" and
+   SHALL NOT be manipulated by users.  Servers use it to give the user
+   creating the channel the status of "channel creator".
+
+
+
+
+
+
+Kalt                         Informational                      [Page 7]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+4.1.2 Channel Operator Status
+
+   The mode 'o' is used to toggle the operator status of a channel
+   member.
+
+4.1.3 Voice Privilege
+
+   The mode 'v' is used to give and take voice privilege to/from a
+   channel member.  Users with this privilege can talk on moderated
+   channels.  (See section 4.2.3 (Moderated Channel Flag).
+
+4.2 Channel Flags
+
+   The modes in this category are used to define properties which
+   affects how channels operate.
+
+4.2.1 Anonymous Flag
+
+   The channel flag 'a' defines an anonymous channel.  This means that
+   when a message sent to the channel is sent by the server to users,
+   and the origin is a user, then it MUST be masked.  To mask the
+   message, the origin is changed to "anonymous!anonymous@anonymous."
+   (e.g., a user with the nickname "anonymous", the username "anonymous"
+   and from a host called "anonymous.").  Because of this, servers MUST
+   forbid users from using the nickname "anonymous".  Servers MUST also
+   NOT send QUIT messages for users leaving such channels to the other
+   channel members but generate a PART message instead.
+
+   On channels with the character '&' as prefix, this flag MAY be
+   toggled by channel operators, but on channels with the character '!'
+   as prefix, this flag can be set (but SHALL NOT be unset) by the
+   "channel creator" only.  This flag MUST NOT be made available on
+   other types of channels.
+
+   Replies to the WHOIS, WHO and NAMES commands MUST NOT reveal the
+   presence of other users on channels for which the anonymous flag is
+   set.
+
+4.2.2 Invite Only Flag
+
+   When the channel flag 'i' is set, new members are only accepted if
+   their mask matches Invite-list (See section 4.3.2) or they have been
+   invited by a channel operator.  This flag also restricts the usage of
+   the INVITE command (See "IRC Client Protocol" [IRC-CLIENT]) to
+   channel operators.
+
+
+
+
+
+
+Kalt                         Informational                      [Page 8]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+4.2.3 Moderated Channel Flag
+
+   The channel flag 'm' is used to control who may speak on a channel.
+   When it is set, only channel operators, and members who have been
+   given the voice privilege may send messages to the channel.
+
+      This flag only affects users.
+
+4.2.4 No Messages To Channel From Clients On The Outside
+
+   When the channel flag 'n' is set, only channel members MAY send
+   messages to the channel.
+
+      This flag only affects users.
+
+4.2.5 Quiet Channel
+
+   The channel flag 'q' is for use by servers only.  When set, it
+   restricts the type of data sent to users about the channel
+   operations: other user joins, parts and nick changes are not sent.
+   From a user's point of view, the channel contains only one user.
+
+   This is typically used to create special local channels on which the
+   server sends notices related to its operations.  This was used as a
+   more efficient and flexible way to replace the user mode 's' defined
+   in RFC 1459 [IRC].
+
+4.2.6 Private and Secret Channels
+
+   The channel flag 'p' is used to mark a channel "private" and the
+   channel flag 's' to mark a channel "secret".  Both properties are
+   similar and conceal the existence of the channel from other users.
+
+   This means that there is no way of getting this channel's name from
+   the server without being a member.  In other words, these channels
+   MUST be omitted from replies to queries like the WHOIS command.
+
+   When a channel is "secret", in addition to the restriction above, the
+   server will act as if the channel does not exist for queries like the
+   TOPIC, LIST, NAMES commands.  Note that there is one exception to
+   this rule: servers will correctly reply to the MODE command.
+   Finally, secret channels are not accounted for in the reply to the
+   LUSERS command (See "Internet Relay Chat: Client Protocol" [IRC-
+   CLIENT]) when the <mask> parameter is specified.
+
+
+
+
+
+
+
+Kalt                         Informational                      [Page 9]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   The channel flags 'p' and 's' MUST NOT both be set at the same time.
+   If a MODE message originating from a server sets the flag 'p' and the
+   flag 's' is already set for the channel, the change is silently
+   ignored.  This should only happen during a split healing phase
+   (mentioned in the "IRC Server Protocol" document [IRC-SERVER]).
+
+4.2.7 Server Reop Flag
+
+   The channel flag 'r' is only available on channels which name begins
+   with the character '!' and MAY only be toggled by the "channel
+   creator".
+
+   This flag is used to prevent a channel from having no channel
+   operator for an extended period of time.  When this flag is set, any
+   channel that has lost all its channel operators for longer than the
+   "reop delay" period triggers a mechanism in servers to reop some or
+   all of the channel inhabitants.  This mechanism is described more in
+   detail in section 5.2.4 (Channel Reop Mechanism).
+
+4.2.8 Topic
+
+   The channel flag 't' is used to restrict the usage of the TOPIC
+   command to channel operators.
+
+4.2.9 User Limit
+
+   A user limit may be set on channels by using the channel flag 'l'.
+   When the limit is reached, servers MUST forbid their local users to
+   join the channel.
+
+   The value of the limit MUST only be made available to the channel
+   members in the reply sent by the server to a MODE query.
+
+4.2.10 Channel Key
+
+   When a channel key is set (by using the mode 'k'), servers MUST
+   reject their local users request to join the channel unless this key
+   is given.
+
+   The channel key MUST only be made visible to the channel members in
+   the reply sent by the server to a MODE query.
+
+4.3 Channel Access Control
+
+   The last category of modes is used to control access to the channel,
+   they take a mask as argument.
+
+
+
+
+
+Kalt                         Informational                     [Page 10]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   In order to reduce the size of the global database for control access
+   modes set for channels, servers MAY put a maximum limit on the number
+   of such modes set for a particular channel.  If such restriction is
+   imposed, it MUST only affect user requests.  The limit SHOULD be
+   homogeneous on a per IRC network basis.
+
+4.3.1 Channel Ban and Exception
+
+   When a user requests to join a channel, his local server checks if
+   the user's address matches any of the ban masks set for the channel.
+   If a match is found, the user request is denied unless the address
+   also matches an exception mask set for the channel.
+
+   Servers MUST NOT allow a channel member who is banned from the
+   channel to speak on the channel, unless this member is a channel
+   operator or has voice privilege. (See Section 4.1.3 (Voice
+   Privilege)).
+
+   A user who is banned from a channel and who carries an invitation
+   sent by a channel operator is allowed to join the channel.
+
+4.3.2 Channel Invitation
+
+   For channels which have the invite-only flag set (See Section 4.2.2
+   (Invite Only Flag)), users whose address matches an invitation mask
+   set for the channel are allowed to join the channel without any
+   invitation.
+
+5. Current Implementations
+
+   The only current implementation of these rules as part of the IRC
+   protocol is the IRC server, version 2.10.
+
+   The rest of this section deals with issues that are mostly of
+   importance to those who wish to implement a server but some parts may
+   also be of interest for client writers.
+
+5.1 Tracking Recently Used Channels
+
+   This mechanism is commonly known as "Channel Delay" and generally
+   only applies to channels which names is prefixed with the character
+   '#' (See Section 3.1 "Standard channels").
+
+   When a network split occurs, servers SHOULD keep track of which
+   channels lost a "channel operator" as the result of the break.  These
+   channels are then in a special state which lasts for a certain period
+   of time.  In this particular state, the channels cannot cease to
+
+
+
+
+Kalt                         Informational                     [Page 11]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   exist.  If all the channel members leave the channel, the channel
+   becomes unavailable: the server local clients cannot join the channel
+   as long as it is empty.
+
+   Once a channel is unavailable, it will become available again either
+   because a remote user has joined the channel (most likely because the
+   network is healing), or because the delay period has expired (in
+   which case the channel ceases to exist and may be re-created).
+
+   The duration for which a channel death is delayed SHOULD be set
+   considering many factors among which are the size (user wise) of the
+   IRC network, and the usual duration of network splits.  It SHOULD be
+   uniform on all servers for a given IRC network.
+
+5.2 Safe Channels
+
+   This document introduces the notion of "safe channels".  These
+   channels have a name prefixed with the character '!' and great effort
+   is made to avoid collisions in this name space.  Collisions are not
+   impossible, however they are very unlikely.
+
+5.2.1 Channel Identifier
+
+   The channel identifier is a function of the time.  The current time
+   (as defined under UNIX by the number of seconds elapsed since
+   00:00:00 GMT, January 1, 1970) is converted in a string of five (5)
+   characters using the following base:
+   "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" (each character has a decimal
+   value starting from 0 for 'A' to 35 for '0').
+
+   The channel identifier therefore has a periodicity of 36^5 seconds
+   (about 700 days).
+
+5.2.2 Channel Delay
+
+   These channels MUST be subject to the "channel delay" mechanism
+   described in section 5.1 (Channel Delay).  However, the mechanism is
+   slightly adapted to fit better.
+
+   Servers MUST keep track of all such channels which lose members as
+   the result of a network split, no matter whether the user is a
+   "channel operator" or not.
+
+   However, these channels do NOT ever become unavailable, it is always
+   possible to join them even when they are empty.
+
+
+
+
+
+
+Kalt                         Informational                     [Page 12]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+5.2.3 Abuse Window
+
+   Because the periodicity is so long, attacks on a particular channel
+   (name) may only occur once in a very long while.  However, with luck
+   and patience, it is still possible for a user to cause a channel
+   collision.  In order to avoid this, servers MUST "look in the future"
+   and keep a list of channel names which identifier is about to be used
+   (in the coming few days for example). Such list should remain small,
+   not be a burden for servers to maintain and be used to avoid channel
+   collisions by preventing the re-creation of such channel for a longer
+   period of time than channel delay does.
+
+   Eventually a server MAY choose to extend this procedure to forbid
+   creation of channels with the same shortname only (then ignoring the
+   channel identifier).
+
+5.2.4 Preserving Sanity In The Name Space
+
+   The combination of the mechanisms described in sections 5.2.2 and
+   5.2.3 makes it quite difficult for a user to create a channel
+   collision. However, another type of abuse consists of creating many
+   channels having the same shortname, but different identifiers.  To
+   prevent this from happening, servers MUST forbid the creation of a
+   new channel which has the same shortname of a channel currently
+   existing.
+
+5.2.5 Server Reop Mechanism
+
+   When a channel has been opless for longer than the "reop delay"
+   period and has the channel flag 'r' set (See Section 4.2.7 (Server
+   Reop Flag)), IRC servers are responsible for giving the channel
+   operator status randomly to some of the members.
+
+   The exact logic used for this mechanism by the current implementation
+   is described below.  Servers MAY use a different logic, but that it
+   is strongly RECOMMENDED that all servers use the same logic on a
+   particular IRC network to maintain coherence as well as fairness.
+   For the same reason, the "reop delay" SHOULD be uniform on all
+   servers for a given IRC network.  As for the "channel delay", the
+   value of the "reop delay" SHOULD be set considering many factors
+   among which are the size (user wise) of the IRC network, and the
+   usual duration of network splits.
+
+   a) the reop mechanism is triggered after a random time following the
+      expiration of the "reop delay".  This should limit the eventuality
+      of the mechanism being triggered at the same time (for the same
+      channel) on two separate servers.
+
+
+
+
+Kalt                         Informational                     [Page 13]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   b) If the channel is small (five (5) users or less), and the "channel
+      delay" for this channel has expired,
+        Then reop all channel members if at least one member is local to
+        the server.
+
+   c) If the channel is small (five (5) users or less), and the "channel
+      delay" for this channel has expired, and the "reop delay" has
+      expired for longer than its value,
+        Then reop all channel members.
+
+   d) For other cases, reop at most one member on the channel, based on
+      some method build into the server. If you don't reop a member, the
+      method should be such that another server will probably op
+      someone. The method SHOULD be the same over the whole network. A
+      good heuristic could be just random reop.
+      (The current implementation actually tries to choose a member
+      local to the server who has not been idle for too long, eventually
+      postponing action, therefore letting other servers have a chance
+      to find a "not too idle" member.  This is over complicated due to
+      the fact that servers only know the "idle" time of their local
+      users)
+
+6. Current problems
+
+   There are a number of recognized problems with the way IRC channels
+   are managed.  Some of these can be directly attributed to the rules
+   defined in this document, while others are the result of the
+   underlying "IRC Server Protocol" [IRC-SERVER].  Although derived from
+   RFC 1459 [IRC], this document introduces several novelties in an
+   attempt to solve some of the known problems.
+
+6.1 Labels
+
+   This document defines one of the many labels used by the IRC
+   protocol.  Although there are several distinct namespaces (based on
+   the channel name prefix), duplicates inside each of these are not
+   allowed.  Currently, it is possible for users on different servers to
+   pick the label which may result in collisions (with the exception of
+   channels known to only one server where they can be averted).
+
+6.1.1 Channel Delay
+
+   The channel delay mechanism described in section 5.1 (Tracking
+   Recently Used Channels) and used for channels prefixed with the
+   character '#' is a simple attempt at preventing collisions from
+   happening.  Experience has shown that, under normal circumstances, it
+
+
+
+
+
+Kalt                         Informational                     [Page 14]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   is very efficient; however, it obviously has severe limitations
+   keeping it from being an adequate solution to the problem discussed
+   here.
+
+6.1.2 Safe Channels
+
+   "Safe channels" described in section 3.2 (Safe Channels) are a better
+   way to prevent collisions from happening as it prevents users from
+   having total control over the label they choose.  The obvious
+   drawback for such labels is that they are not user friendly.
+   However, it is fairly trivial for a client program to improve on
+   this.
+
+6.2 Mode Propagation Delays
+
+   Because of network delays induced by the network, and because each
+   server on the path is REQUIRED to check the validity of mode changes
+   (e.g., user exists and has the right privileges), it is not unusual
+   for a MODE message to only affect part of the network, often creating
+   a discrepancy between servers on the current state of a channel.
+
+   While this may seem easy to fix (by having only the original server
+   check the validity of mode changes), it was decided not to do so for
+   various reasons.  One concern is that servers cannot trust each
+   other, and that a misbehaving servers can easily be detected.  This
+   way of doing so also stops wave effects on channels which are out of
+   synch when mode changes are issued from different directions.
+
+6.3 Collisions And Channel Modes
+
+   The "Internet Relay Chat: Server Protocol" document [IRC-SERVER]
+   describes how channel data is exchanged when two servers connect to
+   each other.  Channel collisions (either legitimate or not) are
+   treated as inclusive events, meaning that the resulting channel has
+   for members all the users who are members of the channel on either
+   server prior to the connection.
+
+   Similarly, each server sends the channel modes to the other one.
+   Therefore, each server also receives these channel modes.  There are
+   three types of modes for a given channel: flags, masks, and data.
+   The first two types are easy to deal with as they are either set or
+   unset.  If such a mode is set on one server, it MUST be set on the
+   other server as a result of the connection.
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 15]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+   As topics are not sent as part of this exchange, they are not a
+   problem.  However, channel modes 'l' and 'k' are exchanged, and if
+   they are set on both servers prior to the connection, there is no
+   mechanism to decide which of the two values takes precedence.  It is
+   left up to the users to fix the resulting discrepancy.
+
+6.4 Resource Exhaustion
+
+   The mode based on masks defined in section 4.3 make the IRC servers
+   (and network) vulnerable to a simple abuse of the system: a single
+   channel operator can set as many different masks as possible on a
+   particular channel.  This can easily cause the server to waste
+   memory, as well as network bandwidth (since the info is propagated to
+   other servers).  For this reason it is RECOMMENDED that a limit be
+   put on the number of such masks per channels as mentioned in section
+   4.3.
+
+   Moreover, more complex mechanisms MAY be used to avoid having
+   redundant masks set for the same channel.
+
+7. Security Considerations
+
+7.1 Access Control
+
+   One of the main ways to control access to a channel is to use masks
+   which are based on the username and hostname of the user connections.
+   This mechanism can only be efficient and safe if the IRC servers have
+   an accurate way of authenticating user connections, and if users
+   cannot easily get around it.  While it is in theory possible to
+   implement such a strict authentication mechanism, most IRC networks
+   (especially public networks) do not have anything like this in place
+   and provide little guaranty about the accuracy of the username and
+   hostname for a particular client connection.
+
+   Another way to control access is to use a channel key, but since this
+   key is sent in plaintext, it is vulnerable to traditional man in the
+   middle attacks.
+
+7.2 Channel Privacy
+
+   Because channel collisions are treated as inclusive events (See
+   Section 6.3), it is possible for users to join a channel overriding
+   its access control settings.  This method has long been used by
+   individuals to "take over" channels by "illegitimately" gaining
+   channel operator status on the channel.  The same method can be used
+   to find out the exact list of members of a channel, as well as to
+   eventually receive some of the messages sent to the channel.
+
+
+
+
+Kalt                         Informational                     [Page 16]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+7.3 Anonymity
+
+   The anonymous channel flag (See Section 4.2.1) can be used to render
+   all users on such channel "anonymous" by presenting all messages to
+   the channel as originating from a pseudo user which nickname is
+   "anonymous".  This is done at the client-server level, and no
+   anonymity is provided at the server-server level.
+
+   It should be obvious to readers, that the level of anonymity offered
+   is quite poor and insecure, and that clients SHOULD display strong
+   warnings for users joining such channels.
+
+8. Current support and availability
+
+     Mailing lists for IRC related discussion:
+       General discussion: ircd-users@irc.org
+       Protocol development: ircd-dev@irc.org
+
+     Software implementations:
+       ftp://ftp.irc.org/irc/server
+       ftp://ftp.funet.fi/pub/unix/irc
+       ftp://coombs.anu.edu.au/pub/irc
+
+     Newsgroup: alt.irc
+
+9. Acknowledgements
+
+   Parts of this document were copied from the RFC 1459 [IRC] which
+   first formally documented the IRC Protocol.  It has also benefited
+   from many rounds of review and comments.  In particular, the
+   following people have made significant contributions to this
+   document:
+
+   Matthew Green, Michael Neumayer, Volker Paulsen, Kurt Roeckx, Vesa
+   Ruokonen, Magnus Tjernstrom, Stefan Zehl.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 17]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+10. References
+
+   [KEYWORDS]   Bradner, S., "Key words for use in RFCs to Indicate
+                Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [IRC]        Oikarinen, J. and D. Reed, "Internet Relay Chat
+                Protocol", RFC 1459, May 1993.
+
+   [IRC-ARCH]   Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
+                April 2000.
+
+   [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
+                2812, April 2000.
+
+   [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
+                2813, April 2000.
+
+11. Author's Address
+
+   Christophe Kalt
+   99 Teaneck Rd, Apt #117
+   Ridgefield Park, NJ 07660
+   USA
+
+   EMail: kalt@stealth.net
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 18]
+
+RFC 2811        Internet Relay Chat: Channel Management       April 2000
+
+
+12.  Full Copyright Statement
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 19]
+
diff -uNrd ircd-hybrid-6.0/doc/rfc2812.txt ircd-pi1.0a/doc/rfc2812.txt
--- ircd-hybrid-6.0/doc/rfc2812.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/rfc2812.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,3531 @@
+
+
+
+
+
+
+Network Working Group                                            C. Kalt
+Request for Comments: 2812                                    April 2000
+Updates: 1459
+Category: Informational
+
+
+                  Internet Relay Chat: Client Protocol
+
+Status of this Memo
+
+   This memo provides information for the Internet community.  It does
+   not specify an Internet standard of any kind.  Distribution of this
+   memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+IESG NOTE:
+
+   The IRC protocol itself enables several possibilities of transferring
+   data between clients, and just like with other transfer mechanisms
+   like email, the receiver of the data has to be careful about how the
+   data is handled. For more information on security issues with the IRC
+   protocol, see for example http://www.irchelp.org/irchelp/security/.
+
+Abstract
+
+   The IRC (Internet Relay Chat) protocol is for use with text based
+   conferencing; the simplest client being any socket program capable of
+   connecting to the server.
+
+   This document defines the Client Protocol, and assumes that the
+   reader is familiar with the IRC Architecture [IRC-ARCH].
+
+Table of Contents
+
+   1.  Labels .....................................................   3
+      1.1  Servers ................................................   3
+      1.2  Clients ................................................   3
+         1.2.1  Users .............................................   4
+            1.2.1.1  Operators ....................................   4
+         1.2.2  Services ..........................................   4
+      1.3  Channels ...............................................   4
+   2.  The IRC Client Specification ...............................   5
+      2.1  Overview ...............................................   5
+      2.2  Character codes ........................................   5
+      2.3  Messages ...............................................   5
+
+
+
+Kalt                         Informational                      [Page 1]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+         2.3.1  Message format in Augmented BNF ...................   6
+      2.4  Numeric replies ........................................   8
+      2.5  Wildcard expressions ...................................   9
+   3.  Message Details ............................................   9
+      3.1  Connection Registration ................................  10
+         3.1.1  Password message ..................................  10
+         3.1.2  Nick message ......................................  10
+         3.1.3  User message ......................................  11
+         3.1.4  Oper message ......................................  12
+         3.1.5  User mode message .................................  12
+         3.1.6  Service message ...................................  13
+         3.1.7  Quit ..............................................  14
+         3.1.8  Squit .............................................  15
+      3.2  Channel operations .....................................  15
+         3.2.1  Join message ......................................  16
+         3.2.2  Part message ......................................  17
+         3.2.3  Channel mode message ..............................  18
+         3.2.4  Topic message .....................................  19
+         3.2.5  Names message .....................................  20
+         3.2.6  List message ......................................  21
+         3.2.7  Invite message ....................................  21
+         3.2.8  Kick command ......................................  22
+      3.3  Sending messages .......................................  23
+         3.3.1  Private messages ..................................  23
+         3.3.2  Notice ............................................  24
+      3.4  Server queries and commands ............................  25
+         3.4.1  Motd message ......................................  25
+         3.4.2  Lusers message ....................................  25
+         3.4.3  Version message ...................................  26
+         3.4.4  Stats message .....................................  26
+         3.4.5  Links message .....................................  27
+         3.4.6  Time message ......................................  28
+         3.4.7  Connect message ...................................  28
+         3.4.8  Trace message .....................................  29
+         3.4.9  Admin command .....................................  30
+         3.4.10 Info command ......................................  31
+      3.5  Service Query and Commands .............................  31
+         3.5.1  Servlist message ..................................  31
+         3.5.2  Squery ............................................  32
+      3.6  User based queries .....................................  32
+         3.6.1  Who query .........................................  32
+         3.6.2  Whois query .......................................  33
+         3.6.3  Whowas ............................................  34
+      3.7  Miscellaneous messages .................................  34
+         3.7.1  Kill message ......................................  35
+         3.7.2  Ping message ......................................  36
+         3.7.3  Pong message ......................................  37
+         3.7.4  Error .............................................  37
+
+
+
+Kalt                         Informational                      [Page 2]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   4.  Optional features ..........................................  38
+      4.1  Away ...................................................  38
+      4.2  Rehash message .........................................  39
+      4.3  Die message ............................................  39
+      4.4  Restart message ........................................  40
+      4.5  Summon message .........................................  40
+      4.6  Users ..................................................  41
+      4.7  Operwall message .......................................  41
+      4.8  Userhost message .......................................  42
+      4.9  Ison message ...........................................  42
+   5.  Replies ....................................................  43
+      5.1  Command responses ......................................  43
+      5.2  Error Replies ..........................................  53
+      5.3  Reserved numerics ......................................  59
+   6.  Current implementations ....................................  60
+   7.  Current problems ...........................................  60
+      7.1  Nicknames ..............................................  60
+      7.2  Limitation of wildcards ................................  61
+      7.3  Security considerations ................................  61
+   8.  Current support and availability ...........................  61
+   9.  Acknowledgements ...........................................  61
+   10.  References ................................................  62
+   11.  Author's Address ..........................................  62
+   12.  Full Copyright Statement ..................................  63
+
+1. Labels
+
+   This section defines the identifiers used for the various components
+   of the IRC protocol.
+
+1.1 Servers
+
+   Servers are uniquely identified by their name, which has a maximum
+   length of sixty three (63) characters.  See the protocol grammar
+   rules (section 2.3.1) for what may and may not be used in a server
+   name.
+
+1.2 Clients
+
+   For each client all servers MUST have the following information: a
+   netwide unique identifier (whose format depends on the type of
+   client) and the server which introduced the client.
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                      [Page 3]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+1.2.1 Users
+
+   Each user is distinguished from other users by a unique nickname
+   having a maximum length of nine (9) characters.  See the protocol
+   grammar rules (section 2.3.1) for what may and may not be used in a
+   nickname.
+
+   While the maximum length is limited to nine characters, clients
+   SHOULD accept longer strings as they may become used in future
+   evolutions of the protocol.
+
+1.2.1.1 Operators
+
+   To allow a reasonable amount of order to be kept within the IRC
+   network, a special class of users (operators) is allowed to perform
+   general maintenance functions on the network.  Although the powers
+   granted to an operator can be considered as 'dangerous', they are
+   nonetheless often necessary.  Operators SHOULD be able to perform
+   basic network tasks such as disconnecting and reconnecting servers as
+   needed.  In recognition of this need, the protocol discussed herein
+   provides for operators only to be able to perform such functions.
+   See sections 3.1.8 (SQUIT) and 3.4.7 (CONNECT).
+
+   A more controversial power of operators is the ability to remove a
+   user from the connected network by 'force', i.e., operators are able
+   to close the connection between any client and server.  The
+   justification for this is very delicate since its abuse is both
+   destructive and annoying, and its benefits close to inexistent.  For
+   further details on this type of action, see section 3.7.1 (KILL).
+
+1.2.2 Services
+
+   Each service is distinguished from other services by a service name
+   composed of a nickname and a server name.  As for users, the nickname
+   has a maximum length of nine (9) characters.  See the protocol
+   grammar rules (section 2.3.1) for what may and may not be used in a
+   nickname.
+
+1.3 Channels
+
+   Channels names are strings (beginning with a '&', '#', '+' or '!'
+   character) of length up to fifty (50) characters.  Apart from the
+   requirement that the first character is either '&', '#', '+' or '!',
+   the only restriction on a channel name is that it SHALL NOT contain
+   any spaces (' '), a control G (^G or ASCII 7), a comma (',').  Space
+   is used as parameter separator and command is used as a list item
+   separator by the protocol).  A colon (':') can also be used as a
+   delimiter for the channel mask.  Channel names are case insensitive.
+
+
+
+Kalt                         Informational                      [Page 4]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   See the protocol grammar rules (section 2.3.1) for the exact syntax
+   of a channel name.
+
+   Each prefix characterizes a different channel type.  The definition
+   of the channel types is not relevant to the client-server protocol
+   and thus it is beyond the scope of this document.  More details can
+   be found in "Internet Relay Chat: Channel Management" [IRC-CHAN].
+
+2. The IRC Client Specification
+
+2.1 Overview
+
+   The protocol as described herein is for use only with client to
+   server connections when the client registers as a user.
+
+2.2 Character codes
+
+   No specific character set is specified. The protocol is based on a
+   set of codes which are composed of eight (8) bits, making up an
+   octet.  Each message may be composed of any number of these octets;
+   however, some octet values are used for control codes, which act as
+   message delimiters.
+
+   Regardless of being an 8-bit protocol, the delimiters and keywords
+   are such that protocol is mostly usable from US-ASCII terminal and a
+   telnet connection.
+
+   Because of IRC's Scandinavian origin, the characters {}|^ are
+   considered to be the lower case equivalents of the characters []\~,
+   respectively. This is a critical issue when determining the
+   equivalence of two nicknames or channel names.
+
+2.3 Messages
+
+   Servers and clients send each other messages, which may or may not
+   generate a reply.  If the message contains a valid command, as
+   described in later sections, the client should expect a reply as
+   specified but it is not advised to wait forever for the reply; client
+   to server and server to server communication is essentially
+   asynchronous by nature.
+
+   Each IRC message may consist of up to three main parts: the prefix
+   (OPTIONAL), the command, and the command parameters (maximum of
+   fifteen (15)).  The prefix, command, and all parameters are separated
+   by one ASCII space character (0x20) each.
+
+
+
+
+
+
+Kalt                         Informational                      [Page 5]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   The presence of a prefix is indicated with a single leading ASCII
+   colon character (':', 0x3b), which MUST be the first character of the
+   message itself.  There MUST be NO gap (whitespace) between the colon
+   and the prefix.  The prefix is used by servers to indicate the true
+   origin of the message.  If the prefix is missing from the message, it
+   is assumed to have originated from the connection from which it was
+   received from.  Clients SHOULD NOT use a prefix when sending a
+   message; if they use one, the only valid prefix is the registered
+   nickname associated with the client.
+
+   The command MUST either be a valid IRC command or a three (3) digit
+   number represented in ASCII text.
+
+   IRC messages are always lines of characters terminated with a CR-LF
+   (Carriage Return - Line Feed) pair, and these messages SHALL NOT
+   exceed 512 characters in length, counting all characters including
+   the trailing CR-LF. Thus, there are 510 characters maximum allowed
+   for the command and its parameters.  There is no provision for
+   continuation of message lines.  See section 6 for more details about
+   current implementations.
+
+2.3.1 Message format in Augmented BNF
+
+   The protocol messages must be extracted from the contiguous stream of
+   octets.  The current solution is to designate two characters, CR and
+   LF, as message separators.  Empty messages are silently ignored,
+   which permits use of the sequence CR-LF between messages without
+   extra problems.
+
+   The extracted message is parsed into the components <prefix>,
+   <command> and list of parameters (<params>).
+
+    The Augmented BNF representation for this is:
+
+    message    =  [ ":" prefix SPACE ] command [ params ] crlf
+    prefix     =  servername / ( nickname [ [ "!" user ] "@" host ] )
+    command    =  1*letter / 3digit
+    params     =  *14( SPACE middle ) [ SPACE ":" trailing ]
+               =/ 14( SPACE middle ) [ SPACE [ ":" ] trailing ]
+
+    nospcrlfcl =  %x01-09 / %x0B-0C / %x0E-1F / %x21-39 / %x3B-FF
+                    ; any octet except NUL, CR, LF, " " and ":"
+    middle     =  nospcrlfcl *( ":" / nospcrlfcl )
+    trailing   =  *( ":" / " " / nospcrlfcl )
+
+    SPACE      =  %x20        ; space character
+    crlf       =  %x0D %x0A   ; "carriage return" "linefeed"
+
+
+
+
+Kalt                         Informational                      [Page 6]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   NOTES:
+      1) After extracting the parameter list, all parameters are equal
+         whether matched by <middle> or <trailing>. <trailing> is just a
+         syntactic trick to allow SPACE within the parameter.
+
+      2) The NUL (%x00) character is not special in message framing, and
+         basically could end up inside a parameter, but it would cause
+         extra complexities in normal C string handling. Therefore, NUL
+         is not allowed within messages.
+
+   Most protocol messages specify additional semantics and syntax for
+   the extracted parameter strings dictated by their position in the
+   list.  For example, many server commands will assume that the first
+   parameter after the command is the list of targets, which can be
+   described with:
+
+  target     =  nickname / server
+  msgtarget  =  msgto *( "," msgto )
+  msgto      =  channel / ( user [ "%" host ] "@" servername )
+  msgto      =/ ( user "%" host ) / targetmask
+  msgto      =/ nickname / ( nickname "!" user "@" host )
+  channel    =  ( "#" / "+" / ( "!" channelid ) / "&" ) chanstring
+                [ ":" chanstring ]
+  servername =  hostname
+  host       =  hostname / hostaddr
+  hostname   =  shortname *( "." shortname )
+  shortname  =  ( letter / digit ) *( letter / digit / "-" )
+                *( letter / digit )
+                  ; as specified in RFC 1123 [HNAME]
+  hostaddr   =  ip4addr / ip6addr
+  ip4addr    =  1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
+  ip6addr    =  1*hexdigit 7( ":" 1*hexdigit )
+  ip6addr    =/ "0:0:0:0:0:" ( "0" / "FFFF" ) ":" ip4addr
+  nickname   =  ( letter / special ) *8( letter / digit / special / "-" )
+  targetmask =  ( "$" / "#" ) mask
+                  ; see details on allowed masks in section 3.3.1
+  chanstring =  %x01-07 / %x08-09 / %x0B-0C / %x0E-1F / %x21-2B
+  chanstring =/ %x2D-39 / %x3B-FF
+                  ; any octet except NUL, BELL, CR, LF, " ", "," and ":"
+  channelid  = 5( %x41-5A / digit )   ; 5( A-Z / 0-9 )
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                      [Page 7]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+  Other parameter syntaxes are:
+
+  user       =  1*( %x01-09 / %x0B-0C / %x0E-1F / %x21-3F / %x41-FF )
+                  ; any octet except NUL, CR, LF, " " and "@"
+  key        =  1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-7F )
+                  ; any 7-bit US_ASCII character,
+                  ; except NUL, CR, LF, FF, h/v TABs, and " "
+  letter     =  %x41-5A / %x61-7A       ; A-Z / a-z
+  digit      =  %x30-39                 ; 0-9
+  hexdigit   =  digit / "A" / "B" / "C" / "D" / "E" / "F"
+  special    =  %x5B-60 / %x7B-7D
+                   ; "[", "]", "\", "`", "_", "^", "{", "|", "}"
+
+  NOTES:
+      1) The <hostaddr> syntax is given here for the sole purpose of
+         indicating the format to follow for IP addresses.  This
+         reflects the fact that the only available implementations of
+         this protocol uses TCP/IP as underlying network protocol but is
+         not meant to prevent other protocols to be used.
+
+      2) <hostname> has a maximum length of 63 characters.  This is a
+         limitation of the protocol as internet hostnames (in
+         particular) can be longer.  Such restriction is necessary
+         because IRC messages are limited to 512 characters in length.
+         Clients connecting from a host which name is longer than 63
+         characters are registered using the host (numeric) address
+         instead of the host name.
+
+      3) Some parameters used in the following sections of this
+         documents are not defined here as there is nothing specific
+         about them besides the name that is used for convenience.
+         These parameters follow the general syntax defined for
+         <params>.
+
+2.4 Numeric replies
+
+   Most of the messages sent to the server generate a reply of some
+   sort.  The most common reply is the numeric reply, used for both
+   errors and normal replies.  The numeric reply MUST be sent as one
+   message consisting of the sender prefix, the three-digit numeric, and
+   the target of the reply.  A numeric reply is not allowed to originate
+   from a client. In all other respects, a numeric reply is just like a
+   normal message, except that the keyword is made up of 3 numeric
+   digits rather than a string of letters.  A list of different replies
+   is supplied in section 5 (Replies).
+
+
+
+
+
+
+Kalt                         Informational                      [Page 8]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+2.5 Wildcard expressions
+
+   When wildcards are allowed in a string, it is referred as a "mask".
+
+   For string matching purposes, the protocol allows the use of two
+   special characters: '?' (%x3F) to match one and only one character,
+   and '*' (%x2A) to match any number of any characters.  These two
+   characters can be escaped using the character '\' (%x5C).
+
+   The Augmented BNF syntax for this is:
+
+    mask       =  *( nowild / noesc wildone / noesc wildmany )
+    wildone    =  %x3F
+    wildmany   =  %x2A
+    nowild     =  %x01-29 / %x2B-3E / %x40-FF
+                    ; any octet except NUL, "*", "?"
+    noesc      =  %x01-5B / %x5D-FF
+                    ; any octet except NUL and "\"
+    matchone   =  %x01-FF
+                    ; matches wildone
+    matchmany  =  *matchone
+                    ; matches wildmany
+
+   Examples:
+
+   a?c         ; Matches any string of 3 characters in length starting
+               with "a" and ending with "c"
+
+   a*c         ; Matches any string of at least 2 characters in length
+               starting with "a" and ending with "c"
+
+3. Message Details
+
+   On the following pages there are descriptions of each message
+   recognized by the IRC server and client.  All commands described in
+   this section MUST be implemented by any server for this protocol.
+
+   Where the reply ERR_NOSUCHSERVER is returned, it means that the
+   target of the message could not be found.  The server MUST NOT send
+   any other replies after this error for that command.
+
+   The server to which a client is connected is required to parse the
+   complete message, and return any appropriate errors.
+
+   If multiple parameters is presented, then each MUST be checked for
+   validity and appropriate responses MUST be sent back to the client.
+   In the case of incorrect messages which use parameter lists with
+   comma as an item separator, a reply MUST be sent for each item.
+
+
+
+Kalt                         Informational                      [Page 9]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.1 Connection Registration
+
+   The commands described here are used to register a connection with an
+   IRC server as a user as well as to correctly disconnect.
+
+   A "PASS" command is not required for a client connection to be
+   registered, but it MUST precede the latter of the NICK/USER
+   combination (for a user connection) or the SERVICE command (for a
+   service connection). The RECOMMENDED order for a client to register
+   is as follows:
+
+                           1. Pass message
+           2. Nick message                 2. Service message
+           3. User message
+
+   Upon success, the client will receive an RPL_WELCOME (for users) or
+   RPL_YOURESERVICE (for services) message indicating that the
+   connection is now registered and known the to the entire IRC network.
+   The reply message MUST contain the full client identifier upon which
+   it was registered.
+
+3.1.1 Password message
+
+      Command: PASS
+   Parameters: <password>
+
+   The PASS command is used to set a 'connection password'.  The
+   optional password can and MUST be set before any attempt to register
+   the connection is made.  Currently this requires that user send a
+   PASS command before sending the NICK/USER combination.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_ALREADYREGISTRED
+
+   Example:
+
+           PASS secretpasswordhere
+
+3.1.2 Nick message
+
+
+      Command: NICK
+   Parameters: <nickname>
+
+   NICK command is used to give user a nickname or change the existing
+   one.
+
+
+
+
+Kalt                         Informational                     [Page 10]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Numeric Replies:
+
+           ERR_NONICKNAMEGIVEN             ERR_ERRONEUSNICKNAME
+           ERR_NICKNAMEINUSE               ERR_NICKCOLLISION
+           ERR_UNAVAILRESOURCE             ERR_RESTRICTED
+
+   Examples:
+
+   NICK Wiz                ; Introducing new nick "Wiz" if session is
+                           still unregistered, or user changing his
+                           nickname to "Wiz"
+
+   :WiZ!jto@tolsun.oulu.fi NICK Kilroy
+                           ; Server telling that WiZ changed his
+                           nickname to Kilroy.
+
+3.1.3 User message
+
+      Command: USER
+   Parameters: <user> <mode> <unused> <realname>
+
+   The USER command is used at the beginning of connection to specify
+   the username, hostname and realname of a new user.
+
+   The <mode> parameter should be a numeric, and can be used to
+   automatically set user modes when registering with the server.  This
+   parameter is a bitmask, with only 2 bits having any signification: if
+   the bit 2 is set, the user mode 'w' will be set and if the bit 3 is
+   set, the user mode 'i' will be set.  (See Section 3.1.5 "User
+   Modes").
+
+   The <realname> may contain space characters.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_ALREADYREGISTRED
+
+   Example:
+
+   USER guest 0 * :Ronnie Reagan   ; User registering themselves with a
+                                   username of "guest" and real name
+                                   "Ronnie Reagan".
+
+   USER guest 8 * :Ronnie Reagan   ; User registering themselves with a
+                                   username of "guest" and real name
+                                   "Ronnie Reagan", and asking to be set
+                                   invisible.
+
+
+
+
+Kalt                         Informational                     [Page 11]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.1.4 Oper message
+
+      Command: OPER
+   Parameters: <name> <password>
+
+   A normal user uses the OPER command to obtain operator privileges.
+   The combination of <name> and <password> are REQUIRED to gain
+   Operator privileges.  Upon success, the user will receive a MODE
+   message (see section 3.1.5) indicating the new user modes.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              RPL_YOUREOPER
+           ERR_NOOPERHOST                  ERR_PASSWDMISMATCH
+
+   Example:
+
+   OPER foo bar                    ; Attempt to register as an operator
+                                   using a username of "foo" and "bar"
+                                   as the password.
+
+3.1.5 User mode message
+
+      Command: MODE
+   Parameters: <nickname>
+               *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )
+
+   The user MODE's are typically changes which affect either how the
+   client is seen by others or what 'extra' messages the client is sent.
+
+   A user MODE command MUST only be accepted if both the sender of the
+   message and the nickname given as a parameter are both the same.  If
+   no other parameter is given, then the server will return the current
+   settings for the nick.
+
+      The available modes are as follows:
+
+           a - user is flagged as away;
+           i - marks a users as invisible;
+           w - user receives wallops;
+           r - restricted user connection;
+           o - operator flag;
+           O - local operator flag;
+           s - marks a user for receipt of server notices.
+
+   Additional modes may be available later on.
+
+
+
+
+
+Kalt                         Informational                     [Page 12]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   The flag 'a' SHALL NOT be toggled by the user using the MODE command,
+   instead use of the AWAY command is REQUIRED.
+
+   If a user attempts to make themselves an operator using the "+o" or
+   "+O" flag, the attempt SHOULD be ignored as users could bypass the
+   authentication mechanisms of the OPER command.  There is no
+   restriction, however, on anyone `deopping' themselves (using "-o" or
+   "-O").
+
+   On the other hand, if a user attempts to make themselves unrestricted
+   using the "-r" flag, the attempt SHOULD be ignored.  There is no
+   restriction, however, on anyone `deopping' themselves (using "+r").
+   This flag is typically set by the server upon connection for
+   administrative reasons.  While the restrictions imposed are left up
+   to the implementation, it is typical that a restricted user not be
+   allowed to change nicknames, nor make use of the channel operator
+   status on channels.
+
+   The flag 's' is obsolete but MAY still be used.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_USERSDONTMATCH
+           ERR_UMODEUNKNOWNFLAG            RPL_UMODEIS
+
+   Examples:
+
+   MODE WiZ -w                     ; Command by WiZ to turn off
+                                   reception of WALLOPS messages.
+
+   MODE Angel +i                   ; Command from Angel to make herself
+                                   invisible.
+
+   MODE WiZ -o                     ; WiZ 'deopping' (removing operator
+                                   status).
+
+3.1.6 Service message
+
+      Command: SERVICE
+   Parameters: <nickname> <reserved> <distribution> <type>
+               <reserved> <info>
+
+   The SERVICE command to register a new service.  Command parameters
+   specify the service nickname, distribution, type and info of a new
+   service.
+
+
+
+
+
+
+Kalt                         Informational                     [Page 13]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   The <distribution> parameter is used to specify the visibility of a
+   service.  The service may only be known to servers which have a name
+   matching the distribution.  For a matching server to have knowledge
+   of the service, the network path between that server and the server
+   on which the service is connected MUST be composed of servers which
+   names all match the mask.
+
+   The <type> parameter is currently reserved for future usage.
+
+   Numeric Replies:
+
+           ERR_ALREADYREGISTRED            ERR_NEEDMOREPARAMS
+           ERR_ERRONEUSNICKNAME
+           RPL_YOURESERVICE                RPL_YOURHOST
+           RPL_MYINFO
+
+   Example:
+
+   SERVICE dict * *.fr 0 0 :French Dictionary ; Service registering
+                                   itself with a name of "dict".  This
+                                   service will only be available on
+                                   servers which name matches "*.fr".
+
+3.1.7 Quit
+
+      Command: QUIT
+   Parameters: [ <Quit Message> ]
+
+   A client session is terminated with a quit message.  The server
+   acknowledges this by sending an ERROR message to the client.
+
+   Numeric Replies:
+
+           None.
+
+   Example:
+
+   QUIT :Gone to have lunch        ; Preferred message format.
+
+   :syrk!kalt@millennium.stealth.net QUIT :Gone to have lunch ; User
+                                   syrk has quit IRC to have lunch.
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 14]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.1.8 Squit
+
+      Command: SQUIT
+   Parameters: <server> <comment>
+
+   The SQUIT command is available only to operators.  It is used to
+   disconnect server links.  Also servers can generate SQUIT messages on
+   error conditions.  A SQUIT message may also target a remote server
+   connection.  In this case, the SQUIT message will simply be sent to
+   the remote server without affecting the servers in between the
+   operator and the remote server.
+
+   The <comment> SHOULD be supplied by all operators who execute a SQUIT
+   for a remote server.  The server ordered to disconnect its peer
+   generates a WALLOPS message with <comment> included, so that other
+   users may be aware of the reason of this action.
+
+   Numeric replies:
+
+           ERR_NOPRIVILEGES                ERR_NOSUCHSERVER
+           ERR_NEEDMOREPARAMS
+
+   Examples:
+
+   SQUIT tolsun.oulu.fi :Bad Link ?  ; Command to uplink of the server
+                                   tolson.oulu.fi to terminate its
+                                   connection with comment "Bad Link".
+
+   :Trillian SQUIT cm22.eng.umd.edu :Server out of control ; Command
+                                   from Trillian from to disconnect
+                                   "cm22.eng.umd.edu" from the net with
+                                   comment "Server out of control".
+
+3.2 Channel operations
+
+   This group of messages is concerned with manipulating channels, their
+   properties (channel modes), and their contents (typically users).
+   For this reason, these messages SHALL NOT be made available to
+   services.
+
+   All of these messages are requests which will or will not be granted
+   by the server.  The server MUST send a reply informing the user
+   whether the request was granted, denied or generated an error.  When
+   the server grants the request, the message is typically sent back
+   (eventually reformatted) to the user with the prefix set to the user
+   itself.
+
+
+
+
+
+Kalt                         Informational                     [Page 15]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   The rules governing how channels are managed are enforced by the
+   servers.  These rules are beyond the scope of this document.  More
+   details are found in "Internet Relay Chat: Channel Management" [IRC-
+   CHAN].
+
+3.2.1 Join message
+
+      Command: JOIN
+   Parameters: ( <channel> *( "," <channel> ) [ <key> *( "," <key> ) ] )
+               / "0"
+
+   The JOIN command is used by a user to request to start listening to
+   the specific channel.  Servers MUST be able to parse arguments in the
+   form of a list of target, but SHOULD NOT use lists when sending JOIN
+   messages to clients.
+
+   Once a user has joined a channel, he receives information about
+   all commands his server receives affecting the channel.  This
+   includes JOIN, MODE, KICK, PART, QUIT and of course PRIVMSG/NOTICE.
+   This allows channel members to keep track of the other channel
+   members, as well as channel modes.
+
+   If a JOIN is successful, the user receives a JOIN message as
+   confirmation and is then sent the channel's topic (using RPL_TOPIC) and
+   the list of users who are on the channel (using RPL_NAMREPLY), which
+   MUST include the user joining.
+
+   Note that this message accepts a special argument ("0"), which is
+   a special request to leave all channels the user is currently a member
+   of.  The server will process this message as if the user had sent
+   a PART command (See Section 3.2.2) for each channel he is a member
+   of.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_BANNEDFROMCHAN
+           ERR_INVITEONLYCHAN              ERR_BADCHANNELKEY
+           ERR_CHANNELISFULL               ERR_BADCHANMASK
+           ERR_NOSUCHCHANNEL               ERR_TOOMANYCHANNELS
+           ERR_TOOMANYTARGETS              ERR_UNAVAILRESOURCE
+           RPL_TOPIC
+
+   Examples:
+
+   JOIN #foobar                    ; Command to join channel #foobar.
+
+   JOIN &foo fubar                 ; Command to join channel &foo using
+                                   key "fubar".
+
+
+
+Kalt                         Informational                     [Page 16]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   JOIN #foo,&bar fubar            ; Command to join channel #foo using
+                                   key "fubar" and &bar using no key.
+
+   JOIN #foo,#bar fubar,foobar     ; Command to join channel #foo using
+                                   key "fubar", and channel #bar using
+                                   key "foobar".
+
+   JOIN #foo,#bar                  ; Command to join channels #foo and
+                                   #bar.
+
+   JOIN 0                          ; Leave all currently joined
+                                   channels.
+
+   :WiZ!jto@tolsun.oulu.fi JOIN #Twilight_zone ; JOIN message from WiZ
+                                   on channel #Twilight_zone
+
+3.2.2 Part message
+
+      Command: PART
+   Parameters: <channel> *( "," <channel> ) [ <Part Message> ]
+
+   The PART command causes the user sending the message to be removed
+   from the list of active members for all given channels listed in the
+   parameter string.  If a "Part Message" is given, this will be sent
+   instead of the default message, the nickname.  This request is always
+   granted by the server.
+
+   Servers MUST be able to parse arguments in the form of a list of
+   target, but SHOULD NOT use lists when sending PART messages to
+   clients.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_NOSUCHCHANNEL
+           ERR_NOTONCHANNEL
+
+   Examples:
+
+   PART #twilight_zone             ; Command to leave channel
+                                   "#twilight_zone"
+
+   PART #oz-ops,&group5            ; Command to leave both channels
+                                   "&group5" and "#oz-ops".
+
+   :WiZ!jto@tolsun.oulu.fi PART #playzone :I lost
+                                   ; User WiZ leaving channel
+                                   "#playzone" with the message "I
+                                   lost".
+
+
+
+Kalt                         Informational                     [Page 17]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.2.3 Channel mode message
+
+      Command: MODE
+   Parameters: <channel> *( ( "-" / "+" ) *<modes> *<modeparams> )
+
+   The MODE command is provided so that users may query and change the
+   characteristics of a channel.  For more details on available modes
+   and their uses, see "Internet Relay Chat: Channel Management" [IRC-
+   CHAN].  Note that there is a maximum limit of three (3) changes per
+   command for modes that take a parameter.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_KEYSET
+           ERR_NOCHANMODES                 ERR_CHANOPRIVSNEEDED
+           ERR_USERNOTINCHANNEL            ERR_UNKNOWNMODE
+           RPL_CHANNELMODEIS
+           RPL_BANLIST                     RPL_ENDOFBANLIST
+           RPL_EXCEPTLIST                  RPL_ENDOFEXCEPTLIST
+           RPL_INVITELIST                  RPL_ENDOFINVITELIST
+           RPL_UNIQOPIS
+
+   The following examples are given to help understanding the syntax of
+   the MODE command, but refer to modes defined in "Internet Relay Chat:
+   Channel Management" [IRC-CHAN].
+
+   Examples:
+
+   MODE #Finnish +imI *!*@*.fi     ; Command to make #Finnish channel
+                                   moderated and 'invite-only' with user
+                                   with a hostname matching *.fi
+                                   automatically invited.
+
+   MODE #Finnish +o Kilroy         ; Command to give 'chanop' privileges
+                                   to Kilroy on channel #Finnish.
+
+   MODE #Finnish +v Wiz            ; Command to allow WiZ to speak on
+                                   #Finnish.
+
+   MODE #Fins -s                   ; Command to remove 'secret' flag
+                                   from channel #Fins.
+
+   MODE #42 +k oulu                ; Command to set the channel key to
+                                   "oulu".
+
+   MODE #42 -k oulu                ; Command to remove the "oulu"
+                                   channel key on channel "#42".
+
+
+
+
+Kalt                         Informational                     [Page 18]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   MODE #eu-opers +l 10            ; Command to set the limit for the
+                                   number of users on channel
+                                   "#eu-opers" to 10.
+
+   :WiZ!jto@tolsun.oulu.fi MODE #eu-opers -l
+                                   ; User "WiZ" removing the limit for
+                                   the number of users on channel "#eu-
+                                   opers".
+
+   MODE &oulu +b                   ; Command to list ban masks set for
+                                   the channel "&oulu".
+
+   MODE &oulu +b *!*@*             ; Command to prevent all users from
+                                   joining.
+
+   MODE &oulu +b *!*@*.edu +e *!*@*.bu.edu
+                                   ; Command to prevent any user from a
+                                   hostname matching *.edu from joining,
+                                   except if matching *.bu.edu
+
+   MODE #bu +be *!*@*.edu *!*@*.bu.edu
+                                   ; Comment to prevent any user from a
+                                   hostname matching *.edu from joining,
+                                   except if matching *.bu.edu
+
+   MODE #meditation e              ; Command to list exception masks set
+                                   for the channel "#meditation".
+
+   MODE #meditation I              ; Command to list invitations masks
+                                   set for the channel "#meditation".
+
+   MODE !12345ircd O               ; Command to ask who the channel
+                                   creator for "!12345ircd" is
+
+3.2.4 Topic message
+
+      Command: TOPIC
+   Parameters: <channel> [ <topic> ]
+
+   The TOPIC command is used to change or view the topic of a channel.
+   The topic for channel <channel> is returned if there is no <topic>
+   given.  If the <topic> parameter is present, the topic for that
+   channel will be changed, if this action is allowed for the user
+   requesting it.  If the <topic> parameter is an empty string, the
+   topic for that channel will be removed.
+
+
+
+
+
+
+Kalt                         Informational                     [Page 19]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_NOTONCHANNEL
+           RPL_NOTOPIC                     RPL_TOPIC
+           ERR_CHANOPRIVSNEEDED            ERR_NOCHANMODES
+
+   Examples:
+
+   :WiZ!jto@tolsun.oulu.fi TOPIC #test :New topic ; User Wiz setting the
+                                   topic.
+
+   TOPIC #test :another topic      ; Command to set the topic on #test
+                                   to "another topic".
+
+   TOPIC #test :                   ; Command to clear the topic on
+                                   #test.
+
+   TOPIC #test                     ; Command to check the topic for
+                                   #test.
+
+3.2.5 Names message
+
+      Command: NAMES
+   Parameters: [ <channel> *( "," <channel> ) [ <target> ] ]
+
+   By using the NAMES command, a user can list all nicknames that are
+   visible to him. For more details on what is visible and what is not,
+   see "Internet Relay Chat: Channel Management" [IRC-CHAN].  The
+   <channel> parameter specifies which channel(s) to return information
+   about.  There is no error reply for bad channel names.
+
+   If no <channel> parameter is given, a list of all channels and their
+   occupants is returned.  At the end of this list, a list of users who
+   are visible but either not on any channel or not on a visible channel
+   are listed as being on `channel' "*".
+
+   If the <target> parameter is specified, the request is forwarded to
+   that server which will generate the reply.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numerics:
+
+           ERR_TOOMANYMATCHES              ERR_NOSUCHSERVER
+           RPL_NAMREPLY                    RPL_ENDOFNAMES
+
+
+
+
+
+
+Kalt                         Informational                     [Page 20]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   NAMES #twilight_zone,#42        ; Command to list visible users on
+                                   #twilight_zone and #42
+
+   NAMES                           ; Command to list all visible
+                                   channels and users
+
+3.2.6 List message
+
+      Command: LIST
+   Parameters: [ <channel> *( "," <channel> ) [ <target> ] ]
+
+   The list command is used to list channels and their topics.  If the
+   <channel> parameter is used, only the status of that channel is
+   displayed.
+
+   If the <target> parameter is specified, the request is forwarded to
+   that server which will generate the reply.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_TOOMANYMATCHES              ERR_NOSUCHSERVER
+           RPL_LIST                        RPL_LISTEND
+
+   Examples:
+
+   LIST                            ; Command to list all channels.
+
+   LIST #twilight_zone,#42         ; Command to list channels
+                                   #twilight_zone and #42
+
+3.2.7 Invite message
+
+      Command: INVITE
+   Parameters: <nickname> <channel>
+
+   The INVITE command is used to invite a user to a channel.  The
+   parameter <nickname> is the nickname of the person to be invited to
+   the target channel <channel>.  There is no requirement that the
+   channel the target user is being invited to must exist or be a valid
+   channel.  However, if the channel exists, only members of the channel
+   are allowed to invite other users.  When the channel has invite-only
+   flag set, only channel operators may issue INVITE command.
+
+
+
+
+
+Kalt                         Informational                     [Page 21]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Only the user inviting and the user being invited will receive
+   notification of the invitation.  Other channel members are not
+   notified.  (This is unlike the MODE changes, and is occasionally the
+   source of trouble for users.)
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_NOSUCHNICK
+           ERR_NOTONCHANNEL                ERR_USERONCHANNEL
+           ERR_CHANOPRIVSNEEDED
+           RPL_INVITING                    RPL_AWAY
+
+   Examples:
+
+   :Angel!wings@irc.org INVITE Wiz #Dust
+
+                                   ; Message to WiZ when he has been
+                                   invited by user Angel to channel
+                                   #Dust
+
+   INVITE Wiz #Twilight_Zone       ; Command to invite WiZ to
+                                   #Twilight_zone
+
+3.2.8 Kick command
+
+      Command: KICK
+   Parameters: <channel> *( "," <channel> ) <user> *( "," <user> )
+               [<comment>]
+
+   The KICK command can be used to request the forced removal of a user
+   from a channel.  It causes the <user> to PART from the <channel> by
+   force.  For the message to be syntactically correct, there MUST be
+   either one channel parameter and multiple user parameter, or as many
+   channel parameters as there are user parameters.  If a "comment" is
+   given, this will be sent instead of the default message, the nickname
+   of the user issuing the KICK.
+
+   The server MUST NOT send KICK messages with multiple channels or
+   users to clients.  This is necessarily to maintain backward
+   compatibility with old client software.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS              ERR_NOSUCHCHANNEL
+           ERR_BADCHANMASK                 ERR_CHANOPRIVSNEEDED
+           ERR_USERNOTINCHANNEL            ERR_NOTONCHANNEL
+
+
+
+
+
+Kalt                         Informational                     [Page 22]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   KICK &Melbourne Matthew         ; Command to kick Matthew from
+                                   &Melbourne
+
+   KICK #Finnish John :Speaking English
+                                   ; Command to kick John from #Finnish
+                                   using "Speaking English" as the
+                                   reason (comment).
+
+   :WiZ!jto@tolsun.oulu.fi KICK #Finnish John
+                                   ; KICK message on channel #Finnish
+                                   from WiZ to remove John from channel
+
+3.3 Sending messages
+
+   The main purpose of the IRC protocol is to provide a base for clients
+   to communicate with each other.  PRIVMSG, NOTICE and SQUERY
+   (described in Section 3.5 on Service Query and Commands) are the only
+   messages available which actually perform delivery of a text message
+   from one client to another - the rest just make it possible and try
+   to ensure it happens in a reliable and structured manner.
+
+3.3.1 Private messages
+
+      Command: PRIVMSG
+   Parameters: <msgtarget> <text to be sent>
+
+   PRIVMSG is used to send private messages between users, as well as to
+   send messages to channels.  <msgtarget> is usually the nickname of
+   the recipient of the message, or a channel name.
+
+   The <msgtarget> parameter may also be a host mask (#<mask>) or server
+   mask ($<mask>).  In both cases the server will only send the PRIVMSG
+   to those who have a server or host matching the mask.  The mask MUST
+   have at least 1 (one) "." in it and no wildcards following the last
+   ".".  This requirement exists to prevent people sending messages to
+   "#*" or "$*", which would broadcast to all users.  Wildcards are the
+   '*' and '?'  characters.  This extension to the PRIVMSG command is
+   only available to operators.
+
+   Numeric Replies:
+
+           ERR_NORECIPIENT                 ERR_NOTEXTTOSEND
+           ERR_CANNOTSENDTOCHAN            ERR_NOTOPLEVEL
+           ERR_WILDTOPLEVEL                ERR_TOOMANYTARGETS
+           ERR_NOSUCHNICK
+           RPL_AWAY
+
+
+
+Kalt                         Informational                     [Page 23]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   :Angel!wings@irc.org PRIVMSG Wiz :Are you receiving this message ?
+                                   ; Message from Angel to Wiz.
+
+   PRIVMSG Angel :yes I'm receiving it !
+                                   ; Command to send a message to Angel.
+
+   PRIVMSG jto@tolsun.oulu.fi :Hello !
+                                   ; Command to send a message to a user
+                                   on server tolsun.oulu.fi with
+                                   username of "jto".
+
+   PRIVMSG kalt%millennium.stealth.net@irc.stealth.net :Are you a frog?
+                                   ; Message to a user on server
+                                   irc.stealth.net with username of
+                                   "kalt", and connected from the host
+                                   millennium.stealth.net.
+
+   PRIVMSG kalt%millennium.stealth.net :Do you like cheese?
+                                   ; Message to a user on the local
+                                   server with username of "kalt", and
+                                   connected from the host
+                                   millennium.stealth.net.
+
+   PRIVMSG Wiz!jto@tolsun.oulu.fi :Hello !
+                                   ; Message to the user with nickname
+                                   Wiz who is connected from the host
+                                   tolsun.oulu.fi and has the username
+                                   "jto".
+
+   PRIVMSG $*.fi :Server tolsun.oulu.fi rebooting.
+                                   ; Message to everyone on a server
+                                   which has a name matching *.fi.
+
+   PRIVMSG #*.edu :NSFNet is undergoing work, expect interruptions
+                                   ; Message to all users who come from
+                                   a host which has a name matching
+                                   *.edu.
+
+3.3.2 Notice
+
+      Command: NOTICE
+   Parameters: <msgtarget> <text>
+
+   The NOTICE command is used similarly to PRIVMSG.  The difference
+   between NOTICE and PRIVMSG is that automatic replies MUST NEVER be
+   sent in response to a NOTICE message.  This rule applies to servers
+
+
+
+Kalt                         Informational                     [Page 24]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   too - they MUST NOT send any error reply back to the client on
+   receipt of a notice.  The object of this rule is to avoid loops
+   between clients automatically sending something in response to
+   something it received.
+
+   This command is available to services as well as users.
+
+   This is typically used by services, and automatons (clients with
+   either an AI or other interactive program controlling their actions).
+
+   See PRIVMSG for more details on replies and examples.
+
+3.4 Server queries and commands
+
+   The server query group of commands has been designed to return
+   information about any server which is connected to the network.
+
+   In these queries, where a parameter appears as <target>, wildcard
+   masks are usually valid.  For each parameter, however, only one query
+   and set of replies is to be generated.  In most cases, if a nickname
+   is given, it will mean the server to which the user is connected.
+
+   These messages typically have little value for services, it is
+   therefore RECOMMENDED to forbid services from using them.
+
+3.4.1 Motd message
+
+      Command: MOTD
+   Parameters: [ <target> ]
+
+   The MOTD command is used to get the "Message Of The Day" of the given
+   server, or current server if <target> is omitted.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+           RPL_MOTDSTART                   RPL_MOTD
+           RPL_ENDOFMOTD                   ERR_NOMOTD
+
+3.4.2 Lusers message
+
+      Command: LUSERS
+   Parameters: [ <mask> [ <target> ] ]
+
+   The LUSERS command is used to get statistics about the size of the
+   IRC network.  If no parameter is given, the reply will be about the
+   whole net.  If a <mask> is specified, then the reply will only
+
+
+
+
+Kalt                         Informational                     [Page 25]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   concern the part of the network formed by the servers matching the
+   mask.  Finally, if the <target> parameter is specified, the request
+   is forwarded to that server which will generate the reply.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           RPL_LUSERCLIENT                 RPL_LUSEROP
+           RPL_LUSERUNKOWN                 RPL_LUSERCHANNELS
+           RPL_LUSERME                     ERR_NOSUCHSERVER
+
+3.4.3 Version message
+
+      Command: VERSION
+   Parameters: [ <target> ]
+
+   The VERSION command is used to query the version of the server
+   program.  An optional parameter <target> is used to query the version
+   of the server program which a client is not directly connected to.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER                RPL_VERSION
+
+   Examples:
+
+   VERSION tolsun.oulu.fi          ; Command to check the version of
+                                   server "tolsun.oulu.fi".
+
+3.4.4 Stats message
+
+      Command: STATS
+   Parameters: [ <query> [ <target> ] ]
+
+   The stats command is used to query statistics of certain server.  If
+   <query> parameter is omitted, only the end of stats reply is sent
+   back.
+
+   A query may be given for any single letter which is only checked by
+   the destination server and is otherwise passed on by intermediate
+   servers, ignored and unaltered.
+
+   Wildcards are allowed in the <target> parameter.
+
+
+
+
+
+Kalt                         Informational                     [Page 26]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Except for the ones below, the list of valid queries is
+   implementation dependent.  The standard queries below SHOULD be
+   supported by the server:
+
+            l - returns a list of the server's connections, showing how
+                long each connection has been established and the
+                traffic over that connection in Kbytes and messages for
+                each direction;
+            m - returns the usage count for each of commands supported
+                by the server; commands for which the usage count is
+                zero MAY be omitted;
+            o - returns a list of configured privileged users,
+                operators;
+            u - returns a string showing how long the server has been
+                up.
+
+   It is also RECOMMENDED that client and server access configuration be
+   published this way.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+           RPL_STATSLINKINFO                RPL_STATSUPTIME
+           RPL_STATSCOMMANDS                RPL_STATSOLINE
+           RPL_ENDOFSTATS
+
+   Examples:
+
+   STATS m                         ; Command to check the command usage
+                                   for the server you are connected to
+
+3.4.5 Links message
+
+      Command: LINKS
+   Parameters: [ [ <remote server> ] <server mask> ]
+
+   With LINKS, a user can list all servernames, which are known by the
+   server answering the query.  The returned list of servers MUST match
+   the mask, or if no mask is given, the full list is returned.
+
+   If <remote server> is given in addition to <server mask>, the LINKS
+   command is forwarded to the first server found that matches that name
+   (if any), and that server is then required to answer the query.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+           RPL_LINKS                        RPL_ENDOFLINKS
+
+
+
+Kalt                         Informational                     [Page 27]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   LINKS *.au                      ; Command to list all servers which
+                                   have a name that matches *.au;
+
+   LINKS *.edu *.bu.edu            ; Command to list servers matching
+                                   *.bu.edu as seen by the first server
+                                   matching *.edu.
+
+3.4.6 Time message
+
+      Command: TIME
+   Parameters: [ <target> ]
+
+   The time command is used to query local time from the specified
+   server. If the <target> parameter is not given, the server receiving
+   the command must reply to the query.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER              RPL_TIME
+
+   Examples:
+   TIME tolsun.oulu.fi             ; check the time on the server
+                                   "tolson.oulu.fi"
+
+3.4.7 Connect message
+
+      Command: CONNECT
+   Parameters: <target server> <port> [ <remote server> ]
+
+   The CONNECT command can be used to request a server to try to
+   establish a new connection to another server immediately.  CONNECT is
+   a privileged command and SHOULD be available only to IRC Operators.
+   If a <remote server> is given and its mask doesn't match name of the
+   parsing server, the CONNECT attempt is sent to the first match of
+   remote server. Otherwise the CONNECT attempt is made by the server
+   processing the request.
+
+   The server receiving a remote CONNECT command SHOULD generate a
+   WALLOPS message describing the source and target of the request.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER              ERR_NOPRIVILEGES
+           ERR_NEEDMOREPARAMS
+
+
+
+Kalt                         Informational                     [Page 28]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   CONNECT tolsun.oulu.fi 6667     ; Command to attempt to connect local
+                                   server to tolsun.oulu.fi on port 6667
+
+3.4.8 Trace message
+
+      Command: TRACE
+   Parameters: [ <target> ]
+
+   TRACE command is used to find the route to specific server and
+   information about its peers.  Each server that processes this command
+   MUST report to the sender about it.  The replies from pass-through
+   links form a chain, which shows route to destination.  After sending
+   this reply back, the query MUST be sent to the next server until
+   given <target> server is reached.
+
+   TRACE command is used to find the route to specific server.  Each
+   server that processes this message MUST tell the sender about it by
+   sending a reply indicating it is a pass-through link, forming a chain
+   of replies.  After sending this reply back, it MUST then send the
+   TRACE message to the next server until given server is reached.  If
+   the <target> parameter is omitted, it is RECOMMENDED that TRACE
+   command sends a message to the sender telling which servers the local
+   server has direct connection to.
+
+   If the destination given by <target> is an actual server, the
+   destination server is REQUIRED to report all servers, services and
+   operators which are connected to it; if the command was issued by an
+   operator, the server MAY also report all users which are connected to
+   it.  If the destination given by <target> is a nickname, then only a
+   reply for that nickname is given.  If the <target> parameter is
+   omitted, it is RECOMMENDED that the TRACE command is parsed as
+   targeted to the processing server.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+
+      If the TRACE message is destined for another server, all
+      intermediate servers must return a RPL_TRACELINK reply to indicate
+      that the TRACE passed through it and where it is going next.
+
+           RPL_TRACELINK
+
+
+
+
+
+Kalt                         Informational                     [Page 29]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+      A TRACE reply may be composed of any number of the following
+      numeric replies.
+
+           RPL_TRACECONNECTING           RPL_TRACEHANDSHAKE
+           RPL_TRACEUNKNOWN              RPL_TRACEOPERATOR
+           RPL_TRACEUSER                 RPL_TRACESERVER
+           RPL_TRACESERVICE              RPL_TRACENEWTYPE
+           RPL_TRACECLASS                RPL_TRACELOG
+           RPL_TRACEEND
+
+   Examples:
+
+   TRACE *.oulu.fi                 ; TRACE to a server matching
+                                   *.oulu.fi
+
+3.4.9 Admin command
+
+      Command: ADMIN
+   Parameters: [ <target> ]
+
+   The admin command is used to find information about the administrator
+   of the given server, or current server if <target> parameter is
+   omitted.  Each server MUST have the ability to forward ADMIN messages
+   to other servers.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+           RPL_ADMINME                   RPL_ADMINLOC1
+           RPL_ADMINLOC2                 RPL_ADMINEMAIL
+
+   Examples:
+
+   ADMIN tolsun.oulu.fi            ; request an ADMIN reply from
+                                   tolsun.oulu.fi
+
+   ADMIN syrk                      ; ADMIN request for the server to
+                                   which the user syrk is connected
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 30]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.4.10 Info command
+
+      Command: INFO
+   Parameters: [ <target> ]
+
+   The INFO command is REQUIRED to return information describing the
+   server: its version, when it was compiled, the patchlevel, when it
+   was started, and any other miscellaneous information which may be
+   considered to be relevant.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+           RPL_INFO                      RPL_ENDOFINFO
+
+   Examples:
+
+   INFO csd.bu.edu                 ; request an INFO reply from
+                                   csd.bu.edu
+
+   INFO Angel                      ; request info from the server that
+                                   Angel is connected to.
+
+3.5 Service Query and Commands
+
+   The service query group of commands has been designed to return
+   information about any service which is connected to the network.
+
+3.5.1 Servlist message
+
+      Command: SERVLIST
+   Parameters: [ <mask> [ <type> ] ]
+
+   The SERVLIST command is used to list services currently connected to
+   the network and visible to the user issuing the command.  The
+   optional parameters may be used to restrict the result of the query
+   (to matching services names, and services type).
+
+   Numeric Replies:
+
+           RPL_SERVLIST                  RPL_SERVLISTEND
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 31]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.5.2 Squery
+
+      Command: SQUERY
+   Parameters: <servicename> <text>
+
+   The SQUERY command is used similarly to PRIVMSG.  The only difference
+   is that the recipient MUST be a service.  This is the only way for a
+   text message to be delivered to a service.
+
+   See PRIVMSG for more details on replies and example.
+
+   Examples:
+
+   SQUERY irchelp :HELP privmsg
+                                   ; Message to the service with
+                                   nickname irchelp.
+
+   SQUERY dict@irc.fr :fr2en blaireau
+                                   ; Message to the service with name
+                                   dict@irc.fr.
+
+3.6 User based queries
+
+   User queries are a group of commands which are primarily concerned
+   with finding details on a particular user or group users.  When using
+   wildcards with any of these commands, if they match, they will only
+   return information on users who are 'visible' to you.  The visibility
+   of a user is determined as a combination of the user's mode and the
+   common set of channels you are both on.
+
+   Although services SHOULD NOT be using this class of message, they are
+   allowed to.
+
+3.6.1 Who query
+
+      Command: WHO
+   Parameters: [ <mask> [ "o" ] ]
+
+   The WHO command is used by a client to generate a query which returns
+   a list of information which 'matches' the <mask> parameter given by
+   the client.  In the absence of the <mask> parameter, all visible
+   (users who aren't invisible (user mode +i) and who don't have a
+   common channel with the requesting client) are listed.  The same
+   result can be achieved by using a <mask> of "0" or any wildcard which
+   will end up matching every visible user.
+
+   The <mask> passed to WHO is matched against users' host, server, real
+   name and nickname if the channel <mask> cannot be found.
+
+
+
+Kalt                         Informational                     [Page 32]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   If the "o" parameter is passed only operators are returned according
+   to the <mask> supplied.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER
+           RPL_WHOREPLY                  RPL_ENDOFWHO
+
+   Examples:
+
+   WHO *.fi                        ; Command to list all users who match
+                                   against "*.fi".
+
+   WHO jto* o                      ; Command to list all users with a
+                                   match against "jto*" if they are an
+                                   operator.
+
+3.6.2 Whois query
+
+      Command: WHOIS
+   Parameters: [ <target> ] <mask> *( "," <mask> )
+
+   This command is used to query information about particular user.
+   The server will answer this command with several numeric messages
+   indicating different statuses of each user which matches the mask (if
+   you are entitled to see them).  If no wildcard is present in the
+   <mask>, any information about that nick which you are allowed to see
+   is presented.
+
+   If the <target> parameter is specified, it sends the query to a
+   specific server.  It is useful if you want to know how long the user
+   in question has been idle as only local server (i.e., the server the
+   user is directly connected to) knows that information, while
+   everything else is globally known.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER              ERR_NONICKNAMEGIVEN
+           RPL_WHOISUSER                 RPL_WHOISCHANNELS
+           RPL_WHOISCHANNELS             RPL_WHOISSERVER
+           RPL_AWAY                      RPL_WHOISOPERATOR
+           RPL_WHOISIDLE                 ERR_NOSUCHNICK
+           RPL_ENDOFWHOIS
+
+
+
+
+
+
+Kalt                         Informational                     [Page 33]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   WHOIS wiz                       ; return available user information
+                                   about nick WiZ
+
+   WHOIS eff.org trillian          ; ask server eff.org for user
+                                   information  about trillian
+
+3.6.3 Whowas
+
+      Command: WHOWAS
+   Parameters: <nickname> *( "," <nickname> ) [ <count> [ <target> ] ]
+
+   Whowas asks for information about a nickname which no longer exists.
+   This may either be due to a nickname change or the user leaving IRC.
+   In response to this query, the server searches through its nickname
+   history, looking for any nicks which are lexically the same (no wild
+   card matching here).  The history is searched backward, returning the
+   most recent entry first.  If there are multiple entries, up to
+   <count> replies will be returned (or all of them if no <count>
+   parameter is given).  If a non-positive number is passed as being
+   <count>, then a full search is done.
+
+   Wildcards are allowed in the <target> parameter.
+
+   Numeric Replies:
+
+           ERR_NONICKNAMEGIVEN           ERR_WASNOSUCHNICK
+           RPL_WHOWASUSER                RPL_WHOISSERVER
+           RPL_ENDOFWHOWAS
+
+   Examples:
+
+   WHOWAS Wiz                      ; return all information in the nick
+                                   history about nick "WiZ";
+
+   WHOWAS Mermaid 9                ; return at most, the 9 most recent
+                                   entries in the nick history for
+                                   "Mermaid";
+
+   WHOWAS Trillian 1 *.edu         ; return the most recent history for
+                                   "Trillian" from the first server
+                                   found to match "*.edu".
+
+3.7 Miscellaneous messages
+
+   Messages in this category do not fit into any of the above categories
+   but are nonetheless still a part of and REQUIRED by the protocol.
+
+
+
+Kalt                         Informational                     [Page 34]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.7.1 Kill message
+
+      Command: KILL
+   Parameters: <nickname> <comment>
+
+   The KILL command is used to cause a client-server connection to be
+   closed by the server which has the actual connection.  Servers
+   generate KILL messages on nickname collisions.  It MAY also be
+   available available to users who have the operator status.
+
+   Clients which have automatic reconnect algorithms effectively make
+   this command useless since the disconnection is only brief.  It does
+   however break the flow of data and can be used to stop large amounts
+   of 'flooding' from abusive users or accidents.  Abusive users usually
+   don't care as they will reconnect promptly and resume their abusive
+   behaviour.  To prevent this command from being abused, any user may
+   elect to receive KILL messages generated for others to keep an 'eye'
+   on would be trouble spots.
+
+   In an arena where nicknames are REQUIRED to be globally unique at all
+   times, KILL messages are sent whenever 'duplicates' are detected
+   (that is an attempt to register two users with the same nickname) in
+   the hope that both of them will disappear and only 1 reappear.
+
+   When a client is removed as the result of a KILL message, the server
+   SHOULD add the nickname to the list of unavailable nicknames in an
+   attempt to avoid clients to reuse this name immediately which is
+   usually the pattern of abusive behaviour often leading to useless
+   "KILL loops".  See the "IRC Server Protocol" document [IRC-SERVER]
+   for more information on this procedure.
+
+   The comment given MUST reflect the actual reason for the KILL.  For
+   server-generated KILLs it usually is made up of details concerning
+   the origins of the two conflicting nicknames.  For users it is left
+   up to them to provide an adequate reason to satisfy others who see
+   it.  To prevent/discourage fake KILLs from being generated to hide
+   the identify of the KILLer, the comment also shows a 'kill-path'
+   which is updated by each server it passes through, each prepending
+   its name to the path.
+
+   Numeric Replies:
+
+           ERR_NOPRIVILEGES              ERR_NEEDMOREPARAMS
+           ERR_NOSUCHNICK                ERR_CANTKILLSERVER
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 35]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   NOTE:
+   It is RECOMMENDED that only Operators be allowed to kill other users
+   with KILL command.  This command has been the subject of many
+   controversies over the years, and along with the above
+   recommendation, it is also widely recognized that not even operators
+   should be allowed to kill users on remote servers.
+
+3.7.2 Ping message
+
+      Command: PING
+   Parameters: <server1> [ <server2> ]
+
+   The PING command is used to test the presence of an active client or
+   server at the other end of the connection.  Servers send a PING
+   message at regular intervals if no other activity detected coming
+   from a connection.  If a connection fails to respond to a PING
+   message within a set amount of time, that connection is closed.  A
+   PING message MAY be sent even if the connection is active.
+
+   When a PING message is received, the appropriate PONG message MUST be
+   sent as reply to <server1> (server which sent the PING message out)
+   as soon as possible.  If the <server2> parameter is specified, it
+   represents the target of the ping, and the message gets forwarded
+   there.
+
+   Numeric Replies:
+
+           ERR_NOORIGIN                  ERR_NOSUCHSERVER
+
+   Examples:
+
+   PING tolsun.oulu.fi             ; Command to send a PING message to
+                                   server
+
+   PING WiZ tolsun.oulu.fi         ; Command from WiZ to send a PING
+                                   message to server "tolsun.oulu.fi"
+
+   PING :irc.funet.fi              ; Ping message sent by server
+                                   "irc.funet.fi"
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 36]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+3.7.3 Pong message
+
+      Command: PONG
+   Parameters: <server> [ <server2> ]
+
+   PONG message is a reply to ping message.  If parameter <server2> is
+   given, this message MUST be forwarded to given target.  The <server>
+   parameter is the name of the entity who has responded to PING message
+   and generated this message.
+
+   Numeric Replies:
+
+           ERR_NOORIGIN                  ERR_NOSUCHSERVER
+
+   Example:
+
+   PONG csd.bu.edu tolsun.oulu.fi  ; PONG message from csd.bu.edu to
+                                   tolsun.oulu.fi
+
+3.7.4 Error
+
+      Command: ERROR
+   Parameters: <error message>
+
+   The ERROR command is for use by servers when reporting a serious or
+   fatal error to its peers.  It may also be sent from one server to
+   another but MUST NOT be accepted from any normal unknown clients.
+
+   Only an ERROR message SHOULD be used for reporting errors which occur
+   with a server-to-server link.  An ERROR message is sent to the server
+   at the other end (which reports it to appropriate local users and
+   logs) and to appropriate local users and logs.  It is not to be
+   passed onto any other servers by a server if it is received from a
+   server.
+
+   The ERROR message is also used before terminating a client
+   connection.
+
+   When a server sends a received ERROR message to its operators, the
+   message SHOULD be encapsulated inside a NOTICE message, indicating
+   that the client was not responsible for the error.
+
+   Numerics:
+
+           None.
+
+
+
+
+
+
+Kalt                         Informational                     [Page 37]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   ERROR :Server *.fi already exists ; ERROR message to the other server
+                                   which caused this error.
+
+   NOTICE WiZ :ERROR from csd.bu.edu -- Server *.fi already exists
+                                   ; Same ERROR message as above but
+                                   sent to user WiZ on the other server.
+
+4. Optional features
+
+   This section describes OPTIONAL messages.  They are not required in a
+   working server implementation of the protocol described herein.  In
+   the absence of the feature, an error reply message MUST be generated
+   or an unknown command error.  If the message is destined for another
+   server to answer then it MUST be passed on (elementary parsing
+   REQUIRED) The allocated numerics for this are listed with the
+   messages below.
+
+   From this section, only the USERHOST and ISON messages are available
+   to services.
+
+4.1 Away
+
+      Command: AWAY
+   Parameters: [ <text> ]
+
+   With the AWAY command, clients can set an automatic reply string for
+   any PRIVMSG commands directed at them (not to a channel they are on).
+   The server sends an automatic reply to the client sending the PRIVMSG
+   command.  The only replying server is the one to which the sending
+   client is connected to.
+
+   The AWAY command is used either with one parameter, to set an AWAY
+   message, or with no parameters, to remove the AWAY message.
+
+   Because of its high cost (memory and bandwidth wise), the AWAY
+   message SHOULD only be used for client-server communication.  A
+   server MAY choose to silently ignore AWAY messages received from
+   other servers.  To update the away status of a client across servers,
+   the user mode 'a' SHOULD be used instead.  (See Section 3.1.5)
+
+   Numeric Replies:
+
+           RPL_UNAWAY                    RPL_NOWAWAY
+
+
+
+
+
+
+Kalt                         Informational                     [Page 38]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Example:
+
+   AWAY :Gone to lunch.  Back in 5 ; Command to set away message to
+                                   "Gone to lunch.  Back in 5".
+
+4.2 Rehash message
+
+      Command: REHASH
+   Parameters: None
+
+   The rehash command is an administrative command which can be used by
+   an operator to force the server to re-read and process its
+   configuration file.
+
+   Numeric Replies:
+
+           RPL_REHASHING                 ERR_NOPRIVILEGES
+
+
+   Example:
+
+   REHASH                          ; message from user with operator
+                                   status to server asking it to reread
+                                   its configuration file.
+
+4.3 Die message
+
+      Command: DIE
+   Parameters: None
+
+   An operator can use the DIE command to shutdown the server.  This
+   message is optional since it may be viewed as a risk to allow
+   arbitrary people to connect to a server as an operator and execute
+   this command.
+
+   The DIE command MUST always be fully processed by the server to which
+   the sending client is connected and MUST NOT be passed onto other
+   connected servers.
+
+   Numeric Replies:
+
+           ERR_NOPRIVILEGES
+
+   Example:
+
+   DIE                             ; no parameters required.
+
+
+
+
+
+Kalt                         Informational                     [Page 39]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+4.4 Restart message
+
+      Command: RESTART
+   Parameters: None
+
+   An operator can use the restart command to force the server to
+   restart itself.  This message is optional since it may be viewed as a
+   risk to allow arbitrary people to connect to a server as an operator
+   and execute this command, causing (at least) a disruption to service.
+
+   The RESTART command MUST always be fully processed by the server to
+   which the sending client is connected and MUST NOT be passed onto
+   other connected servers.
+
+   Numeric Replies:
+
+           ERR_NOPRIVILEGES
+
+   Example:
+
+   RESTART                         ; no parameters required.
+
+4.5 Summon message
+
+      Command: SUMMON
+   Parameters: <user> [ <target> [ <channel> ] ]
+
+   The SUMMON command can be used to give users who are on a host
+   running an IRC server a message asking them to please join IRC.  This
+   message is only sent if the target server (a) has SUMMON enabled, (b)
+   the user is logged in and (c) the server process can write to the
+   user's tty (or similar).
+
+   If no <server> parameter is given it tries to summon <user> from the
+   server the client is connected to is assumed as the target.
+
+   If summon is not enabled in a server, it MUST return the
+   ERR_SUMMONDISABLED numeric.
+
+   Numeric Replies:
+
+           ERR_NORECIPIENT               ERR_FILEERROR
+           ERR_NOLOGIN                   ERR_NOSUCHSERVER
+           ERR_SUMMONDISABLED            RPL_SUMMONING
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 40]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   Examples:
+
+   SUMMON jto                      ; summon user jto on the server's
+                                   host
+
+   SUMMON jto tolsun.oulu.fi       ; summon user jto on the host which a
+                                   server named "tolsun.oulu.fi" is
+                                   running.
+
+4.6 Users
+
+      Command: USERS
+   Parameters: [ <target> ]
+
+   The USERS command returns a list of users logged into the server in a
+   format similar to the UNIX commands who(1), rusers(1) and finger(1).
+   If disabled, the correct numeric MUST be returned to indicate this.
+
+   Because of the security implications of such a command, it SHOULD be
+   disabled by default in server implementations.  Enabling it SHOULD
+   require recompiling the server or some equivalent change rather than
+   simply toggling an option and restarting the server.  The procedure
+   to enable this command SHOULD also include suitable large comments.
+
+   Numeric Replies:
+
+           ERR_NOSUCHSERVER              ERR_FILEERROR
+           RPL_USERSSTART                RPL_USERS
+           RPL_NOUSERS                   RPL_ENDOFUSERS
+           ERR_USERSDISABLED
+
+   Disabled Reply:
+
+           ERR_USERSDISABLED
+
+   Example:
+
+   USERS eff.org                   ; request a list of users logged in
+                                   on server eff.org
+
+4.7 Operwall message
+
+      Command: WALLOPS
+   Parameters: <Text to be sent>
+
+   The WALLOPS command is used to send a message to all currently
+   connected users who have set the 'w' user mode for themselves.  (See
+   Section 3.1.5 "User modes").
+
+
+
+Kalt                         Informational                     [Page 41]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   After implementing WALLOPS as a user command it was found that it was
+   often and commonly abused as a means of sending a message to a lot of
+   people.  Due to this, it is RECOMMENDED that the implementation of
+   WALLOPS allows and recognizes only servers as the originators of
+   WALLOPS.
+
+   Numeric Replies:
+
+           ERR_NEEDMOREPARAMS
+
+   Example:
+
+   :csd.bu.edu WALLOPS :Connect '*.uiuc.edu 6667' from Joshua ; WALLOPS
+                                   message from csd.bu.edu announcing a
+                                   CONNECT message it received from
+                                   Joshua and acted upon.
+
+4.8 Userhost message
+
+      Command: USERHOST
+   Parameters: <nickname> *( SPACE <nickname> )
+
+   The USERHOST command takes a list of up to 5 nicknames, each
+   separated by a space character and returns a list of information
+   about each nickname that it found.  The returned list has each reply
+   separated by a space.
+
+   Numeric Replies:
+
+           RPL_USERHOST                  ERR_NEEDMOREPARAMS
+
+   Example:
+
+   USERHOST Wiz Michael syrk       ; USERHOST request for information on
+                                   nicks "Wiz", "Michael", and "syrk"
+
+   :ircd.stealth.net 302 yournick :syrk=+syrk@millennium.stealth.net
+                                   ; Reply for user syrk
+
+4.9 Ison message
+
+      Command: ISON
+   Parameters: <nickname> *( SPACE <nickname> )
+
+   The ISON command was implemented to provide a quick and efficient
+   means to get a response about whether a given nickname was currently
+   on IRC. ISON only takes one (1) type of parameter: a space-separated
+   list of nicks.  For each nickname in the list that is present, the
+
+
+
+Kalt                         Informational                     [Page 42]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   server adds that to its reply string.  Thus the reply string may
+   return empty (none of the given nicks are present), an exact copy of
+   the parameter string (all of them present) or any other subset of the
+   set of nicks given in the parameter.  The only limit on the number of
+   nicks that may be checked is that the combined length MUST NOT be too
+   large as to cause the server to chop it off so it fits in 512
+   characters.
+
+   ISON is only processed by the server local to the client sending the
+   command and thus not passed onto other servers for further
+   processing.
+
+   Numeric Replies:
+
+           RPL_ISON                      ERR_NEEDMOREPARAMS
+
+   Example:
+
+   ISON phone trillian WiZ jarlek Avalon Angel Monstah syrk
+                                   ; Sample ISON request for 7 nicks.
+
+5. Replies
+
+   The following is a list of numeric replies which are generated in
+   response to the commands given above.  Each numeric is given with its
+   number, name and reply string.
+
+5.1 Command responses
+
+   Numerics in the range from 001 to 099 are used for client-server
+   connections only and should never travel between servers.  Replies
+   generated in the response to commands are found in the range from 200
+   to 399.
+
+       001    RPL_WELCOME
+              "Welcome to the Internet Relay Network
+               <nick>!<user>@<host>"
+       002    RPL_YOURHOST
+              "Your host is <servername>, running version <ver>"
+       003    RPL_CREATED
+              "This server was created <date>"
+       004    RPL_MYINFO
+              "<servername> <version> <available user modes>
+               <available channel modes>"
+
+         - The server sends Replies 001 to 004 to a user upon
+           successful registration.
+
+
+
+
+Kalt                         Informational                     [Page 43]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       005    RPL_BOUNCE
+              "Try server <server name>, port <port number>"
+
+         - Sent by the server to a user to suggest an alternative
+           server.  This is often used when the connection is
+           refused because the server is already full.
+
+       302    RPL_USERHOST
+              ":*1<reply> *( " " <reply> )"
+
+         - Reply format used by USERHOST to list replies to
+           the query list.  The reply string is composed as
+           follows:
+
+           reply = nickname [ "*" ] "=" ( "+" / "-" ) hostname
+
+           The '*' indicates whether the client has registered
+           as an Operator.  The '-' or '+' characters represent
+           whether the client has set an AWAY message or not
+           respectively.
+
+       303    RPL_ISON
+              ":*1<nick> *( " " <nick> )"
+
+         - Reply format used by ISON to list replies to the
+           query list.
+
+       301    RPL_AWAY
+              "<nick> :<away message>"
+       305    RPL_UNAWAY
+              ":You are no longer marked as being away"
+       306    RPL_NOWAWAY
+              ":You have been marked as being away"
+
+         - These replies are used with the AWAY command (if
+           allowed).  RPL_AWAY is sent to any client sending a
+           PRIVMSG to a client which is away.  RPL_AWAY is only
+           sent by the server to which the client is connected.
+           Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the
+           client removes and sets an AWAY message.
+
+       311    RPL_WHOISUSER
+              "<nick> <user> <host> * :<real name>"
+       312    RPL_WHOISSERVER
+              "<nick> <server> :<server info>"
+       313    RPL_WHOISOPERATOR
+              "<nick> :is an IRC operator"
+
+
+
+
+Kalt                         Informational                     [Page 44]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       317    RPL_WHOISIDLE
+              "<nick> <integer> :seconds idle"
+       318    RPL_ENDOFWHOIS
+              "<nick> :End of WHOIS list"
+       319    RPL_WHOISCHANNELS
+              "<nick> :*( ( "@" / "+" ) <channel> " " )"
+
+         - Replies 311 - 313, 317 - 319 are all replies
+           generated in response to a WHOIS message.  Given that
+           there are enough parameters present, the answering
+           server MUST either formulate a reply out of the above
+           numerics (if the query nick is found) or return an
+           error reply.  The '*' in RPL_WHOISUSER is there as
+           the literal character and not as a wild card.  For
+           each reply set, only RPL_WHOISCHANNELS may appear
+           more than once (for long lists of channel names).
+           The '@' and '+' characters next to the channel name
+           indicate whether a client is a channel operator or
+           has been granted permission to speak on a moderated
+           channel.  The RPL_ENDOFWHOIS reply is used to mark
+           the end of processing a WHOIS message.
+
+       314    RPL_WHOWASUSER
+              "<nick> <user> <host> * :<real name>"
+       369    RPL_ENDOFWHOWAS
+              "<nick> :End of WHOWAS"
+
+         - When replying to a WHOWAS message, a server MUST use
+           the replies RPL_WHOWASUSER, RPL_WHOISSERVER or
+           ERR_WASNOSUCHNICK for each nickname in the presented
+           list.  At the end of all reply batches, there MUST
+           be RPL_ENDOFWHOWAS (even if there was only one reply
+           and it was an error).
+
+       321    RPL_LISTSTART
+              Obsolete. Not used.
+
+       322    RPL_LIST
+              "<channel> <# visible> :<topic>"
+       323    RPL_LISTEND
+              ":End of LIST"
+
+         - Replies RPL_LIST, RPL_LISTEND mark the actual replies
+           with data and end of the server's response to a LIST
+           command.  If there are no channels available to return,
+           only the end reply MUST be sent.
+
+
+
+
+
+Kalt                         Informational                     [Page 45]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       325    RPL_UNIQOPIS
+              "<channel> <nickname>"
+
+       324    RPL_CHANNELMODEIS
+              "<channel> <mode> <mode params>"
+
+       331    RPL_NOTOPIC
+              "<channel> :No topic is set"
+       332    RPL_TOPIC
+              "<channel> :<topic>"
+
+         - When sending a TOPIC message to determine the
+           channel topic, one of two replies is sent.  If
+           the topic is set, RPL_TOPIC is sent back else
+           RPL_NOTOPIC.
+
+       341    RPL_INVITING
+              "<channel> <nick>"
+
+         - Returned by the server to indicate that the
+           attempted INVITE message was successful and is
+           being passed onto the end client.
+
+       342    RPL_SUMMONING
+              "<user> :Summoning user to IRC"
+
+         - Returned by a server answering a SUMMON message to
+           indicate that it is summoning that user.
+
+       346    RPL_INVITELIST
+              "<channel> <invitemask>"
+       347    RPL_ENDOFINVITELIST
+              "<channel> :End of channel invite list"
+
+         - When listing the 'invitations masks' for a given channel,
+           a server is required to send the list back using the
+           RPL_INVITELIST and RPL_ENDOFINVITELIST messages.  A
+           separate RPL_INVITELIST is sent for each active mask.
+           After the masks have been listed (or if none present) a
+           RPL_ENDOFINVITELIST MUST be sent.
+
+       348    RPL_EXCEPTLIST
+              "<channel> <exceptionmask>"
+       349    RPL_ENDOFEXCEPTLIST
+              "<channel> :End of channel exception list"
+
+
+
+
+
+
+Kalt                         Informational                     [Page 46]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+         - When listing the 'exception masks' for a given channel,
+           a server is required to send the list back using the
+           RPL_EXCEPTLIST and RPL_ENDOFEXCEPTLIST messages.  A
+           separate RPL_EXCEPTLIST is sent for each active mask.
+           After the masks have been listed (or if none present)
+           a RPL_ENDOFEXCEPTLIST MUST be sent.
+
+       351    RPL_VERSION
+              "<version>.<debuglevel> <server> :<comments>"
+
+         - Reply by the server showing its version details.
+           The <version> is the version of the software being
+           used (including any patchlevel revisions) and the
+           <debuglevel> is used to indicate if the server is
+           running in "debug mode".
+
+           The "comments" field may contain any comments about
+           the version or further version details.
+
+       352    RPL_WHOREPLY
+              "<channel> <user> <host> <server> <nick>
+              ( "H" / "G" > ["*"] [ ( "@" / "+" ) ]
+              :<hopcount> <real name>"
+
+       315    RPL_ENDOFWHO
+              "<name> :End of WHO list"
+
+         - The RPL_WHOREPLY and RPL_ENDOFWHO pair are used
+           to answer a WHO message.  The RPL_WHOREPLY is only
+           sent if there is an appropriate match to the WHO
+           query.  If there is a list of parameters supplied
+           with a WHO message, a RPL_ENDOFWHO MUST be sent
+           after processing each list item with <name> being
+           the item.
+
+       353    RPL_NAMREPLY
+              "( "=" / "*" / "@" ) <channel>
+               :[ "@" / "+" ] <nick> *( " " [ "@" / "+" ] <nick> )
+         - "@" is used for secret channels, "*" for private
+           channels, and "=" for others (public channels).
+
+       366    RPL_ENDOFNAMES
+              "<channel> :End of NAMES list"
+
+         - To reply to a NAMES message, a reply pair consisting
+           of RPL_NAMREPLY and RPL_ENDOFNAMES is sent by the
+           server back to the client.  If there is no channel
+           found as in the query, then only RPL_ENDOFNAMES is
+
+
+
+Kalt                         Informational                     [Page 47]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+           returned.  The exception to this is when a NAMES
+           message is sent with no parameters and all visible
+           channels and contents are sent back in a series of
+           RPL_NAMEREPLY messages with a RPL_ENDOFNAMES to mark
+           the end.
+
+       364    RPL_LINKS
+              "<mask> <server> :<hopcount> <server info>"
+       365    RPL_ENDOFLINKS
+              "<mask> :End of LINKS list"
+
+         - In replying to the LINKS message, a server MUST send
+           replies back using the RPL_LINKS numeric and mark the
+           end of the list using an RPL_ENDOFLINKS reply.
+
+       367    RPL_BANLIST
+              "<channel> <banmask>"
+       368    RPL_ENDOFBANLIST
+              "<channel> :End of channel ban list"
+
+         - When listing the active 'bans' for a given channel,
+           a server is required to send the list back using the
+           RPL_BANLIST and RPL_ENDOFBANLIST messages.  A separate
+           RPL_BANLIST is sent for each active banmask.  After the
+           banmasks have been listed (or if none present) a
+           RPL_ENDOFBANLIST MUST be sent.
+
+       371    RPL_INFO
+              ":<string>"
+       374    RPL_ENDOFINFO
+              ":End of INFO list"
+
+         - A server responding to an INFO message is required to
+           send all its 'info' in a series of RPL_INFO messages
+           with a RPL_ENDOFINFO reply to indicate the end of the
+           replies.
+
+       375    RPL_MOTDSTART
+              ":- <server> Message of the day - "
+       372    RPL_MOTD
+              ":- <text>"
+       376    RPL_ENDOFMOTD
+              ":End of MOTD command"
+
+         - When responding to the MOTD message and the MOTD file
+           is found, the file is displayed line by line, with
+           each line no longer than 80 characters, using
+
+
+
+
+Kalt                         Informational                     [Page 48]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+           RPL_MOTD format replies.  These MUST be surrounded
+           by a RPL_MOTDSTART (before the RPL_MOTDs) and an
+           RPL_ENDOFMOTD (after).
+
+       381    RPL_YOUREOPER
+              ":You are now an IRC operator"
+
+         - RPL_YOUREOPER is sent back to a client which has
+           just successfully issued an OPER message and gained
+           operator status.
+
+       382    RPL_REHASHING
+              "<config file> :Rehashing"
+
+         - If the REHASH option is used and an operator sends
+           a REHASH message, an RPL_REHASHING is sent back to
+           the operator.
+
+       383    RPL_YOURESERVICE
+              "You are service <servicename>"
+
+         - Sent by the server to a service upon successful
+           registration.
+
+       391    RPL_TIME
+              "<server> :<string showing server's local time>"
+
+         - When replying to the TIME message, a server MUST send
+           the reply using the RPL_TIME format above.  The string
+           showing the time need only contain the correct day and
+           time there.  There is no further requirement for the
+           time string.
+
+       392    RPL_USERSSTART
+              ":UserID   Terminal  Host"
+       393    RPL_USERS
+              ":<username> <ttyline> <hostname>"
+       394    RPL_ENDOFUSERS
+              ":End of users"
+       395    RPL_NOUSERS
+              ":Nobody logged in"
+
+         - If the USERS message is handled by a server, the
+           replies RPL_USERSTART, RPL_USERS, RPL_ENDOFUSERS and
+           RPL_NOUSERS are used.  RPL_USERSSTART MUST be sent
+           first, following by either a sequence of RPL_USERS
+           or a single RPL_NOUSER.  Following this is
+           RPL_ENDOFUSERS.
+
+
+
+Kalt                         Informational                     [Page 49]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       200    RPL_TRACELINK
+              "Link <version & debug level> <destination>
+               <next server> V<protocol version>
+               <link uptime in seconds> <backstream sendq>
+               <upstream sendq>"
+       201    RPL_TRACECONNECTING
+              "Try. <class> <server>"
+       202    RPL_TRACEHANDSHAKE
+              "H.S. <class> <server>"
+       203    RPL_TRACEUNKNOWN
+              "???? <class> [<client IP address in dot form>]"
+       204    RPL_TRACEOPERATOR
+              "Oper <class> <nick>"
+       205    RPL_TRACEUSER
+              "User <class> <nick>"
+       206    RPL_TRACESERVER
+              "Serv <class> <int>S <int>C <server>
+               <nick!user|*!*>@<host|server> V<protocol version>"
+       207    RPL_TRACESERVICE
+              "Service <class> <name> <type> <active type>"
+       208    RPL_TRACENEWTYPE
+              "<newtype> 0 <client name>"
+       209    RPL_TRACECLASS
+              "Class <class> <count>"
+       210    RPL_TRACERECONNECT
+              Unused.
+       261    RPL_TRACELOG
+              "File <logfile> <debug level>"
+       262    RPL_TRACEEND
+              "<server name> <version & debug level> :End of TRACE"
+
+         - The RPL_TRACE* are all returned by the server in
+           response to the TRACE message.  How many are
+           returned is dependent on the TRACE message and
+           whether it was sent by an operator or not.  There
+           is no predefined order for which occurs first.
+           Replies RPL_TRACEUNKNOWN, RPL_TRACECONNECTING and
+           RPL_TRACEHANDSHAKE are all used for connections
+           which have not been fully established and are either
+           unknown, still attempting to connect or in the
+           process of completing the 'server handshake'.
+           RPL_TRACELINK is sent by any server which handles
+           a TRACE message and has to pass it on to another
+           server.  The list of RPL_TRACELINKs sent in
+           response to a TRACE command traversing the IRC
+           network should reflect the actual connectivity of
+           the servers themselves along that path.
+
+
+
+
+Kalt                         Informational                     [Page 50]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+           RPL_TRACENEWTYPE is to be used for any connection
+           which does not fit in the other categories but is
+           being displayed anyway.
+           RPL_TRACEEND is sent to indicate the end of the list.
+
+       211    RPL_STATSLINKINFO
+              "<linkname> <sendq> <sent messages>
+               <sent Kbytes> <received messages>
+               <received Kbytes> <time open>"
+
+         - reports statistics on a connection.  <linkname>
+           identifies the particular connection, <sendq> is
+           the amount of data that is queued and waiting to be
+           sent <sent messages> the number of messages sent,
+           and <sent Kbytes> the amount of data sent, in
+           Kbytes. <received messages> and <received Kbytes>
+           are the equivalent of <sent messages> and <sent
+           Kbytes> for received data, respectively.  <time
+           open> indicates how long ago the connection was
+           opened, in seconds.
+
+       212    RPL_STATSCOMMANDS
+              "<command> <count> <byte count> <remote count>"
+
+         - reports statistics on commands usage.
+
+       219    RPL_ENDOFSTATS
+              "<stats letter> :End of STATS report"
+
+       242    RPL_STATSUPTIME
+              ":Server Up %d days %d:%02d:%02d"
+
+         - reports the server uptime.
+
+       243    RPL_STATSOLINE
+              "O <hostmask> * <name>"
+
+         - reports the allowed hosts from where user may become IRC
+           operators.
+
+       221    RPL_UMODEIS
+              "<user mode string>"
+
+         - To answer a query about a client's own mode,
+           RPL_UMODEIS is sent back.
+
+       234    RPL_SERVLIST
+              "<name> <server> <mask> <type> <hopcount> <info>"
+
+
+
+Kalt                         Informational                     [Page 51]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       235    RPL_SERVLISTEND
+              "<mask> <type> :End of service listing"
+
+         - When listing services in reply to a SERVLIST message,
+           a server is required to send the list back using the
+           RPL_SERVLIST and RPL_SERVLISTEND messages.  A separate
+           RPL_SERVLIST is sent for each service.  After the
+           services have been listed (or if none present) a
+           RPL_SERVLISTEND MUST be sent.
+
+       251    RPL_LUSERCLIENT
+              ":There are <integer> users and <integer>
+               services on <integer> servers"
+       252    RPL_LUSEROP
+              "<integer> :operator(s) online"
+       253    RPL_LUSERUNKNOWN
+              "<integer> :unknown connection(s)"
+       254    RPL_LUSERCHANNELS
+              "<integer> :channels formed"
+       255    RPL_LUSERME
+              ":I have <integer> clients and <integer>
+                servers"
+
+         - In processing an LUSERS message, the server
+           sends a set of replies from RPL_LUSERCLIENT,
+           RPL_LUSEROP, RPL_USERUNKNOWN,
+           RPL_LUSERCHANNELS and RPL_LUSERME.  When
+           replying, a server MUST send back
+           RPL_LUSERCLIENT and RPL_LUSERME.  The other
+           replies are only sent back if a non-zero count
+           is found for them.
+
+       256    RPL_ADMINME
+              "<server> :Administrative info"
+       257    RPL_ADMINLOC1
+              ":<admin info>"
+       258    RPL_ADMINLOC2
+              ":<admin info>"
+       259    RPL_ADMINEMAIL
+              ":<admin info>"
+
+         - When replying to an ADMIN message, a server
+           is expected to use replies RPL_ADMINME
+           through to RPL_ADMINEMAIL and provide a text
+           message with each.  For RPL_ADMINLOC1 a
+           description of what city, state and country
+           the server is in is expected, followed by
+           details of the institution (RPL_ADMINLOC2)
+
+
+
+Kalt                         Informational                     [Page 52]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+           and finally the administrative contact for the
+           server (an email address here is REQUIRED)
+           in RPL_ADMINEMAIL.
+
+       263    RPL_TRYAGAIN
+              "<command> :Please wait a while and try again."
+
+         - When a server drops a command without processing it,
+           it MUST use the reply RPL_TRYAGAIN to inform the
+           originating client.
+
+5.2 Error Replies
+
+       Error replies are found in the range from 400 to 599.
+
+       401    ERR_NOSUCHNICK
+              "<nickname> :No such nick/channel"
+
+          - Used to indicate the nickname parameter supplied to a
+            command is currently unused.
+
+       402    ERR_NOSUCHSERVER
+              "<server name> :No such server"
+
+         - Used to indicate the server name given currently
+           does not exist.
+
+       403    ERR_NOSUCHCHANNEL
+              "<channel name> :No such channel"
+
+         - Used to indicate the given channel name is invalid.
+
+       404    ERR_CANNOTSENDTOCHAN
+              "<channel name> :Cannot send to channel"
+
+         - Sent to a user who is either (a) not on a channel
+           which is mode +n or (b) not a chanop (or mode +v) on
+           a channel which has mode +m set or where the user is
+           banned and is trying to send a PRIVMSG message to
+           that channel.
+
+       405    ERR_TOOMANYCHANNELS
+              "<channel name> :You have joined too many channels"
+
+         - Sent to a user when they have joined the maximum
+           number of allowed channels and they try to join
+           another channel.
+
+
+
+
+Kalt                         Informational                     [Page 53]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       406    ERR_WASNOSUCHNICK
+              "<nickname> :There was no such nickname"
+
+         - Returned by WHOWAS to indicate there is no history
+           information for that nickname.
+
+       407    ERR_TOOMANYTARGETS
+              "<target> :<error code> recipients. <abort message>"
+
+         - Returned to a client which is attempting to send a
+           PRIVMSG/NOTICE using the user@host destination format
+           and for a user@host which has several occurrences.
+
+         - Returned to a client which trying to send a
+           PRIVMSG/NOTICE to too many recipients.
+
+         - Returned to a client which is attempting to JOIN a safe
+           channel using the shortname when there are more than one
+           such channel.
+
+       408    ERR_NOSUCHSERVICE
+              "<service name> :No such service"
+
+         - Returned to a client which is attempting to send a SQUERY
+           to a service which does not exist.
+
+       409    ERR_NOORIGIN
+              ":No origin specified"
+
+         - PING or PONG message missing the originator parameter.
+
+       411    ERR_NORECIPIENT
+              ":No recipient given (<command>)"
+       412    ERR_NOTEXTTOSEND
+              ":No text to send"
+       413    ERR_NOTOPLEVEL
+              "<mask> :No toplevel domain specified"
+       414    ERR_WILDTOPLEVEL
+              "<mask> :Wildcard in toplevel domain"
+       415    ERR_BADMASK
+              "<mask> :Bad Server/host mask"
+
+         - 412 - 415 are returned by PRIVMSG to indicate that
+           the message wasn't delivered for some reason.
+           ERR_NOTOPLEVEL and ERR_WILDTOPLEVEL are errors that
+           are returned when an invalid use of
+           "PRIVMSG $<server>" or "PRIVMSG #<host>" is attempted.
+
+
+
+
+Kalt                         Informational                     [Page 54]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       421    ERR_UNKNOWNCOMMAND
+              "<command> :Unknown command"
+
+         - Returned to a registered client to indicate that the
+           command sent is unknown by the server.
+
+       422    ERR_NOMOTD
+              ":MOTD File is missing"
+
+         - Server's MOTD file could not be opened by the server.
+
+       423    ERR_NOADMININFO
+              "<server> :No administrative info available"
+
+         - Returned by a server in response to an ADMIN message
+           when there is an error in finding the appropriate
+           information.
+
+       424    ERR_FILEERROR
+              ":File error doing <file op> on <file>"
+
+         - Generic error message used to report a failed file
+           operation during the processing of a message.
+
+       431    ERR_NONICKNAMEGIVEN
+              ":No nickname given"
+
+         - Returned when a nickname parameter expected for a
+           command and isn't found.
+
+       432    ERR_ERRONEUSNICKNAME
+              "<nick> :Erroneous nickname"
+
+         - Returned after receiving a NICK message which contains
+           characters which do not fall in the defined set.  See
+           section 2.3.1 for details on valid nicknames.
+
+       433    ERR_NICKNAMEINUSE
+              "<nick> :Nickname is already in use"
+
+         - Returned when a NICK message is processed that results
+           in an attempt to change to a currently existing
+           nickname.
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 55]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       436    ERR_NICKCOLLISION
+              "<nick> :Nickname collision KILL from <user>@<host>"
+
+         - Returned by a server to a client when it detects a
+           nickname collision (registered of a NICK that
+           already exists by another server).
+
+       437    ERR_UNAVAILRESOURCE
+              "<nick/channel> :Nick/channel is temporarily unavailable"
+
+         - Returned by a server to a user trying to join a channel
+           currently blocked by the channel delay mechanism.
+
+         - Returned by a server to a user trying to change nickname
+           when the desired nickname is blocked by the nick delay
+           mechanism.
+
+       441    ERR_USERNOTINCHANNEL
+              "<nick> <channel> :They aren't on that channel"
+
+         - Returned by the server to indicate that the target
+           user of the command is not on the given channel.
+
+       442    ERR_NOTONCHANNEL
+              "<channel> :You're not on that channel"
+
+         - Returned by the server whenever a client tries to
+           perform a channel affecting command for which the
+           client isn't a member.
+
+       443    ERR_USERONCHANNEL
+              "<user> <channel> :is already on channel"
+
+         - Returned when a client tries to invite a user to a
+           channel they are already on.
+
+       444    ERR_NOLOGIN
+              "<user> :User not logged in"
+
+         - Returned by the summon after a SUMMON command for a
+           user was unable to be performed since they were not
+           logged in.
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 56]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       445    ERR_SUMMONDISABLED
+              ":SUMMON has been disabled"
+
+         - Returned as a response to the SUMMON command.  MUST be
+           returned by any server which doesn't implement it.
+
+       446    ERR_USERSDISABLED
+              ":USERS has been disabled"
+
+         - Returned as a response to the USERS command.  MUST be
+           returned by any server which does not implement it.
+
+       451    ERR_NOTREGISTERED
+              ":You have not registered"
+
+         - Returned by the server to indicate that the client
+           MUST be registered before the server will allow it
+           to be parsed in detail.
+
+       461    ERR_NEEDMOREPARAMS
+              "<command> :Not enough parameters"
+
+         - Returned by the server by numerous commands to
+           indicate to the client that it didn't supply enough
+           parameters.
+
+       462    ERR_ALREADYREGISTRED
+              ":Unauthorized command (already registered)"
+
+         - Returned by the server to any link which tries to
+           change part of the registered details (such as
+           password or user details from second USER message).
+
+       463    ERR_NOPERMFORHOST
+              ":Your host isn't among the privileged"
+
+         - Returned to a client which attempts to register with
+           a server which does not been setup to allow
+           connections from the host the attempted connection
+           is tried.
+
+       464    ERR_PASSWDMISMATCH
+              ":Password incorrect"
+
+         - Returned to indicate a failed attempt at registering
+           a connection for which a password was required and
+           was either not given or incorrect.
+
+
+
+
+Kalt                         Informational                     [Page 57]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       465    ERR_YOUREBANNEDCREEP
+              ":You are banned from this server"
+
+         - Returned after an attempt to connect and register
+           yourself with a server which has been setup to
+           explicitly deny connections to you.
+
+       466    ERR_YOUWILLBEBANNED
+
+         - Sent by a server to a user to inform that access to the
+           server will soon be denied.
+
+       467    ERR_KEYSET
+              "<channel> :Channel key already set"
+       471    ERR_CHANNELISFULL
+              "<channel> :Cannot join channel (+l)"
+       472    ERR_UNKNOWNMODE
+              "<char> :is unknown mode char to me for <channel>"
+       473    ERR_INVITEONLYCHAN
+              "<channel> :Cannot join channel (+i)"
+       474    ERR_BANNEDFROMCHAN
+              "<channel> :Cannot join channel (+b)"
+       475    ERR_BADCHANNELKEY
+              "<channel> :Cannot join channel (+k)"
+       476    ERR_BADCHANMASK
+              "<channel> :Bad Channel Mask"
+       477    ERR_NOCHANMODES
+              "<channel> :Channel doesn't support modes"
+       478    ERR_BANLISTFULL
+              "<channel> <char> :Channel list is full"
+
+       481    ERR_NOPRIVILEGES
+              ":Permission Denied- You're not an IRC operator"
+
+         - Any command requiring operator privileges to operate
+           MUST return this error to indicate the attempt was
+           unsuccessful.
+
+       482    ERR_CHANOPRIVSNEEDED
+              "<channel> :You're not channel operator"
+
+         - Any command requiring 'chanop' privileges (such as
+           MODE messages) MUST return this error if the client
+           making the attempt is not a chanop on the specified
+           channel.
+
+
+
+
+
+
+Kalt                         Informational                     [Page 58]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+       483    ERR_CANTKILLSERVER
+              ":You can't kill a server!"
+
+         - Any attempts to use the KILL command on a server
+           are to be refused and this error returned directly
+           to the client.
+
+       484    ERR_RESTRICTED
+              ":Your connection is restricted!"
+
+         - Sent by the server to a user upon connection to indicate
+           the restricted nature of the connection (user mode "+r").
+
+       485    ERR_UNIQOPPRIVSNEEDED
+              ":You're not the original channel operator"
+
+         - Any MODE requiring "channel creator" privileges MUST
+           return this error if the client making the attempt is not
+           a chanop on the specified channel.
+
+       491    ERR_NOOPERHOST
+              ":No O-lines for your host"
+
+         - If a client sends an OPER message and the server has
+           not been configured to allow connections from the
+           client's host as an operator, this error MUST be
+           returned.
+
+       501    ERR_UMODEUNKNOWNFLAG
+              ":Unknown MODE flag"
+
+         - Returned by the server to indicate that a MODE
+           message was sent with a nickname parameter and that
+           the a mode flag sent was not recognized.
+
+       502    ERR_USERSDONTMATCH
+              ":Cannot change mode for other users"
+
+         - Error sent to any user trying to view or change the
+           user mode for a user other than themselves.
+
+5.3 Reserved numerics
+
+   These numerics are not described above since they fall into one of
+   the following categories:
+
+   1. no longer in use;
+
+
+
+
+Kalt                         Informational                     [Page 59]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+   2. reserved for future planned use;
+
+   3. in current use but are part of a non-generic 'feature' of
+      the current IRC server.
+
+            231    RPL_SERVICEINFO     232  RPL_ENDOFSERVICES
+            233    RPL_SERVICE
+            300    RPL_NONE            316  RPL_WHOISCHANOP
+            361    RPL_KILLDONE        362  RPL_CLOSING
+            363    RPL_CLOSEEND        373  RPL_INFOSTART
+            384    RPL_MYPORTIS
+
+            213    RPL_STATSCLINE      214  RPL_STATSNLINE
+            215    RPL_STATSILINE      216  RPL_STATSKLINE
+            217    RPL_STATSQLINE      218  RPL_STATSYLINE
+            240    RPL_STATSVLINE      241  RPL_STATSLLINE
+            244    RPL_STATSHLINE      244  RPL_STATSSLINE
+            246    RPL_STATSPING       247  RPL_STATSBLINE
+            250    RPL_STATSDLINE
+
+            492    ERR_NOSERVICEHOST
+
+6. Current implementations
+
+   The IRC software, version 2.10 is the only complete implementation of
+   the IRC protocol (client and server).  Because of the small amount of
+   changes in the client protocol since the publication of RFC 1459
+   [IRC], implementations that follow it are likely to be compliant with
+   this protocol or to require a small amount of changes to reach
+   compliance.
+
+7. Current problems
+
+   There are a number of recognized problems with the IRC Client
+   Protocol, and more generally with the IRC Server Protocol.  In order
+   to preserve backward compatibility with old clients, this protocol
+   has almost not evolved since the publication of RFC 1459 [IRC].
+
+7.1 Nicknames
+
+   The idea of the nickname on IRC is very convenient for users to use
+   when talking to each other outside of a channel, but there is only a
+   finite nickname space and being what they are, it's not uncommon for
+   several people to want to use the same nick.  If a nickname is chosen
+   by two people using this protocol, either one will not succeed or
+   both will removed by use of a server KILL (See Section 3.7.1).
+
+
+
+
+
+Kalt                         Informational                     [Page 60]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+7.2 Limitation of wildcards
+
+   There is no way to escape the escape character "\" (%x5C).  While
+   this isn't usually a problem, it makes it impossible to form a mask
+   with a backslash character ("\") preceding a wildcard.
+
+7.3 Security considerations
+
+   Security issues related to this protocol are discussed in the "IRC
+   Server Protocol" [IRC-SERVER] as they are mostly an issue for the
+   server side of the connection.
+
+8. Current support and availability
+
+        Mailing lists for IRC related discussion:
+          General discussion: ircd-users@irc.org
+          Protocol development: ircd-dev@irc.org
+
+        Software implementations:
+          ftp://ftp.irc.org/irc/server
+          ftp://ftp.funet.fi/pub/unix/irc
+          ftp://ftp.irc.org/irc/clients
+
+        Newsgroup: alt.irc
+
+9. Acknowledgements
+
+   Parts of this document were copied from the RFC 1459 [IRC] which
+   first formally documented the IRC Protocol.  It has also benefited
+   from many rounds of review and comments.  In particular, the
+   following people have made significant contributions to this
+   document:
+
+   Matthew Green, Michael Neumayer, Volker Paulsen, Kurt Roeckx, Vesa
+   Ruokonen, Magnus Tjernstrom, Stefan Zehl.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 61]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+10. References
+
+   [KEYWORDS]   Bradner, S., "Key words for use in RFCs to Indicate
+                Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [ABNF]       Crocker, D. and P. Overell, "Augmented BNF for Syntax
+                Specifications: ABNF", RFC 2234, November 1997.
+
+   [HNAME]      Braden, R., "Requirements for Internet Hosts --
+                Application and Support", STD 3, RFC 1123, October 1989.
+
+   [IRC]        Oikarinen, J. & D. Reed, "Internet Relay Chat Protocol",
+                RFC 1459, May 1993.
+
+   [IRC-ARCH]   Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
+                April 2000.
+
+   [IRC-CHAN]   Kalt, C., "Internet Relay Chat: Channel Management", RFC
+                2811, April 2000.
+
+   [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
+                2813, April 2000.
+
+11. Author's Address
+
+   Christophe Kalt
+   99 Teaneck Rd, Apt #117
+   Ridgefield Park, NJ 07660
+   USA
+
+   EMail: kalt@stealth.net
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 62]
+
+RFC 2812          Internet Relay Chat: Client Protocol        April 2000
+
+
+12.  Full Copyright Statement
+
+   Copyright (C) The Internet Society (2000).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kalt                         Informational                     [Page 63]
+
diff -uNrd ircd-hybrid-6.0/doc/server-version-info ircd-pi1.0a/doc/server-version-info
--- ircd-hybrid-6.0/doc/server-version-info	Sun Nov 26 23:11:43 2000
+++ ircd-pi1.0a/doc/server-version-info	Wed Dec 31 19:00:00 1969
@@ -1,35 +0,0 @@
-$Id: server-version-info,v 1.3 2000/11/27 04:11:43 lusky Exp $
-Updated for Hybrid 6 (2000/11/26)
-
-When you type /version you will often see something like this:
-*** 2.8/hybrid-6rc6(20001110_1). irc.ins.net.uk ACHiIMpY TS3ow
-
-Ever wondered what those funny chars mean after the version number? Well
-here they are:
-
-'A'	SENDQ_ALWAYS
-'c'	CHROOTDIR
-'C'	CMDLINE_CONFIG
-'d'	DO_ID
-'D'	DEBUGMODE
-'e'	LOCOP_REHASH
-'E'	OPER_REHASH
-'G'	GLINES
-'H'	HUB
-'i'	SHOW_INVISIBLE_LUSERS
-'I'	NO_DEFAULT_INVISIBLE
-'K'	OPER_KILL
-'M'	IDLE_FROM_MSG
-'p'	CRYPT_OPER_PASSWORD
-'P'	CRYPT_LINK_PASSWORD
-'r'	LOCOP_RESTART
-'R'	OPER_RESTART
-'t'	OPER_REMOTE
-'V'	VALLOC
-'Y'	USE_SYSLOG
-'Z'	ZIP_LINKS
-
-'TS'    Supports TS
-'3'     TS Version 3
-'o'     TS Only
-'w'     TS Warnings
diff -uNrd ircd-hybrid-6.0/doc/simple.conf ircd-pi1.0a/doc/simple.conf
--- ircd-hybrid-6.0/doc/simple.conf	Thu Oct  5 23:00:54 2000
+++ ircd-pi1.0a/doc/simple.conf	Wed Dec 31 19:00:00 1969
@@ -1,60 +0,0 @@
-# IRC minimal example configuration file
-# $Id: simple.conf,v 1.4 2000/10/06 03:00:54 lusky Exp $
-# 
-# This is a basic ircd.conf that will get you up and running with
-# little or no modifications.  See the example.conf file for more
-# detailed explanations.
-# 
-# M: set your server's name. Fields are, in order, host name (domain style),
-#  optional bind ip address, a text name, and unused.
-#
-M:irc.example.com::Test IRC Server:
-# 
-# A: administrative information. This line should have three fields, which
-#    may contain any arbitrary text. It is printed by the /ADMIN command.
-#
-A:Example, Inc Test IRC Server:Atlanta, GA USA:John Doe <jdoe@example.com>
-#
-# Y: see example.conf for docs on how Y/I lines work
-#
-# class 1, 90 second ping timeout, no limit of clients per ip
-# 200 max clients in this class, 100k sendq
-Y:1:90:0:200:100000
-#
-# class 2 give opers more sendq, only 10 opers max on this server
-Y:2:90:0:10:500000
-#
-# allow anyone to connect, but force ident, clients go into class 1
-I:NOMATCH::*@*::1
-#
-#
-# O: authorize operators. Fields are, in order, host name the operator must
-#    be logged in from (wildcards allowed), operator's password, operator's
-#    nickname.  Use the 'mkpasswd' command from the tools dir to encrypt
-#    a password.
-#    When opered, client goes into class 2 where they have more sendq
-#
-O:*.example.com:yl9xlY019Bbfc:JohnDoe::2
-#
-# P: port. The port line allows the server to listen on various ports for
-#    connections.  Fields in order: unused,
-#    address to bind to, unused, port to listen on
-#
-# NOTE:  As of hybrid-6, you MUST have at least one P: line defining a port
-# to listen on, or the server won't do much.
-# The line below listens to port 6667 on all IP addresses of a machine
-P::::6667
-# The above below listens to port 31337 on only 192.168.1.123
-P::192.168.1.123::31337
-#
-#
-# Q: Quarantine a nick:  not the old server Q lines, but Quarantine
-#    lines for nicks. Only checked at NICK time, i.e. if added
-#    and hashed in will not kill users who match this nick.
-#
-Q:dcc-*:dcc bots not allowed on this server
-Q:lamestbot:You have to be kidding me
-Q:nickserv:There is no nickserv on this net!
-#
-# There are many more configuration options, see example.conf for the rest.
-#
diff -uNrd ircd-hybrid-6.0/doc/ssl.txt ircd-pi1.0a/doc/ssl.txt
--- ircd-hybrid-6.0/doc/ssl.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/ssl.txt	Thu May 23 12:04:26 2002
@@ -0,0 +1,135 @@
+=== certificates ==============================================================
+
+you will find a shell script called 'ca.sh' in the /doc directory. it is used
+to generate certificate-authorities, -requests, selfsigned certs and finally
+to sign certs.
+
+=== config file ===============================================================
+
+The passphrase of the PEM certificate, client verification level and server
+verification level are specified in a new config entry (S: Line).
+
+The syntax is as follows:
+
+S:ciphers:passphrase:cvl:svl:
+
+ciphers = permitted cipher string
+         (entries are separated
+          by a '/' rather than ':')
+
+  cvl = client verification level (incoming connects)
+  svl = server verification level (outgoing connects)
+
+verification level:
+   0 - ignore peer certificate
+   1 - verify peer certificate if present
+   2 - require valid peer certificate
+   3 - verify peer with locally installed certificate
+
+=== protocol specific =========================================================
+
+/SPOOF oper command
+:<prefix> SPOOF :<hostname>
+
+  Globally changes the hostname of a global oper. It can only be applied once.
+  A notice is sent to all local operators.
+  
+---
+/BROADCAST oper command
+:<prefix> BROADCAST :<message>
+
+  Sends a notice to ALL users on the whole net. (Global opers only)
+  This could danger the whole net if abused, so use it wisely
+  (Maintenance notices, etc).
+  
+---
+/CERT command
+:<prefix> CERT :<nick/server>
+
+  Can be used only by SSL clients. Dumps certificate information of a specific
+  client/server connection and displays current session information (cipher,
+  cipher strength etc). The information is remotely requested when necessary.
+  
+­--
+/STATS J oper command
+
+  Displays SSL context stats. (Connect stats, session cache stats)
+
+---
+RPL_WHOISSSL - :<server> 275 <dst> <src> :<text>
+  <dst> receives numeric reply 275 only when both, <src> and <dst> have SSL
+  client connections and all server links between them are encrypted.
+
+---
+RPL_WHOREPLY - :<server> 352 * <ident> <host> <server>
+		<nick> <flags> :<hops> <realname>
+  'S' is added to <flags> when umode +S
+  'E' is added to <flags> when umode +e
+  
+---
+RPL_NAMREPLY - :<server> 353 <nick> = <chan> :<names>
+
+  +e users are prefixed with '!' to warn that they could
+  intervent in the channel.
+
+---
++z channel mode
+  +z is set when the channel consists of only +S users.
+
+---
++x channel mode
+   +x allows only +S users to join a channel. There is one exception
+   for which i'd like to give an example:
+  
+    (This is the simplest case)
+    
+    A, B = servers      A-----B
+    1, 2 = clients     /       \
+                      1         2
+                      
+  The servers A & B have a plaintext link.
+  Clients 1 & 2 have an SSL connection.
+ (Clients on Server B do NOT see the +S flag from Clients on Server A
+  and reverse)
+   
+  - Client 1 joins channel #lamest
+  
+  - Server A sets mode +z
+  
+  - Client 1 sets mode +x
+  
+  - Servers A & B split
+  
+  - Client 2 joins channel #lamest
+    (He obviously can do that because from the view of Server B the
+     channel is empty and will be +z when Client 2 joins)
+     
+  - Servers A & B reconnect (Here happens the shit)
+  
+  - The servers on both sides consider the channel as -z because the route
+    between A & B is not encrypted  but the channel is +x.
+    Currently both servers would clear the x and z channel modes and send
+    a warning notice to all channel operators. (uhm.. to all +S users in
+    a later release?).
+    
+    (Help me think, what could be a better solution?)
+
+=== sourcecode specific =======================================================
+
+FLAGS_SSL
+  designates _local_ clients as encrypted.
+
+FLAGS_SSLUMODE - umode +S
+  this means the user is reachable through a secure route.
+  umode +S is sent out and reset when MODE message goes across
+  unencrypted link.
+
+MODE_SSL
+  see +z channel mode
+
+MODE_SSLONLY
+  see +x channel mode
+
+New files: m_broadcast.c m_spoof.c ssl.h ssl.c
+
+Most of the changed stuff is surrounded by #ifdef HAVE_SSL/#endif.
diff -uNrd ircd-hybrid-6.0/doc/tao.txt ircd-pi1.0a/doc/tao.txt
--- ircd-hybrid-6.0/doc/tao.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/tao.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,272 @@
+
+The Tao of Internet Relay Chat
+Copyright (C) Ove Ruben R Olsen 1994
+Version of 940110
+Contributing masters: Master ScottM
+
+-----
+Something is formed by the electrons, born in the silent cable. Shaping
+and growing and ungrowing. It is there yet not there. It is the source of
+Internet Relay Chat. I do not know the name, thus I will call it the Tao
+of Internet Relay Chat.
+
+If the Tao is great, then the IRC is running ceaselessly. If the IRC is 
+great then the server is running without ever stoping. If the server is 
+great then the client will always be the server. The luser is then pleased 
+and there is Chat in the world.
+
+The Tao of IRC squits far away and connects on returning.
+
+
+-----
+The genetic potential of birth, a lot to know, yet unknown.
+
+In the begining there was nothing. 
+
+Out of nothing the Tao gave birth to tolsun.oulu.fi. tolsun gave birth to
+OuluBox. 
+
+OuluBox gave birth to rmsg.
+
+rmsg was not Tao, so MUT gave birth to IRC.
+
+No one knows when IRC came into existance, the mighty master WiZ have it 
+to be at the end of the eight month in the year of the Dragon.
+
+
+-----
+Each channel has its purpose, however humble. Each channel is the Yin and
+Yang of IRC. Each channels has it's place within the IRC.
+
+In the beginning there was only channel 0, thus channel 0 is the soil of
+IRC. 
+
+Channel 1 to channel 10 then was open as the sea. Channel 11 to 999 was the 
+trees and forests of IRC. Channels above 999 should not be mentioned, and
+channels below 0 were unborn and contained many secrets.
+
+This was not the right Tao, so IRC gave birth to +channels. 
+
++channels had the yin and yang. Mode does not.
+
+This was not the right Tao still, so IRC gave birth to #channels. 
+
+#channels have the yin and yang.
+
+Only channel 0 is the right path to Tao, but avoid speaking on channel 0.
+
+
+-----
+There was a great dispute among the Broom-Walkers of the Relay. Some of them
+wanted neither yin nor yang. Out of this Eris came into existance. Some of the
+Broom-Walkers then created Eris Free-net. 
+
+This was the right Tao.
+
+Kind Gentle and Boring Net was another wrong path to the Tao of Internet Relay 
+Chat.
+
+Some time later there was a quantity of some lusers who wanted to be 
+Broom-Walkers also. The Eris Free Broom-Walkers did not agree with them, 
+thus a new IRC was born. This IRC is called the Undernet. 
+
+But this is not the right Tao, either.
+
+
+-----
+There will always be disputes among the Broom-Walkers of Internet Relay Chat.
+
+This is the very nature of the IRC.
+
+
+-----
+Lusers that do not understand the Tao is always using the yang of Mode on 
+their channels. Lusers that do understand the Tao are always using Ignore
+on their channels.
+
+How could this not be so ?
+
+
+-----
+The wise sage luser is told about the Chat and uses it. The luser is told 
+about the IRC and is looking for it. The flock are told about the Tao and
+make a fool of the IRC.
+
+If there was no laughter, there would be no Tao.
+
+
+-----
+The master says:
+"Without the Tao of Internet Relay Chat, life becomes meaningless."
+
+The Relay of the old time was mysterious and sacred. We can neither imagine 
+its thoughts nor path; we are left but to describe.
+
+
+-----
+The sage luser must be aware like a frog crossing the highway.
+
+
+-----
+The great master Wumpus once dreamed that he was an automaton. When he awoke
+he exclaimed:
+	"I don't know whether I am Wumpus dreaming that I am a client,
+	 or a client dreaming that I am Wumpus!"
+
+So was the first Automata born. 
+
+The master Nap then said:
+	"Any automata should not speak unless spoken to.
+	 Any automata shall only whisper when spoken to."
+
+Thus replied the master Gnarfer:
+	"The lusers shall keep in mind that a automata can be either good or
+	 bad. Create good automata, and the IRC will hail you and you will 
+	 gain fame and fortune. Create bad automata and people will start to 
+	 hate you, and finaly you will be /KILLed to ethernal damnation"
+
+Many lusers have fallen into the clutches of ethernal damnation. They where 
+not following the Tao.
+
+
+-----
+There once was a luser who went to #BotSex. Each day he saw the automatons. 
+The luser decided that he also would have such a automata.
+He asked another luser for his automata. The other luser gave his automata
+away.
+
+The luser was not within the Tao, so he just started the automata. The automata
+had only Yang inside so all the lusers files where deleted.
+
+Some moons laither the same luser then had become a sage luser, and did create
+his automata from the very grounds with materials found inside the IRC.
+The luser was now within the Tao and his automata lived happily ever after.
+
+
+-----
+There once was a master who wrote automatons without the help of master Phone.
+A novice luser, seeking to imitate him, began with the help of master Phone.
+When the novice luser asked the master to evaluate his automata the master
+replied: "What is a working automata for the master is not for the luser.
+You must must BE the IRC before automating."
+
+
+-----
+Master BigCheese gave birth to master Troy; his duty clear. Master Troy gave 
+birth to master Phone, for the Tao of Irc must be eternal and must flow as the 
+ceaseless river of Time itself.
+
+
+-----
+Master Phone once said about the ircII client:
+	"public_msg is for a message from someone NOT on the channel
+	 public_other is for a message on a channel that doesn't belong to
+	 a window. public is for a message on a channel that belongs to a 
+	 window!"
+
+Out of this raised the mighty chaos.
+
+
+-----
+The sage luser came to the master who wrote automata without the help of 
+master Phone. The sage luser asked the master who wrote automata: "Which is 
+easiest to make. A automata with the help of master Phone or an automata 
+made with the help of a language ?"
+
+The master who wrote automata then replied:
+	"With the help of a language."
+
+The sage luser was disapointed and exclaimed: "But, with master Phone you
+do not need to know anything about the soil of IRC. Is not that the easiet
+way ?"
+
+"Not really" said the master who wrote automata, "when using master Phone
+you are closed inside a box. For sure, it is a great box for the lusers,
+but the master will need more power, thus a language is the only path to go.
+With the language the master will never have to limit himself. When using
+such a language the master will seek the best between the need and the
+availibility."
+
+"I see", said the sage luser.
+
+This is the essence of Tao of IRC automatas.
+
+
+-----
+A client should be light and be used for communication. The spirit of a good
+client is that it should be very convinient for the luser to use, but hard
+for the luser who want to create automata.
+There should never ever be too many functions or too few functions. 
+
+There should always be a ignore.
+
+Without ignore the client is not within the Tao of Chating.
+
+The client should always respond the luser with messages that will not 
+astnonish him too much. The server likewise. If the server does not, then it
+is the clients job to explain what the server says.
+
+A client which fails this, will be useless and cause confusion for the lusers.
+The only way to correct this is to use another client or to write a new one.
+
+
+-----
+A luser asked the masters on #IrcHelp: "My client does not work".
+The masters replied: "Upgrade your client".
+The luser then wondered why the master knew. The master then told him about
+the Protocol.
+
+"Your client does not work beaucse it does not understand the server. Why
+should it always work ? Only a fool would expect such. But, clients are made
+by humans, and humans are not perfect. Only Tao is.
+
+The IRC is solid. The IRC is floating, and will always be dynamic. Live with 
+that or /quit."
+
+
+-----
+The luser came to the masters of #IrcHelp, asking about the Tao of IRC within
+the client.
+The masters then said that the Tao of IRC always lies inside the client
+regardless of how the client connects to the server.
+
+"Is the Tao in irc ?" asked the luser.
+"It so is" replied the masters of #IrcHelp.
+"Is the Tao in the ircII, Kiwi, rxirc, vms, rockers and msa ?" asked the 
+luser.
+"In all of them and in the TPC, irchat, zenirc, zircon X11-irc and even the 
+dos irc has the Tao" said the master quietly.
+"Is the Tao in a telnet connection directly to the server ?" 
+
+The master then was quiet for a long time and said. "Please leave, such 
+questions are not within the Tao of IRC".
+
+
+-----
+The master says: "Without the Protocol of TCP the messages will not travel.
+                  Without the client, the server is useless."
+
+
+-----
+There once was a luser who used the ircII client. "ircII can do anything I 
+ever need for using IRC" said the emacs client user, "I have /ON's, I have 
+assignments, I have aliasing. Why don't you use this instead of the huge 
+emacs client, which also has a messy screen?"
+The emacs client user then replied by saying that "it is better to have a
+scripting language that is the client instead of have a client that has
+a scripting language." Upon hearing this, the ircII client luser fell silent.
+
+
+-----
+The master Wumpus said: "Time for you to leave. I did, now I'm happy."
+The master Gnarfer replied: "Use, but never overuse IRC, then you will also 
+be happy within IRC"
+
+
+-----
+A luser came unto the masters of #EU-Opers and asked, "How can I be, yet not 
+be, a user@host within the IRC?"
+The masters of #EU-Opers replied: "To be Tao is to be ones true self. To hide
+ones self is not Tao, and is not IRC, you have much to learn before you shall 
+be at rest within the Flow of Irc.  Please leave"
+
diff -uNrd ircd-hybrid-6.0/doc/tsora.txt ircd-pi1.0a/doc/tsora.txt
--- ircd-hybrid-6.0/doc/tsora.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/tsora.txt	Sat May  4 22:54:48 2002
@@ -0,0 +1,330 @@
+                       Protocol changes for +TSora
+                       ---------------------------
+
+
+Note: 
+
+The protocols described here implement TimeStamps on IRC channels and 
+nicks. The idea of IRC TimeStamps was started on Undernet, and first 
+implemented by Run <carlo@runaway.xs4all.nl>. The protocols used here 
+are not exactly the same as the ones used on Undernet; the nick-kill 
+handling is very similar and must be credited to Run, while the 
+"TimeStamped channel description" protocol is quite different.
+
+
+
+TSora servers keep track of which version of the TS protocol (if any) 
+their neighboring servers are using, and take it into account when 
+sending messages to them. This allows for seamless integration of TS 
+servers into a non-TS net, and for upgrades of the protocol.
+
+Each server knows which is the lowest and the highest version of the
+TS protocol it can interact with; currently both of these are set to 1:
+
+#define TS_CURRENT 1		/* the highest TS ver we can do */
+#define TS_MIN 1		/* the lowest TS ver we can do  */
+
+
+Timings and TS versions:
+========================
+
+. Keep a 'delta' value to be added to the result of all calls to time(),
+  initially 0.
+
+. Send a second argument to the PASS command, ending in the 'TS' string.
+
+. Send a
+
+  SVINFO <TS_CURRENT> <TS_MIN> <STANDALONE> :<UTC-TIME>
+  
+  just after "SERVER", where <STANDALONE> is 1 if we're connected to 
+  more TSora servers, and 0 if not, and <UTC-TIME> is our idea of the 
+  current UTC time, fixed with the delta.
+
+. When we receive a "SVINFO <x> <y> <z> :<t>" line from a connecting 
+  server, we ignore it if TS_CURRENT<y or x<TS_MIN, otherwise we
+  set a flag remembering that that server is TS-aware, remember the TS 
+  version to use with it (min(TS_CURRENT, x)). Additionally, if this is 
+  our first connected TS server, we set our delta to t-<OUR_UTC> if
+  z==0, and to (t-<OUR_UTC>)/2 if z!=0. The SVINFO data is kept around
+  until the server has effectively registered with SERVER, and used
+  *after* sending our own SVINFO to that server.
+
+
+Explanations:
+
+  Servers will always know which of their directly-linked servers can do 
+  TS, and will use the TS protocol only with servers that do understand 
+  it. This makes it possible to switch to full TS in just one 
+  code-replacement step, without incompatibilities.
+
+  As long as not all servers are TS-aware, the net will be divided into 
+  "zones" of linked TS-aware servers. Channel modes will be kept 
+  synchronized at least within the zone in which the channel was 
+  created, and nick collisions between servers in the same zone will 
+  result in only one client being killed.
+
+  Time synchronization ensures that servers have the same idea of the 
+  current time, and achieves this purpose as long as TS servers are 
+  introduced one by one within the same 'zone'. The merging of two zones 
+  cannot synchronize them completely, but it is to be expected that 
+  within each zone the effective time will be very close to the real 
+  time. 
+
+  By sending TSINFO after SERVER rather than before, we avoid the extra 
+  lag created by the identd check on the server. To be able to send 
+  immediately a connect burst of either type (TS or not), we need to 
+  know before that if the server does TS or not, so we send that 
+  information with PASS as an extra argument. And to avoid being 
+  incompatible with 2.9 servers, which check that this second argument 
+  begins with "2.9", we check that it *ends* with "TS".
+
+  The current time is only used when setting a TS on a new channel or 
+  nick, and once such a TS is set, it is never modified because of 
+  synchronization, as it is much more important that the TS for a 
+  channel or nick stays the same across all servers than that it is 
+  accurate to the second.
+
+  Note that Undernet's 2.8.x servers have no time synchronization at 
+  all, and have had no problems because of it - all of this is more to 
+  catch the occasional server with a way-off clock than anything.
+
+
+NICK handling patches (anti-nick-collide + shorter connect burst):
+==================================================================
+
+. For each nick, store a TS value = the TS value received if any, or our 
+  UTC+delta at the time we first heard of the nick. TS's are propagated 
+  to TS-aware servers whenever sending a NICK command.
+
+. Nick changes reset the TS to the current time.
+
+. When sending a connect burst to another TS server, replace the 
+  NICK/USER pair with only one NICK command containing the nick, the 
+  hopcount, the TS, the umode, and all the USER information.
+
+  The format for a full NICK line is:
+  NICK <nick> <hops> <TS> <umode> <user> <host> <server> :<ircname>
+
+  The umode is a + followed by any applying usermodes.
+
+  The format for a nick-change NICK line is:
+  :<oldnick> NICK <newnick> :<TS>
+
+. When a NICK is received from a TS server, that conflicts with an 
+  existing nick:
+  + if the userhosts differ or one is not known:
+    * if the timestamps are equal, kill ours and the old one if it
+      was a nick change
+    * if the incoming timestamp is older than ours, kill ours and 
+      propagate the new one
+    * if the incoming timestamp is younger, ignore the line, but kill 
+      the old nick if it was a nick change
+  + if the userhosts are the same:
+    * if the timestamps are equal, kill ours and the old one if it
+      was a nick change
+    * if the incoming timestamp is younger, kill ours and propagate
+      the new one
+    * if the incoming timestamp is older, ignore the line but kill
+      the old nick if it was a nick change
+
+. When a NICK is received from a non-TS server that conflicts with
+  an existing nick, kill both.
+
+. Do not send "Fake Prefix" kills in response to lines coming from TS 
+  servers; the sanitization works anyway, and this allows the "newer
+  nick overruled" case to work.
+
+Explanations:
+
+  The modified nick-introduction syntax allows for a slightly shorter 
+  connect-burst, and most importantly lets the server compare 
+  user@host's when determining which nick to kill:  if the user@host
+  is the same, then the older nick must be killed rather than the
+  newer.
+
+  When talking to a non-TS server, we need to behave exactly like one
+  because it expects us to. When talkign to a TS server, we don't kill
+  the nicks it's introducing, as we know it'll be smart enough to do it
+  itself when seeing our own introduced nick.
+
+  When we see a nick arriving from a non-TS server, it won't have a TS, 
+  but it's safe enough to give it the current time rather than keeping 
+  it 0; such TS's won't be the same all across the network (as long as 
+  there is more than one TS zone), and when there's a collision, the TS 
+  used will be the one in the zone the collision occurs in.
+
+  Also, it is important to note that by the time a server sees (and 
+  chooses to ignore) a nick introduction, the introducing server has 
+  also had the time to put umode changes for that nick on its queue, so 
+  we must ignore them too... so we need to ignore fake-prefix lines 
+  rather than sending kills for them. This is safe enough, as the rest 
+  of the protocol ensures that they'll get killed anyway (and the 
+  Undernet does it too, so it's been more than enough tested). Just for 
+  an extra bit of compatibility, we still kill fake prefixes coming from 
+  non-TS servers.
+
+  This part of the TS protocol is almost exactly the same as the 
+  Undernet's .anc (anti-nick-collide) patches, except that Undernet 
+  servers don't add usermodes to the NICK line.
+
+
+TimeStamped channel descriptions (avoiding hacked ops and desynchs):
+====================================================================
+
+. For each channel, keep a timestamp, set to the current time when the
+  channel is created by a client on the local server, or to the received 
+  value if the channel has been propagated from a TS server, or to 0 
+  otherwise. This value will have the semantics of "the time of creation 
+  of the current ops on the channel", and 0 will mean that the channel 
+  is in non-TS mode.
+
+  A new server protocol command is introduced, SJOIN, which introduces 
+  a full channel description: a timestamp, all the modes (except bans),
+  and the list of channel members with their ops and voices. This 
+  command will be used instead of JOIN and of (most) MODEs both in 
+  connect bursts and when propagating channel creations among TS 
+  servers. SJOIN will never be accepted from or sent to users.
+
+  The syntax for the command is:
+
+  SJOIN <TS> #<channel> <modes> :[@][+]<nick_1> ...  [@][+]<nick_n>
+
+  The fields have the following meanings:
+
+  * <TS> is the timestamp for the channel
+
+  * <modes> is the list of global channel modes, starting with a +
+    and a letter for each of the active modes (spmntkil), followed
+    by an argument for +l if there is a limit, and an argument for
+    +k if there's a key (in the same order they were mentioned in
+    the string of letters).
+
+    A channel with no modes will have a "+" in that field.
+
+    A special value of "0" means that the server does not specify the 
+    modes, and will be used when more than one SJOIN line is needed
+    to completely describe a channel, or when propagating a SJOIN
+    the modes of which were rejected.
+
+  * Each nick is preceded by a "@" if the user has ops, and a "+" if
+    the user has a voice. For mode +ov, both flags are used.
+
+  SJOINs will be propagated (when appropriate) to neighboring TS 
+  servers, and converted to JOINs and MODEs for neighboring non-TS 
+  servers.
+  
+  To propagate channels for which not all users fit in one 
+  SJOIN line, several SJOINs will be sent consecutively, only the first
+  one including actual information in the <mode> field.
+  
+  An extra ad-hoc restriction is imposed on SJOIN messages, to simplify 
+  processing: if a channel has ops, then the first <nick> of the first 
+  SJOIN sent to propagate that channel must be one of the ops.
+
+  Servers will never attempt to reconstruct a SJOIN from JOIN/MODE 
+  information being received at the moment from other servers.
+
+. For each user on a channel, keep an extra flag (like ops and voice)
+  that is set when the user has received channel ops from another 
+  server (in a SJOIN channel description), which we rejected (ignored). 
+  Mode changes (but NOT kicks) coming from a TS server and from someone 
+  with this flag set will be ignored. The flag will be reset when the 
+  user gets ops from another user or server.
+
+. On deops done by non-local users, coming from TS servers, on channels 
+  with a non-zero TS, do not check that the user has ops but check that 
+  their 'deopped' flag is not set. For kicks coming from a TS server, do 
+  not check either. This will avoid desynchs, and 'bad' modechanges are 
+  avoided anyway. Other mode changes will still only be taken into 
+  account and propagated when done by users that are seen as having ops.
+
+. When a MODE change that ops someone is received from a server for a 
+  channel, that channel's TS is set to 0, and the mode change is 
+  propagated. 
+
+. When a SJOIN is received for a channel, deal with it in this way:
+  * received-TS = 0: 
+    + if we have ops or the SJOIN doesn't op anyone, SJOIN propagated
+      with our own TS.
+    + otherwise, TS set to 0 and SJOIN propagated with 0.
+  * received-TS > 0, own-TS = 0: 
+    + if the SJOIN ops someone or we don't have ops, set our TS to the
+      received TS and propagate.
+    + otherwise, propagate with TS = 0.
+  * received-TS = own-TS: propagate.
+  * received-TS < own-TS: 
+    + if the SJOIN ops someone, remove *all* modes (except bans) from 
+      the channel and propagate these mode changes to all neighboring
+      non-TS servers, and copy the received TS and propagate the SJOIN.
+    + if the SJOIN does not op anyone and we have ops, propagate
+      with our own TS.
+    + otherwise, copy the received TS and propagate the SJOIN.
+  * received-TS > own-TS: 
+    + if the SJOIN does not introduce any ops, process and propagate
+      with our own TS.
+    + if we have ops: for each person the mode change would op, set the 
+      'deopped' flag; process all the JOINs ignoring the '@' and '+' 
+      flags; propagate without the flags and with our TS.
+    + if we don't have ops: set our TS to the received one, propagate
+      with the flags.
+
+
+Explanations:
+
+  This part of the protocol is the one that is most different (and 
+  incompatible) with the Undernet's: we never timestamp MODE changes, 
+  but instead we introduce the concept of time-stamped channel 
+  descriptions. This way each server can determine, based on its state 
+  and the received description, what the correct modes for a channel 
+  are, and deop its own users if necessary. With this protocol, there is 
+  *never* the need to reverse and bounce back a mode change. This is
+  both faster and more bandwith-effective.
+
+  The end goal is to have a protocol will eventually protect channels 
+  against hacked ops, while minimizing the impact on a mixed-server net. 
+  In order to do this, whenever there is a conflict between a TS server 
+  and a non-TS one, the non-TS one's idea of the whole situation 
+  prevails. This means that channels will only have a TS when they have 
+  been created on a TS-aware server, and will lose it whenever a server 
+  op comes from a non-TS server. Also, at most one 'zone' will have a TS 
+  for any given channel at any given time, ensuring that there won't be 
+  any deops when zones are merged. However, when TS zones are merged, if 
+  the side that has a TS also has ops, then the TS is kept across the 
+  whole new zone. Effective protection will only be ensured once all 
+  servers run TS patches and channels have been re-created, as there is 
+  no way servers can assign a TS to a channel they are not creating 
+  (like they do with nicks) without having unwanted deops later.
+
+  The visible effects of this timestamped channel-description protocol 
+  are that when a split rejoins, and one side has hacked ops, the other 
+  side doesn't see any server mode changes (just like with Undernet's
+  TS), but the side that has hacked ops sees:
+
+  * first the first server on the other side deopping and devoicing 
+    everyone, and fixing the +spmntkli modes
+  * then other users joining, and getting server ops and voices
+
+  The less obvious part of this protocol is its behavior in the case 
+  that the younger side of a rejoin has servers that are lagged with 
+  each other. In such a situation, a SJOIN that clears all modes and 
+  sets the legitimate ones is being propagated from one server, and 
+  lagged illegitimate mode changes and kicks are being propagated in the 
+  opposite direction. In this case, a kick done by someone who is being 
+  deopped by the SJOIN must be taken into account to keep the name list 
+  in sync (and since it can only be kicking someone who also was on the 
+  younger side), while a deop does not matter (and will be ignored by 
+  the first server on the other side), and an opping *needs* to be 
+  discareded to avoid hacked ops.
+
+  The main property of timestamped channel descriptions that makes them 
+  a very stable protocol even with lag and splits, is that they leave a 
+  server in the same final state, independently of the order in which 
+  channel descriptions coming from different servers are received. Even 
+  when SJOINs and MODEs for the same channel are being propagated in 
+  different direction because of several splits rejoining, the final 
+  state will be the same, independently of the exact order in which each 
+  server received the SJOINs, and will be the same across all the 
+  servers in the same zone.
+
+
diff -uNrd ircd-hybrid-6.0/doc/version.txt ircd-pi1.0a/doc/version.txt
--- ircd-hybrid-6.0/doc/version.txt	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/doc/version.txt	Thu May 23 12:06:25 2002
@@ -0,0 +1,38 @@
+$Id: version.txt,v 1.3 2002/05/23 16:06:25 shifty Exp $
+Updated for ircd-pi0.4 (2002/05/04)
+
+When you type /version you will often see something like this:
+*** 2.8/hybrid-6rc6(20001110_1). irc.ins.net.uk ACHiIMpY TS3ow
+
+Ever wondered what those funny chars mean after the version number? Well
+here they are:
+
+'A'	SENDQ_ALWAYS
+'c'	CHROOTDIR
+'C'	CMDLINE_CONFIG
+'d'	DO_ID
+'D'	DEBUGMODE
+'e'	LOCOP_REHASH
+'E'	OPER_REHASH
+'G'	GLINES
+'H'	HUB
+'i'	SHOW_INVISIBLE_LUSERS
+'I'	NO_DEFAULT_INVISIBLE
+'K'	OPER_KILL
+'M'	IDLE_FROM_MSG
+'p'	CRYPT_OPER_PASSWORD
+'P'	CRYPT_LINK_PASSWORD
+'r'	LOCOP_RESTART
+'R'	OPER_RESTART
+'t'	OPER_REMOTE
+'V'	VALLOC
+'Y'	USE_SYSLOG
+'Z'	ZIP_LINKS
+
+'TS'    Supports TS
+'3'     TS Version 3
+'o'     TS Only
+'w'     TS Warnings
+
+'e'     Supports mode enforcements
+'SSL'   SSL support
diff -uNrd ircd-hybrid-6.0/include/Makefile.in ircd-pi1.0a/include/Makefile.in
--- ircd-hybrid-6.0/include/Makefile.in	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/include/Makefile.in	Sun May  5 22:48:31 2002
@@ -0,0 +1,199 @@
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+PACKAGE = @PACKAGE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+CLEANFILES = *~
+DIST_SOURCES = blalloc.h channel.h class.h client.h common.h config.h \
+               dbuf.h dline_conf.h fdlist.h fileio.h flud.h hash.h \
+               irc_string.h ircd.h ircd_defs.h ircd_signal.h list.h \
+               listener.h m_commands.h m_gline.h m_info.h m_kline.h \
+               motd.h msg.h mtrie_conf.h numeric.h packet.h parse.h \
+               patchlevel.h res.h restart.h ssl.h s_auth.h s_bsd.h \
+               s_conf.h s_debug.h s_log.h s_misc.h s_serv.h s_stats.h \
+               s_user.h s_zip.h scache.h send.h serno.h setup.h \
+               sprintf_irc.h struct.h whowas.h
+
+subdir = include
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = setup.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.in setup.h.in
+all: setup.h
+
+.SUFFIXES:
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+setup.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/setup.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status include/setup.h
+
+$(srcdir)/setup.h.in:  $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/setup.h.in
+
+distclean-hdr:
+	-rm -f setup.h
+uninstall-info:
+tags: TAGS
+TAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check: all
+
+installdirs:
+
+install: all
+
+install-strip:
+	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-generic mostlyclean
+
+distclean: clean distclean-generic distclean-hdr
+
+dvi:
+
+info:
+
+install-data:
+
+install-exec:
+
+install-info:
+
+install-man:
+
+installcheck:
+
+maintainer-clean: distclean maintainer-clean-generic
+
+mostlyclean: mostlyclean-generic
+
+uninstall: uninstall-info
+
+.PHONY: GTAGS all check clean clean-binPROGRAMS clean-generic \
+        distclean distclean-compile distclean-depend \
+        distclean-generic distclean-tags distdir dvi info \
+        install install-binPROGRAMS install-data install-exec \
+        install-info install-man install-strip installcheck \
+        installdirs maintainer-clean maintainer-clean-generic \
+        mostlyclean mostlyclean-compile mostlyclean-generic \
+        tags uninstall uninstall-binPROGRAMS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/include/blalloc.h ircd-pi1.0a/include/blalloc.h
--- ircd-hybrid-6.0/include/blalloc.h	Wed Jul 21 01:44:59 1999
+++ ircd-pi1.0a/include/blalloc.h	Fri Nov  2 19:23:17 2001
@@ -4,7 +4,7 @@
  * Owner:   Wohali (Joan Touzet)
  *
  *
- * $Id: blalloc.h,v 1.4 1999/07/21 05:44:59 tomh Exp $
+ * $Id: blalloc.h,v 1.1.1.1 2001/11/03 00:23:17 shifty Exp $
  */
 #ifndef INCLUDED_blalloc_h
 #define INCLUDED_blalloc_h
diff -uNrd ircd-hybrid-6.0/include/channel.h ircd-pi1.0a/include/channel.h
--- ircd-hybrid-6.0/include/channel.h	Thu Oct  5 23:00:55 2000
+++ ircd-pi1.0a/include/channel.h	Thu May 23 00:22:22 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: channel.h,v 1.26 2000/10/06 03:00:55 lusky Exp $
+ * $Id: channel.h,v 1.4 2002/05/23 04:22:22 smoli Exp $
  */
 
 #ifndef INCLUDED_channel_h
@@ -114,6 +114,9 @@
 extern void    channel_modes(struct Client *, char *, char *, struct Channel*);
 extern void    set_channel_mode(struct Client *, struct Client *, 
                                 struct Channel *, int, char **);
+#ifdef HAVE_SSL
+extern int is_ssl_channel(struct Channel *);
+#endif
 
 
 
@@ -152,9 +155,11 @@
 #define MODE_BAN        0x0400
 #define MODE_EXCEPTION  0x0800
 #define MODE_DENY       0x1000
-
 #define MODE_LIMIT      0x2000  /* was 0x1000 */
-#define MODE_FLAGS      0x2fff  /* was 0x1fff */
+#define MODE_SSL        0x4000
+#define MODE_SSLONLY    0x8000
+
+#define MODE_FLAGS      0x8fff  /* was 0x1fff */
 
 #ifdef NEED_SPLITCODE
 
@@ -182,14 +187,6 @@
 #define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|\
                      MODE_EXCEPTION|MODE_DENY|MODE_KEY|MODE_LIMIT)
 
-/*
- * Undefined here, these are used in conjunction with the above modes in
- * the source.
-#define MODE_QUERY      0x10000000
-#define MODE_DEL       0x40000000
-#define MODE_ADD       0x80000000
- */
-
 /* used in SetMode() in channel.c and m_umode() in s_msg.c */
 
 #define MODE_NULL      0
@@ -206,6 +203,12 @@
 #define ShowChannel(v,c)        (PubChannel(c) || IsMember((v),(c)))
 #define PubChannel(x)           ((!x) || ((x)->mode.mode &\
                                  (MODE_PRIVATE | MODE_SECRET)) == 0)
+#define IsSSLChannel(x)         ((x) && ((x)->mode.mode & MODE_SSL))
+#define IsSSLOnlyChannel(x)     ((x) && ((x)->mode.mode & MODE_SSLONLY))
+#define SetSSLChannel(x)        ((x) && ((x)->mode.mode |= MODE_SSL))
+#define SetSSLOnlyChannel(x)    ((x) && ((x)->mode.mode |= MODE_SSLONLY))
+#define ClearSSLChannel(x)        ((x) && ((x)->mode.mode &= ~MODE_SSL))
+#define ClearSSLOnlyChannel(x)    ((x) && ((x)->mode.mode &= ~MODE_SSLONLY))
 
 #define IsMember(blah,chan) ((blah && blah->user && \
                 find_channel_link((blah->user)->channel, chan)) ? 1 : 0)
diff -uNrd ircd-hybrid-6.0/include/class.h ircd-pi1.0a/include/class.h
--- ircd-hybrid-6.0/include/class.h	Wed Jul 21 01:45:00 1999
+++ ircd-pi1.0a/include/class.h	Fri Nov  2 19:23:17 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: class.h,v 1.5 1999/07/21 05:45:00 tomh Exp $ */
+/* $Id: class.h,v 1.1.1.1 2001/11/03 00:23:17 shifty Exp $ */
 
 #ifndef INCLUDED_class_h
 #define INCLUDED_class_h
diff -uNrd ircd-hybrid-6.0/include/client.h ircd-pi1.0a/include/client.h
--- ircd-hybrid-6.0/include/client.h	Fri Dec  1 01:28:46 2000
+++ ircd-pi1.0a/include/client.h	Thu May 23 13:51:47 2002
@@ -17,7 +17,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: client.h,v 1.45 2000/12/01 06:28:46 lusky Exp $
+ * $Id: client.h,v 1.8 2002/05/23 17:51:47 smoli Exp $
  */
 #ifndef INCLUDED_client_h
 #define INCLUDED_client_h
@@ -47,6 +47,11 @@
 #ifndef INCLUDED_dbuf_h
 #include "dbuf.h"
 #endif
+#include "setup.h"
+
+#if defined(HAVE_SSL) && !defined(S_ZIP)
+#include <openssl/ssl.h>
+#endif
 
 #define HOSTIPLEN       16      /* Length of dotted quad form of IP        */
                                 /* - Dianora                               */
@@ -77,6 +82,8 @@
   struct SLink*  invited;       /* chain of invite pointer blocks */
   char*          away;          /* pointer to away message */
   time_t         last;
+  time_t         last_sent;
+  int            spoofed;       /* spoofed hostname */
   int            refcnt;        /* Number of times this block is referenced */
   int            joined;        /* number of channels joined */
   char           id[IDLEN + 1]; /* for future use *hint* */
@@ -102,6 +109,9 @@
   struct ConfItem* nline;       /* N-line pointer for this server */
   struct Client*   servers;     /* Servers on this server */
   struct Client*   users;       /* Users on this server */
+#ifdef HAVE_SSL
+  int              is_ssl;
+#endif
 };
 
 struct Client
@@ -254,6 +264,21 @@
    */
   char              passwd[PASSWDLEN + 1];
   int               caps;       /* capabilities bit-field */
+#ifdef HAVE_SSL
+#ifndef S_ZIP
+  SSL              *ssl;
+  struct X509      *cert;               /* client certificate */
+#else
+  void             *ssl;
+  void             *cert;
+#endif
+  int              read_blocked_on_write;
+  int              read_blocked;
+  int              write_blocked_on_read;
+  int              write_blocked;
+  int              ssl_isconnecting;
+  int              verify_ok;
+#endif /* HAVE_SSL */
 };
 
 /*
@@ -266,7 +291,6 @@
 #define STAT_SERVER     0x10   /* 0  */
 #define STAT_CLIENT     0x20   /* 1  */
 
-
 #define IsRegisteredUser(x)     ((x)->status == STAT_CLIENT)
 #define IsRegistered(x)         ((x)->status  > STAT_UNKNOWN)
 #define IsConnecting(x)         ((x)->status == STAT_CONNECTING)
@@ -313,24 +337,27 @@
 #define FLAGS_NORMALEX     0x0400 /* Client exited normally */
 #define FLAGS_SENDQEX      0x0800 /* Sendq exceeded */
 #define FLAGS_IPHASH       0x1000 /* iphashed this client */
+#define FLAGS_SSL          0x2000 /* connection uses SSL */
 
 /* umodes, settable flags */
-#define FLAGS_SERVNOTICE   0x0001 /* server notices such as kill */
-#define FLAGS_CCONN        0x0002 /* Client Connections */
-#define FLAGS_REJ          0x0004 /* Bot Rejections */
-#define FLAGS_SKILL        0x0008 /* Server Killed */
-#define FLAGS_FULL         0x0010 /* Full messages */
-#define FLAGS_SPY          0x0020 /* see STATS / LINKS */
-#define FLAGS_DEBUG        0x0040 /* 'debugging' info */
-#define FLAGS_NCHANGE      0x0080 /* Nick change notice */
-#define FLAGS_WALLOP       0x0100 /* send wallops to them */
-#define FLAGS_OPERWALL     0x0200 /* Operwalls */
-#define FLAGS_INVISIBLE    0x0400 /* makes user invisible */
-#define FLAGS_BOTS         0x0800 /* shows bots */
-#define FLAGS_EXTERNAL     0x1000 /* show servers introduced */
+#define FLAGS_SERVNOTICE   0x00000001 /* server notices such as kill */
+#define FLAGS_CCONN        0x00000002 /* Client Connections */
+#define FLAGS_REJ          0x00000004 /* Bot Rejections */
+#define FLAGS_SKILL        0x00000008 /* Server Killed */
+#define FLAGS_FULL         0x00000010 /* Full messages */
+#define FLAGS_SPY          0x00000020 /* see STATS / LINKS */
+#define FLAGS_DEBUG        0x00000040 /* 'debugging' info */
+#define FLAGS_NCHANGE      0x00000080 /* Nick change notice */
+#define FLAGS_WALLOP       0x00000100 /* send wallops to them */
+#define FLAGS_OPERWALL     0x00000200 /* Operwalls */
+#define FLAGS_INVISIBLE    0x00000400 /* makes user invisible */
+#define FLAGS_BOTS         0x00000800 /* shows bots */
+#define FLAGS_EXTERNAL     0x00001000 /* show servers introduced */
 /* user information flags, only settable by remote mode or local oper */
-#define FLAGS_OPER         0x4000 /* Operator */
-#define FLAGS_LOCOP        0x8000 /* Local operator -- SRB */
+#define FLAGS_OPER         0x00004000 /* Operator */
+#define FLAGS_LOCOP        0x00008000 /* Local operator -- SRB */
+#define FLAGS_ENFORCE      0x00010000 /* Can enforce everything -shifty  rel. pi-0.1 */
+#define FLAGS_SSLU         0x00020000 /* user connects via SSL */
 
 /* *sigh* overflow flags */
 #define FLAGS2_RESTRICTED   0x0001      /* restricted client */
@@ -349,6 +376,7 @@
 #define FLAGS2_OPER_K           0x0400  /* oper can kill/kline */
 #define FLAGS2_OPER_DIE         0x0800  /* oper can die */
 #define FLAGS2_OPER_REHASH      0x1000  /* oper can rehash */
+#define FLAGS2_OPER_ENFORCE     0x2000  /* oper can enforce -shifty  rel. pi-0.1 */
 #define FLAGS2_OPER_FLAGS       (FLAGS2_OPER_GLOBAL_KILL | \
                                  FLAGS2_OPER_REMOTE | \
                                  FLAGS2_OPER_UNKLINE | \
@@ -356,7 +384,9 @@
                                  FLAGS2_OPER_N | \
                                  FLAGS2_OPER_K | \
                                  FLAGS2_OPER_DIE | \
-                                 FLAGS2_OPER_REHASH)
+                                 FLAGS2_OPER_REHASH | \
+                                 FLAGS2_OPER_ENFORCE)
+
 /* ZIP_LINKS */
 
 #define FLAGS2_ZIP           0x4000  /* (server) link is zipped */
@@ -374,15 +404,16 @@
 #define FLAGS2_SENDQ_POP  0x400000  /* sendq exceeded (during list) */
 
 
-#define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP)
+#define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | FLAGS_SSLU | FLAGS_ENFORCE)
 #define ALL_UMODES   (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \
                       FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \
                       FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \
-                      FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP )
-
+                      FLAGS_BOTS | FLAGS_EXTERNAL | \
+                      FLAGS_LOCOP | FLAGS_ENFORCE | FLAGS_SSLU)
 #ifndef OPER_UMODES
 #define OPER_UMODES  (FLAGS_OPER | FLAGS_WALLOP | FLAGS_SERVNOTICE | \
-                      FLAGS_SPY | FLAGS_OPERWALL | FLAGS_DEBUG | FLAGS_BOTS)
+                      FLAGS_SPY | FLAGS_OPERWALL | FLAGS_DEBUG | \
+                      FLAGS_BOTS | FLAGS_ENFORCE) /* -shifty  rel. pi-0.1 */
 #endif /* OPER_UMODES */
 
 #ifndef LOCOP_UMODES
@@ -405,6 +436,13 @@
 #define MyConnect(x)            ((x)->local_flag != 0)
 #define MyClient(x)             (MyConnect(x) && IsClient(x))
 
+#ifdef HAVE_SSL
+#define IsSSL(x)                ((x)->flags & FLAGS_SSL)
+#define SetSSL(x)               ((x)->flags |= FLAGS_SSL)
+#define IsSSLServ(x)            ((x)->serv->is_ssl)
+#define SetSSLServ(x)           ((x)->serv->is_ssl = 1)
+#endif
+
 /* oper flags */
 #define MyOper(x)               (MyConnect(x) && IsOper(x))
 #define IsOper(x)               ((x)->umodes & FLAGS_OPER)
@@ -422,6 +460,7 @@
 #define ClearInvisible(x)       ((x)->umodes &= ~FLAGS_INVISIBLE)
 #define SendWallops(x)          (((x)->umodes & FLAGS_WALLOP) && IsAnOper(x))
 #define ClearWallops(x)         ((x)->umodes &= ~FLAGS_WALLOP)
+#define SendNotice(x)		((x)->umodes & FLAGS_SERVNOTICE)
 #define SendServNotice(x)       (((x)->umodes & FLAGS_SERVNOTICE) && IsAnOper(x))
 #define SendOperwall(x)         ((x)->umodes & FLAGS_OPERWALL)
 #define SendCConnNotice(x)      ((x)->umodes & FLAGS_CCONN)
@@ -432,7 +471,10 @@
 #define SendDebugNotice(x)      ((x)->umodes & FLAGS_DEBUG)
 #define SendNickChange(x)       ((x)->umodes & FLAGS_NCHANGE)
 #define SetWallops(x)           ((x)->umodes |= FLAGS_WALLOP)
-
+#define SetEnforce(x)           ((x)->umodes |= FLAGS_ENFORCE)
+#define IsEnforce(x)            ((x)->umodes & FLAGS_ENFORCE)
+#define SetSSLUmode(x)          ((x)->umodes |= FLAGS_SSLU)
+#define IsSSLUmode(x)           ((x)->umodes & FLAGS_SSLU)
 
 #ifdef REJECT_HOLD
 #define IsRejectHeld(x)         ((x)->flags & FLAGS_REJECT_HOLD)
@@ -495,6 +537,8 @@
 #define SetOperRehash(x)        ((x)->flags2 |= FLAGS2_OPER_REHASH)
 #define IsOperRehash(x)         ((x)->flags2 & FLAGS2_OPER_REHASH)
 #define CBurst(x)               ((x)->flags2 & FLAGS2_CBURST)
+#define SetOperEnforce(x)       ((x)->flags2 |= FLAGS2_OPER_ENFORCE)
+#define IsOperEnforce(x)        ((x)->flags2 & FLAGS2_OPER_ENFORCE)
 
 /*
  * 'offsetof' is defined in ANSI-C. The following definition
diff -uNrd ircd-hybrid-6.0/include/common.h ircd-pi1.0a/include/common.h
--- ircd-hybrid-6.0/include/common.h	Fri Jul 30 02:48:10 1999
+++ ircd-pi1.0a/include/common.h	Fri Nov  2 19:23:18 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: common.h,v 1.15 1999/07/30 06:48:10 tomh Exp $
+ * $Id: common.h,v 1.1.1.1 2001/11/03 00:23:18 shifty Exp $
  */
 #ifndef INCLUDED_common_h
 #define INCLUDED_common_h
diff -uNrd ircd-hybrid-6.0/include/config.h ircd-pi1.0a/include/config.h
--- ircd-hybrid-6.0/include/config.h	Sun Nov 26 23:11:47 2000
+++ ircd-pi1.0a/include/config.h	Thu May 23 13:51:47 2002
@@ -1,5 +1,5 @@
 /************************************************************************
- *   IRC - Internet Relay Chat, include/config.h
+ *   IRC - Internet Relay Chat, include/leaf.h
  *   Copyright (C) 1990 Jarkko Oikarinen
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: config.h,v 1.90 2000/11/27 04:11:47 lusky Exp $
+ * $Id: config.h,v 1.13 2002/05/23 17:51:47 smoli Exp $
  */
 #ifndef INCLUDED_config_h
 #define INCLUDED_config_h
@@ -51,21 +51,31 @@
  * system limits. If you know what you are doing, increase them now
  */
 
-#define HARD_FDLIMIT_   256
-#define INIT_MAXCLIENTS 200
+#ifndef HUB
+
+#define HARD_FDLIMIT_   1024
+#define INIT_MAXCLIENTS  800
+
+#else
+
+#define HARD_FDLIMIT_   128
+#define INIT_MAXCLIENTS  80
+
+#endif
 
 #if defined(__CYGWIN__)
 #undef HARD_FDLIMIT_
-#define HARD_FDLIMIT_   25
+#define HARD_FDLIMIT_   512
 #undef INIT_MAXCLIENTS
-#define INIT_MAXCLIENTS 20
+#define INIT_MAXCLIENTS 500
 #endif /* __CYGWIN__ */
 
+
 /*
  * This is how many 'buffer connections' we allow... 
  * Remember, MAX_BUFFER + MAX_CLIENTS can't exceed HARD_FDLIMIT :)
  */
-#define MAX_BUFFER      60
+#define MAX_BUFFER      25
 
 /* NICKNAMEHISTORYLENGTH - size of WHOWAS array
  * this defines the length of the nickname history.  each time a user changes
@@ -75,13 +85,26 @@
  *       will be preallocated for the entire whowas array when ircd is started.
  *       You will want to crank this down if you are on a small net.
  */
+#ifndef HUB
 #define NICKNAMEHISTORYLENGTH 15000
+#else
+#define NICKNAMEHISTORYLENGTH 15
+#endif
 
 /* Don't change this... */
 #define HARD_FDLIMIT    (HARD_FDLIMIT_ - 10)
 #define MASTER_MAX      (HARD_FDLIMIT - MAX_BUFFER)
 /*******************************************************************/
 
+/* CHROOTDIR - chroot() before reading conf
+ * Define for value added security if you are paranoid.
+ * All files you access must be in the directory you define as DPATH.
+ * (This may effect the PATH locations above, though you can symlink it)
+ *
+ * You may want to define IRC_UID and IRC_GID
+ */
+#define CHROOTDIR
+
 /* DPATH SPATH CPATH MPATH KPATH - directoy and files locations
  * Full pathnames and defaults of irc system's support files. Please note that
  * these are only the recommended names and paths. Change as needed.
@@ -107,8 +130,12 @@
  *
  */
 
-#define DPATH   "/usr/local/ircd/"
-#define SPATH   "/usr/local/ircd/ircd"
+#define DPATH   IRCDDIR "/"
+#ifdef CHROOTDIR
+#define SPATH   "ircd"
+#else
+#define SPATH   DPATH    "ircd"
+#endif
 #define CPATH   "ircd.conf"
 #define KPATH   "kline.conf"
 #define DLPATH  "kline.conf"
@@ -117,12 +144,15 @@
 #define PPATH   "ircd.pid"
 #define HPATH   "opers.txt"
 #define OPATH   "opers.motd"
+#define CEPATH  "ircd.pem"
+#define RNPATH  "ircd.rnd"
+#define CAPATH  "ca.crt"
 
 /* HIDE_OPS
  * Define this to prevent non chanops from seeing what ops a channel has
  * NOT ADEQUATELY TESTED YET, DON'T USE ON PRODUCTION NETWORK --Rodder
  */
-/* #undef HIDE_OPS */
+#undef HIDE_OPS
 
 /* SERVERHIDE
  * Define this to prevent users from seeing what server a user is on.
@@ -130,17 +160,17 @@
  * TRACE and LTRACE, and prevents hunting by nickname for nonopers.
  * NOT ADEQUATELY TESTED YET, DON'T USE ON PRODUCTION NETWORK --Rodder
  */
-/* #undef SERVERHIDE */
+#undef SERVERHIDE
 
 /* NETWORK_NAME
  * Displayed in place of the servername when SERVERHIDE is enabled
  */   
-#define NETWORK_NAME "EFnet"
+#define NETWORK_NAME "Pi-IRC"
 
 /* NETWORK_DESC
  * Displayed in place of the server info when SERVERHIDE is enabled
  */
-#define NETWORK_DESC "Eris Free Network"
+#define NETWORK_DESC "Political incorrect"
 
 
 /* TS_MAX_DELTA and TS_WARN_DELTA -  allowed delta for TS when another
@@ -185,8 +215,10 @@
  *
  * These need to be defined if you want to use SYSLOG logging, too.
  */
-#define FNAME_USERLOG "/usr/local/ircd/users" /* */
-#define FNAME_OPERLOG "/usr/local/ircd/opers" /* */
+#ifdef HUB
+#define FNAME_USERLOG "users.log"
+#endif
+#define FNAME_OPERLOG "opers.log"
 
 /* RFC1035_ANAL
  * Defining this causes ircd to reject hostnames with non-compliant chars.
@@ -198,20 +230,20 @@
  * Defining this will allow periods in ident replies.  Use of this is
  * strongly discouraged on public networks
  */
-#undef ALLOW_DOT_IN_IDENT
+#define ALLOW_DOT_IN_IDENT
 
 /* MAX_MULTI_MESSAGES
  * Maximum number of recipients to a PRIVMSG.  Any more than MAX_MULTI_MESSAGES
  * will not be sent.  If MAX_MULTI_MESSAGES is 1, then any PRIVMSG with a ',' in
  * the target will be rejected
  */
-#define MAX_MULTI_MESSAGES 2
+#define MAX_MULTI_MESSAGES 1
 
 /* NO_DUPE_MULTI_MESSAGES
  * Define this to check for duplicate recipients in PRIVMSG, at the expense
  * of noticeable CPU cycles.
  */
-#define NO_DUPE_MULTI_MESSAGES
+#undef NO_DUPE_MULTI_MESSAGES
 
 /* WARN_NO_NLINE
  * Define this if you want ops to get noticed about "things" trying to
@@ -227,7 +259,7 @@
  * or if you wish to customize the  messages, define this.
  * Otherwise leave it undef'd for plain ole boring messages.
  */
-#undef CUSTOM_ERR
+#define CUSTOM_ERR
 
 /* FAILED_OPER_NOTICE - send a notice to all opers when someone
  * tries to /oper and uses an incorrect password.
@@ -237,7 +269,7 @@
 /* SHOW_FAILED_OPER_ID - if FAILED_OPER_NOTICE is defined, also notify when
  * a client fails to oper because of a identity mismatch (wrong host or nick)
  */
-#undef SHOW_FAILED_OPER_ID
+#define SHOW_FAILED_OPER_ID
 
 /* SHOW_FAILED_OPER_PASSWD - if FAILED_OPER_NOTICE is defined, also show the
  * attempted passwd
@@ -297,7 +329,7 @@
  * from harassing the IRCops.
  * However, the client will still see the real reason upon connect attempts.
  */
-#define KLINE_WITH_CONNECTION_CLOSED
+#undef KLINE_WITH_CONNECTION_CLOSED
 
 /* NON_REDUNDANT_KLINES - If you want the server to flag and not apply
  * redundant klines
@@ -325,7 +357,7 @@
 /* SPOOF_NOTICE - See a notice when a user connects with a
  * spoofed I: line
  */
-#define SPOOF_NOTICE
+#undef SPOOF_NOTICE
 
 /* STATS_NOTICE - See a notice when a user does a /stats
  *
@@ -352,19 +384,23 @@
  */
 #define NO_WHOIS_WILDCARDS
 
+#define PACE_TRACE
+#define PACE_WALLOPS
+#define PACE_CERT
+
 /* PACE_WAIT - minimum seconds between use of MOTD, INFO, HELP, LINKS, TRACE
  * -Dianora
  */
-#define PACE_WAIT 10
+#define PACE_WAIT 3
 
-/* KNOCK_DELAY 5 minutes per each KNOCK should be enough
+/* KNOCK_DELAY 2 minutes per each KNOCK should be enough
  */
-#define KNOCK_DELAY 300
+#define KNOCK_DELAY 120
 
 /* If you are an admin that does not think operwall/wallops
  * should be used instead of a channel, define this.
  */
-#define PACE_WALLOPS
+#undef PACE_WALLOPS
 #define WALLOPS_WAIT 10 
 
 /* SHORT_MOTD
@@ -407,7 +443,7 @@
  * These can be over-ridden in ircd.conf file, with flags in last O field
  */
 #define OPER_UMODES   (FLAGS_OPER|FLAGS_WALLOP|FLAGS_SERVNOTICE|FLAGS_OPERWALL)
-#define LOCOP_UMODES   (FLAGS_LOCOP|FLAGS_WALLOP|FLAGS_SERVNOTICE)
+#define LOCOP_UMODES  (FLAGS_LOCOP|FLAGS_WALLOP|FLAGS_SERVNOTICE)
 
 /* MAXIMUM LINKS - max links for class 0 if no Y: line configured
  *
@@ -438,26 +474,22 @@
  */
 #define MAXIMUM_LINKS 1
 
-/* HUB - enable server-server routing
- * If your server is running as a a HUB Server then define this.
- * A HUB Server has many servers connect to it at the same as opposed
- * to a leaf which just has 1 server (typically the uplink). Define this
- * correctly for performance reasons.
- */
-#undef  HUB
-
 /* CMDLINE_CONFIG - allow conf-file to be specified on command line
  * NOTE: defining CMDLINE_CONFIG and installing ircd SUID or SGID is a MAJOR
  * security problem - they can use the "-f" option to read any files
  * that the 'new' access lets them.
  */
-#define CMDLINE_CONFIG
+#undef CMDLINE_CONFIG
 
 /* INIT_LOG_LEVEL - what level of information is logged to ircd.log
  * options are:
  *   L_CRIT, L_ERROR, L_WARN, L_NOTICE, L_TRACE, L_INFO, L_DEBUG
  */
+#ifdef DEBUG
+#define INIT_LOG_LEVEL L_DEBUG
+#else
 #define INIT_LOG_LEVEL L_NOTICE
+#endif
 
 /* USE_LOGFILE - log errors and such to LPATH
  * If you wish to have the server send 'vital' messages about server
@@ -529,17 +561,17 @@
 /* IRC_UID IRC_GID - user and group id ircd should switch to if run as root
  * If you start the server as root but wish to have it run as another user,
  * define IRC_UID to that UID.  This should only be defined if you are running
- * as root and even then perhaps not.
+ * as root and even then perhaps not. - obsolete
  */
-#define IRC_UID 1001
-#define IRC_GID 31
+/*#define IRC_UID 1000
+#define IRC_GID 100*/
 
 /* CLIENT_FLOOD - client excess flood threshold
  * this controls the number of bytes the server will allow a client to
  * send to the server without processing before disconnecting the client for
  * flooding it.  Values greater than 8000 make no difference to the server.
  */
-#define CLIENT_FLOOD    2560
+#define CLIENT_FLOOD    2048
 
 /* NOISY_HTM - should HTM be noisy by default
  * should be YES or NO
@@ -551,7 +583,7 @@
  * clients with a little i instead of an I in their I line
  * can be chanopped, but cannot chanop anyone else.
  */
-#define LITTLE_I_LINES
+#undef LITTLE_I_LINES
 
 /*
  * define ONE of NO_CHANOPS_ON_SPLIT, NO_JOIN_ON_SPLIT
@@ -565,7 +597,7 @@
  * if there are no servers presently connected to this server
  * opers are not affected. 
  */
-#undef NO_CHANOPS_WHEN_SPLIT
+#define NO_CHANOPS_WHEN_SPLIT
 
 /* 
  * NO_JOIN_ON_SPLIT_SIMPLE
@@ -599,7 +631,11 @@
  * the net. for a leaf, 2 is fine. If the number of servers seen
  * on the net gets less than 2, a split is deemed to have happened.
  */
+#ifndef HUB
 #define SPLIT_SMALLNET_SIZE 2
+#else
+#define SPLIT_SMALLNET_SIZE 3
+#endif
 
 /*
  * SPLIT_SMALLNET_USER_SIZE defines how many global users on the
@@ -609,7 +645,7 @@
  * number of users seen on net > SPLIT_SMALLNET_USER_SIZE start
  * counting down the SERVER_SPLIT_RECOVERY_TIME
  */
-#define SPLIT_SMALLNET_USER_SIZE 10000
+#define SPLIT_SMALLNET_USER_SIZE 25
 
 /*
  * SPLIT_PONG will send a PING to a server after the connect burst.
@@ -670,7 +706,7 @@
  * client was compiled with QUIT_ON_OPERATOR_KILL which was mandatory policy
  * on UMich.Edu hosts.
  */
-#define SEND_FAKE_KILL_TO_CLIENT
+#undef SEND_FAKE_KILL_TO_CLIENT
  
 /*
  * Limited Trace - Reports only link and oper traces even when O:line is
@@ -943,22 +979,17 @@
  * to make your client server very sluggish.
  * You usually shouldn't need this. -Dianora
 */
-#undef DEBUGMODE               /* define DEBUGMODE to enable debugging mode.*/
-
-/*
- * viconf option, if USE_RCS is defined, viconf will use rcs "ci"
- * to keep the conf file  under RCS control.
- */
-#define USE_RCS
+#ifdef DEBUG
+#define DEBUGMODE               /* define DEBUGMODE to enable debugging mode.*/
+#endif
 
-/* ----------------- not approved on EFnet section -------------------- */
 /* GLINES - global Kline-like bans
  * Define this if you want GLINE support
  * when this is defined, 3 completely different opers from
  * three different servers must do the identical GLINE in order
  * for the G line to take effect.
  */
-#undef GLINES
+#define GLINES
 #define GLINEFILE       "gline.log"
 
 /* GLINE_TIME - local expire time for GLINES
@@ -984,14 +1015,8 @@
  * if you still have a machine with this bug, it doesn't belong on EFnet
  */
 
-/* CHROOTDIR - chroot() before reading conf
- * Define for value added security if you are paranoid.
- * All files you access must be in the directory you define as DPATH.
- * (This may effect the PATH locations above, though you can symlink it)
- *
- * You may want to define IRC_UID and IRC_GID
- */
-#undef CHROOTDIR
+/* SPOOF_FREEFORM */
+#define SPOOF_FREEFORM
 
 /* ------------------------- END CONFIGURATION SECTION -------------------- */
 #define MAX_CLIENTS INIT_MAXCLIENTS
diff -uNrd ircd-hybrid-6.0/include/config.h.dist ircd-pi1.0a/include/config.h.dist
--- ircd-hybrid-6.0/include/config.h.dist	Sun Nov 26 23:11:48 2000
+++ ircd-pi1.0a/include/config.h.dist	Wed Dec 31 19:00:00 1969
@@ -1,1038 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, include/config.h
- *   Copyright (C) 1990 Jarkko Oikarinen
- *
- *   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: config.h.dist,v 1.81 2000/11/27 04:11:48 lusky Exp $
- */
-#ifndef INCLUDED_config_h
-#define INCLUDED_config_h
-#ifndef INCLUDED_setup_h
-#include "setup.h"
-#define INCLUDED_setup_h
-#endif
-
-/* PLEASE READ SECTION:
- *
- * I have commented out WHOIS_NOTICE and STATS_NOTICE
- * Personally, I feel opers do not need to know the information
- * returned by having those two defines defined, it is an invasion
- * of privacy. The original need/use of showing STATS_NOTICE
- * it seems to me, was to find stats flooders. They no longer
- * can do much damage with stats flooding, so why show it?
- * whois notice is just an invasion of privacy. Who cares?
- * I personally hope you agree with me, and leave these undef'ed
- * but at least you have been warned.
- *
- */
-
-/***************** MAKE SURE THIS IS CORRECT!!!!!!!!! **************/
-/* ONLY EDIT "HARD_FDLIMIT_" and "INIT_MAXCLIENTS" */
-
-/* You may also need to hand edit the Makefile to increase
- * the value of FD_SETSIZE 
- */
-
-/* These ultra low values pretty much guarantee the server will
- * come up initially, then you can increase these values to fit your
- * system limits. If you know what you are doing, increase them now
- */
-
-#define HARD_FDLIMIT_   256
-#define INIT_MAXCLIENTS 200
-
-#if defined(__CYGWIN__)
-#undef HARD_FDLIMIT_
-#define HARD_FDLIMIT_   25
-#undef INIT_MAXCLIENTS
-#define INIT_MAXCLIENTS 20
-#endif /* __CYGWIN__ */
-
-/*
- * This is how many 'buffer connections' we allow... 
- * Remember, MAX_BUFFER + MAX_CLIENTS can't exceed HARD_FDLIMIT :)
- */
-#define MAX_BUFFER      60
-
-/* NICKNAMEHISTORYLENGTH - size of WHOWAS array
- * this defines the length of the nickname history.  each time a user changes
- * nickname or signs off, their old nickname is added to the top of the list.
- * NOTE: this is directly related to the amount of memory ircd will use whilst
- *       resident and running - it hardly ever gets swapped to disk!  Memory
- *       will be preallocated for the entire whowas array when ircd is started.
- *       You will want to crank this down if you are on a small net.
- */
-#define NICKNAMEHISTORYLENGTH 15000
-
-/* Don't change this... */
-#define HARD_FDLIMIT    (HARD_FDLIMIT_ - 10)
-#define MASTER_MAX      (HARD_FDLIMIT - MAX_BUFFER)
-/*******************************************************************/
-
-/* DPATH SPATH CPATH MPATH KPATH - directoy and files locations
- * Full pathnames and defaults of irc system's support files. Please note that
- * these are only the recommended names and paths. Change as needed.
- * You must define these to something, even if you don't really want them.
- *
- * DPATH = directory,
- * SPATH = server executable,
- * CPATH = conf file,
- * MPATH = MOTD
- * KPATH = kline conf file
- * DLPATH = dline conf file
- *
- * OMOTD = path to MOTD for opers
- * 
- * For /restart to work, SPATH needs to be a full pathname
- * (unless "." is in your exec path). -Rodder
- * Leave KPATH undefined if you want klines in main conf file.
- * HPATH is the opers help file, seen by opers on /quote help.
- * -Dianora
- *
- * DPATH must have a trailing /
- * Do not use ~'s in any of these paths
- *
- */
-
-#define DPATH   "/usr/local/ircd/"
-#define SPATH   "/usr/local/ircd/ircd"
-#define CPATH   "ircd.conf"
-#define KPATH   "kline.conf"
-#define DLPATH  "kline.conf"
-#define MPATH   "ircd.motd"
-#define LPATH   "ircd.log"
-#define PPATH   "ircd.pid"
-#define HPATH   "opers.txt"
-#define OPATH   "opers.motd"
-
-/* HIDE_OPS
- * Define this to prevent non chanops from seeing what ops a channel has
- * NOT ADEQUATELY TESTED YET, DON'T USE ON PRODUCTION NETWORK --Rodder
- */
-/* #undef HIDE_OPS */
-
-/* SERVERHIDE
- * Define this to prevent users from seeing what server a user is on.
- * It also hide IP address in STATS commands and various notices, disables
- * TRACE and LTRACE, and prevents hunting by nickname for nonopers.
- * NOT ADEQUATELY TESTED YET, DON'T USE ON PRODUCTION NETWORK --Rodder
- */
-/* #undef SERVERHIDE */
-
-/* NETWORK_NAME
- * Displayed in place of the servername when SERVERHIDE is enabled
- */   
-#define NETWORK_NAME "EFnet"
-
-/* NETWORK_DESC
- * Displayed in place of the server info when SERVERHIDE is enabled
- */
-#define NETWORK_DESC "Eris Free Network"
-
-
-/* TS_MAX_DELTA and TS_WARN_DELTA -  allowed delta for TS when another
- * server connects.
- *
- * If the difference between my clock and the other server's clock is
- * greater than TS_MAX_DELTA, I send out a warning and drop the links.
- * 
- * If the difference is less than TS_MAX_DELTA, I just sends out a warning
- * but don't drop the link.
- *
- * TS_MAX_DELTA currently set to 30 minutes to deal with older timedelta
- * implementation.  Once pre-hybrid5.2 servers are eradicated, we can drop this
- * down to 90 seconds or so. --Rodder
- */
-#define TS_MAX_DELTA 300        /* seconds */
-#define TS_WARN_DELTA 30        /* seconds */
-
-/* SLAVE_SERVERS - Use this to send LOCOPS and KLINES to servers you define
- * uses U: lines in ircd.conf, each server defined in an U: line
- * is sent a copy of the locally placed K-line, and will also
- * accept K-lines from those servers.
- * This is useful for sites with more than one client server.
- */
-#undef SLAVE_SERVERS
-
-/* SEPARATE_QUOTE_KLINES_BY_DATE
- * If you define this, then klines will be read and written
- * to a separate kline file according to date. You =must= then run
- * a daily/nightly script to consolidate your klines, or the previous
- * days klines are lost. If you define this, LOCKFILE on kline file
- * makes no sense
- */
-#undef SEPARATE_QUOTE_KLINES_BY_DATE
-
-/* FNAME_USERLOG and FNAME_OPERLOG - logs of local USERS and OPERS
- * Define this filename to maintain a list of persons who log
- * into this server. Logging will stop when the file does not exist.
- * Logging will be disable also if you do not define this.
- * FNAME_USERLOG just logs user connections, FNAME_OPERLOG logs every
- * successful use of /oper.  These are either full paths or files within DPATH.
- *
- * These need to be defined if you want to use SYSLOG logging, too.
- */
-#define FNAME_USERLOG "/usr/local/ircd/users" /* */
-#define FNAME_OPERLOG "/usr/local/ircd/opers" /* */
-
-/* RFC1035_ANAL
- * Defining this causes ircd to reject hostnames with non-compliant chars.
- * undef'ing it will allow hostnames with _ or / to connect
- */
-#define RFC1035_ANAL
-
-/* ALLOW_DOT_IN_IDENT
- * Defining this will allow periods in ident replies.  Use of this is
- * strongly discouraged on public networks
- */
-#undef ALLOW_DOT_IN_IDENT
-
-/* MAX_MULTI_MESSAGES
- * Maximum number of recipients to a PRIVMSG.  Any more than MAX_MULTI_MESSAGES
- * will not be sent.  If MAX_MULTI_MESSAGES is 1, then any PRIVMSG with a ',' in
- * the target will be rejected
- */
-#define MAX_MULTI_MESSAGES 2
-
-/* NO_DUPE_MULTI_MESSAGES
- * Define this to check for duplicate recipients in PRIVMSG, at the expense
- * of noticeable CPU cycles.
- */
-#define NO_DUPE_MULTI_MESSAGES
-
-/* WARN_NO_NLINE
- * Define this if you want ops to get noticed about "things" trying to
- * connect as servers that don't have N: lines.  Twits with misconfigured
- * servers can get really annoying with this enabled.
- */
-#define WARN_NO_NLINE
-
-/* CUSTOM_ERR - colorful notice/error/messages
- * Defining this will use custom notice/error/messages from
- * src/messages.tab instead of stock ones in src/messages_cust.tab
- * If you prefer the "colorful" messages that Hybrid was known for,
- * or if you wish to customize the  messages, define this.
- * Otherwise leave it undef'd for plain ole boring messages.
- */
-#undef CUSTOM_ERR
-
-/* FAILED_OPER_NOTICE - send a notice to all opers when someone
- * tries to /oper and uses an incorrect password.
- */
-#define FAILED_OPER_NOTICE
-
-/* SHOW_FAILED_OPER_ID - if FAILED_OPER_NOTICE is defined, also notify when
- * a client fails to oper because of a identity mismatch (wrong host or nick)
- */
-#undef SHOW_FAILED_OPER_ID
-
-/* SHOW_FAILED_OPER_PASSWD - if FAILED_OPER_NOTICE is defined, also show the
- * attempted passwd
- */
-#undef SHOW_FAILED_OPER_PASSWD
-
-/* BAN_INFO - Shows you who and when someone did a ban
- */
-#define BAN_INFO
-
-/* USE_UH - include user@host for BAN_INFO
- * define this if you want to use n!u@h for BAN_INFO
- */
-#define USE_UH
-
-/* TOPIC_INFO - Shows you who and when someone set the topic
- */
-#define TOPIC_INFO
-
-/* ANTI_NICK_FLOOD - prevents nick flooding
- * define if you want to block local clients from nickflooding
- */
-#define ANTI_NICK_FLOOD
-/* defaults allow 5 nick changes in 20 seconds */
-#define MAX_NICK_TIME 20
-#define MAX_NICK_CHANGES 5 
-
-/* DO_IDENTD - check identd
- * if you undefine this, ircd will never check identd regardless of
- * @'s in I:lines.  You must still use @'s in your I: lines to get
- * ircd to do ident lookup even if you define this.
- */
-#define DO_IDENTD
-
-/* KLINE_WITH_REASON - show comment to client on exit
- * define this if you want users to exit with the kline/dline reason
- * (i.e. instead of "You have been K-lined" they will see the reason
- * and to see the kline/dline reason when they try to connect
- * It's a neat feature except for one thing... If you use a tcm
- * and it shows the nick of the oper doing the kline (as it does by default)
- * Your opers can be hit with retalitation... Or if your opers use
- * scripts that stick an ID into the comment field. etc. It's up to you
- * whether you want to use it or not.
- *
- * I have rewritten a portion of the k-line processing making it faster
- * unfortuantely, using KLINE_WITH_REASON would slow down this
- * processing slightly.. how much I can't say. For very few clients
- * being KLINED very little difference, but you have been forewarned
- *
- */
-#define KLINE_WITH_REASON
-
-/*
- * If KLINE_WITH_CONNECTION_CLOSED is defined and KLINE_WITH_REASON
- * above is undefined then the signoff reason will be "Connection
- * closed". This prevents other users seeing the client disconnect
- * from harassing the IRCops.
- * However, the client will still see the real reason upon connect attempts.
- */
-#define KLINE_WITH_CONNECTION_CLOSED
-
-/* NON_REDUNDANT_KLINES - If you want the server to flag and not apply
- * redundant klines
- */
-#define NON_REDUNDANT_KLINES
-
-/* BOTCHECK - rudimentary bot checking
- */
-#define BOTCHECK
-
-/* x_LINES_OPER_ONLY - Allow only local opers to see these stats
- *
- *  Any one with an F line can almost always get on the server, as
- *  some file descriptors are reserved for people with this F line
- *  especially useful for your opers
- */
-#define B_LINES_OPER_ONLY
-#define E_LINES_OPER_ONLY
-#define F_LINES_OPER_ONLY
-#undef  I_LINES_OPER_ONLY
-#undef  K_LINES_OPER_ONLY
-#undef  O_LINES_OPER_ONLY
-#undef  P_LINES_OPER_ONLY
-
-/* SPOOF_NOTICE - See a notice when a user connects with a
- * spoofed I: line
- */
-#define SPOOF_NOTICE
-
-/* STATS_NOTICE - See a notice when a user does a /stats
- *
- * This is left on by default.
- * Members of the development team were split on supporting the
- * default here.
- */
-#define STATS_NOTICE
-
-/* WHOIS_NOTICE - Shows a notice to an oper when a user does a
- * /whois on them
- * Why do opers need this at all? Its an invasion of privacy. bah.
- * you don't need this. -Dianora
- */
-#undef WHOIS_NOTICE
-
-/* WHOIS_WAIT - minimum seconds between remote use of WHOIS before
- * max use count is reset
- */
-#define WHOIS_WAIT 1
-
-/* NO_WHOIS_WILDCARDS - disable the use of wildcards in WHOIS.
- * this will probably be permanently enabled in the next release.
- */
-#define NO_WHOIS_WILDCARDS
-
-/* PACE_WAIT - minimum seconds between use of MOTD, INFO, HELP, LINKS, TRACE
- * -Dianora
- */
-#define PACE_WAIT 10
-
-/* KNOCK_DELAY 5 minutes per each KNOCK should be enough
- */
-#define KNOCK_DELAY 300
-
-/* If you are an admin that does not think operwall/wallops
- * should be used instead of a channel, define this.
- */
-#define PACE_WALLOPS
-#define WALLOPS_WAIT 10 
-
-/* SHORT_MOTD
- * There are client ignoring the FORCE_MOTD MOTD numeric, there is
- * no point forcing MOTD on connecting clients IMO. Give them a short
- * NOTICE telling them they should read the motd, and leave it at that.
- */
-#undef SHORT_MOTD
-
-/* NO_OPER_FLOOD - disable flood control for opers
- * define this to remove flood control for opers
- */
-#define NO_OPER_FLOOD
-
-/* SHOW_INVISIBLE_LUSERS - show invisible clients in LUSERS
- * As defined this will show the correct invisible count for anyone who does
- * LUSERS on your server. On a large net this doesnt mean much, but on a
- * small net it might be an advantage to undefine it.
- */
-#define SHOW_INVISIBLE_LUSERS
-
-#define ZIP_LINKS               /* compress server-to-server links */
-
-/* NO_DEFAULT_INVISIBLE - clients not +i by default
- * When defined, your users will not automatically be attributed with user
- * mode "i" (i == invisible). Invisibility means people dont showup in
- * WHO or NAMES unless they are on the same channel as you.
- */
-#undef  NO_DEFAULT_INVISIBLE
-
-/*
- * The compression level used for zipped links. (Suggested values: 1 to 5)
- * Above 4 will only give a rather marginal increase in compression for a
- * large increase in CPU usage.
- */
-#define ZIP_LEVEL       2
-
-/*
- * OPER_UMODES LOCOP_UMODES - set these to be the initial umodes when OPER'ing
- * These can be over-ridden in ircd.conf file, with flags in last O field
- */
-#define OPER_UMODES   (FLAGS_OPER|FLAGS_WALLOP|FLAGS_SERVNOTICE|FLAGS_OPERWALL)
-#define LOCOP_UMODES   (FLAGS_LOCOP|FLAGS_WALLOP|FLAGS_SERVNOTICE)
-
-/* MAXIMUM LINKS - max links for class 0 if no Y: line configured
- *
- * This define is useful for leaf nodes and gateways. It keeps you from
- * connecting to too many places. It works by keeping you from
- * connecting to more than "n" nodes which you have C:blah::blah:6667
- * lines for.
- *
- * Note that any number of nodes can still connect to you. This only
- * limits the number that you actively reach out to connect to.
- *
- * Leaf nodes are nodes which are on the edge of the tree. If you want
- * to have a backup link, then sometimes you end up connected to both
- * your primary and backup, routing traffic between them. To prevent
- * this, #define MAXIMUM_LINKS 1 and set up both primary and
- * secondary with C:blah::blah:6667 lines. THEY SHOULD NOT TRY TO
- * CONNECT TO YOU, YOU SHOULD CONNECT TO THEM.
- *
- * Gateways such as the server which connects Australia to the US can
- * do a similar thing. Put the American nodes you want to connect to
- * in with C:blah::blah:6667 lines, and the Australian nodes with
- * C:blah::blah lines. Have the Americans put you in with C:blah::blah
- * lines. Then you will only connect to one of the Americans.
- *
- * This value is only used if you don't have server classes defined, and
- * a server is in class 0 (the default class if none is set).
- *
- */
-#define MAXIMUM_LINKS 1
-
-/* HUB - enable server-server routing
- * If your server is running as a a HUB Server then define this.
- * A HUB Server has many servers connect to it at the same as opposed
- * to a leaf which just has 1 server (typically the uplink). Define this
- * correctly for performance reasons.
- */
-#undef  HUB
-
-/* CMDLINE_CONFIG - allow conf-file to be specified on command line
- * NOTE: defining CMDLINE_CONFIG and installing ircd SUID or SGID is a MAJOR
- * security problem - they can use the "-f" option to read any files
- * that the 'new' access lets them.
- */
-#define CMDLINE_CONFIG
-
-/* INIT_LOG_LEVEL - what level of information is logged to ircd.log
- * options are:
- *   L_CRIT, L_ERROR, L_WARN, L_NOTICE, L_TRACE, L_INFO, L_DEBUG
- */
-#define INIT_LOG_LEVEL L_NOTICE
-
-/* USE_LOGFILE - log errors and such to LPATH
- * If you wish to have the server send 'vital' messages about server
- * to a logfile, define USE_LOGFILE.
- */
-#define USE_LOGFILE
-
-/* USE_SYSLOG - log errors and such to syslog()
- * If you wish to have the server send 'vital' messages about server
- * through syslog, define USE_SYSLOG. Only system errors and events critical
- * to the server are logged although if this is defined with FNAME_USERLOG,
- * syslog() is used instead of the above file. It is not recommended that
- * this option is used unless you tell the system administrator beforehand
- * and obtain their permission to send messages to the system log files.
- */
-#define USE_SYSLOG
-
-#ifdef  USE_SYSLOG
-/* SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER
- * If you use syslog above, you may want to turn some (none) of the
- * spurious log messages for KILL,SQUIT,etc off.
- */
-#undef  SYSLOG_KILL     /* log all operator kills to syslog */
-#undef  SYSLOG_SQUIT    /* log all remote squits for all servers to syslog */
-#undef  SYSLOG_CONNECT  /* log remote connect messages for other all servs */
-#undef  SYSLOG_USERS    /* send userlog stuff to syslog */
-#undef  SYSLOG_OPER     /* log all users who successfully become an Op */
-#undef  SYSLOG_BLOCK_ALLOCATOR /* debug block allocator */
-
-/* LOG_FACILITY - facility to use for syslog()
- * Define the facility you want to use for syslog().  Ask your
- * sysadmin which one you should use.
- */
-#define LOG_FACILITY LOG_LOCAL4
-
-#endif /* USE_SYSLOG */
-
-/* CRYPT_OPER_PASSWORD - use crypted oper passwords in the ircd.conf
- * define this if you want to use crypted passwords for operators in your
- * ircd.conf file.
- */
-#define CRYPT_OPER_PASSWORD
-
-/* CRYPT_LINK_PASSWORD - use crypted N-line passwords in the ircd.conf
- * If you want to store encrypted passwords in N-lines for server links,
- * define this.  For a C/N pair in your ircd.conf file, the password
- * need not be the same for both, as long as the opposite end has the
- * right password in the opposite line.
- */
-#undef  CRYPT_LINK_PASSWORD
-
-/* IDLE_FROM_MSG - Idle-time reset only from privmsg
- * Idle-time reset only from privmsg, if undefined idle-time
- * is reset from everything except ping/pong.
- * 
- */
-#define IDLE_FROM_MSG
-
-/* MAXSENDQLENGTH - Max amount of internal send buffering
- * Max amount of internal send buffering when socket is stuck (bytes)
- */
-#define MAXSENDQLENGTH 7050000    /* Recommended value: 7050000 for efnet */
-
-/*  BUFFERPOOL - the maximum size of the total of all sendq's.
- *  Recommended value is 4 times MAXSENDQLENGTH.
- */
-#define BUFFERPOOL (MAXSENDQLENGTH * 4)
-
-/* IRC_UID IRC_GID - user and group id ircd should switch to if run as root
- * If you start the server as root but wish to have it run as another user,
- * define IRC_UID to that UID.  This should only be defined if you are running
- * as root and even then perhaps not.
- */
-#define IRC_UID 1001
-#define IRC_GID 31
-
-/* CLIENT_FLOOD - client excess flood threshold
- * this controls the number of bytes the server will allow a client to
- * send to the server without processing before disconnecting the client for
- * flooding it.  Values greater than 8000 make no difference to the server.
- */
-#define CLIENT_FLOOD    2560
-
-/* NOISY_HTM - should HTM be noisy by default
- * should be YES or NO
- */
-#define NOISY_HTM YES
-
-/*
- * LITTLE_I_LINE support
- * clients with a little i instead of an I in their I line
- * can be chanopped, but cannot chanop anyone else.
- */
-#define LITTLE_I_LINES
-
-/*
- * define ONE of NO_CHANOPS_ON_SPLIT, NO_JOIN_ON_SPLIT
- * PRESERVE_CHANNEL_ON_SPLIT, NO_JOIN_ON_SPLIT_SIMPLE
- *
- * choose =one= only
- */
-
-/* NO_CHANOPS_WHEN_SPLIT
- * When this is defined, users will not be chanopped on empty channels
- * if there are no servers presently connected to this server
- * opers are not affected. 
- */
-#undef NO_CHANOPS_WHEN_SPLIT
-
-/* 
- * NO_JOIN_ON_SPLIT_SIMPLE
- * 
- * When this is defined, users will not be allowed to join channels
- * while the server is split.
- */
-#undef NO_JOIN_ON_SPLIT_SIMPLE
-
-/*
- * NO_JOIN_ON_SPLIT
- *
- * When this is defined, users will not be allowed to join channels
- * that were present before a split. THIS IS BROKEN - DO NOT USE
- * ON A PRODUCTION SERVER --Rodder
- */
-#undef NO_JOIN_ON_SPLIT
-
-/*
- * PRESERVE_CHANNEL_ON_SPLIT
- *
- * When this is defined, channel modes are preserved when this
- * server is split from net until rejoin. i.e. if the channel
- * was +i before this server split, it remains +i during the split
- * THIS IS BROKEN - DO NOT USE ON PRODUCTION SERVER --Rodder
- */
-#undef PRESERVE_CHANNEL_ON_SPLIT
-
-/*
- * SPLIT_SMALLNET_SIZE defines what constitutes a split from 
- * the net. for a leaf, 2 is fine. If the number of servers seen
- * on the net gets less than 2, a split is deemed to have happened.
- */
-#define SPLIT_SMALLNET_SIZE 2
-
-/*
- * SPLIT_SMALLNET_USER_SIZE defines how many global users on the
- * net constitute a "normal" net size. It's used in conjunction
- * with SPLIT_SMALLNET_SIZE to help determine the end of a split.
- * if number of server seen on net > SPLIT_SMALLNET_SIZE &&
- * number of users seen on net > SPLIT_SMALLNET_USER_SIZE start
- * counting down the SERVER_SPLIT_RECOVERY_TIME
- */
-#define SPLIT_SMALLNET_USER_SIZE 10000
-
-/*
- * SPLIT_PONG will send a PING to a server after the connect burst.
- * It will stay in "split" mode until it receives a PONG in addition
- * to meeting the other conditions.  This is very useful for true
- * leafs, less useful for "clustered" servers.  If this is enabled,
- * you should be able to crank DEFAULT_SERVER_SPLIT_RECOVERY_TIME
- * down to 1.
- */
-#define SPLIT_PONG
-
-/*
- * DEFAULT_SERVER_SPLIT_RECOVERY_TIME - determines how long to delay split
- * status after resyncing
- */
-#define DEFAULT_SERVER_SPLIT_RECOVERY_TIME 1
-
-/* LIMIT_UH
- * If this is defined, Y line limit is made against the actual
- * username not the ip. i.e. if you limit the connect frequency line
- * to 1, that allows only 1 username to connect instead of 1 client per ip
- * i.e. you can have 10 clients all with different usernames, but each user
- * can only connect once. Each non-idented client counts as the same user
- * i.e. ~a and ~b result in a count of two.
- *
- */
-#undef LIMIT_UH
-
-/* IDLE_CHECK
- * If this is defined, each client is checked for excessive idleness
- * This adds some CPU... you might not want to use this on a large server.
- * However, if defined, and a client is discovered idling more than
- * IDLE_TIME minutes, it is t-klined for 1 minute to discourage
- * reconnects. The idle time is settable via /quote set
- * /quote set idletime
- *
- * -Dianora
- *
- * IDLE_IGNORE will prevent the server from idle'ing clients connected from
- * the listed IP#s.  This should probably be moved into a .conf file entry
- * at some point in the future.
- * It has been. add '<' to I line prefix
- *
- * OPER_IDLE allows operators to remain idle when they idle
- * beyond the idle limit
- */
-#undef  IDLE_CHECK
-#define IDLE_TIME 60
-#define OPER_IDLE
-
-/* SEND_FAKE_KILL_TO_CLIENT - make the client think it's being /KILL'ed
- * 
- * This was originally intended to prevent clients from reconnecting to the
- * server after being dropped for idleness.  It can probably be used for
- * other events too.
- *
- * This really only works if the
- * client was compiled with QUIT_ON_OPERATOR_KILL which was mandatory policy
- * on UMich.Edu hosts.
- */
-#define SEND_FAKE_KILL_TO_CLIENT
- 
-/*
- * Limited Trace - Reports only link and oper traces even when O:line is
- * active.
- *
- * Displays only Oper, Serv, Link, and Class reports even if the O-line is
- * active.  Useful for just showing pertinent info of a specific server. 
- * Note however that if the target server is not running this option then
- * you will still receive a normal trace output. 
- */
-#define LTRACE
-
-/*
- * LWALLOPS - Like wallops but only local.
- *
- * This is actually a compatibility command which really calls m_locops().
- */
-#define LWALLOPS
-
-/*
- * Define this to enable WintrHawk "styling"
- * Currently this shows the actual quit message on the Client exiting 
- * notice, rather than the error or "Client Quit"
- */
-#define WINTRHAWK
-
-/*
- * comstud and I have both noted that solaris 2.5 at least, takes a hissy
- * fit if you don't read a fd that becomes ready right away. Unfortunately
- * the dog3 priority code relies upon not having to read a ready fd right away.
- * If you have HTM mode set low as it is normally, the server will
- * eventually grind to a halt.
- * Don't complain if Solaris lags if you don't define this. I warned you.
- *
- * -Dianora
- */
-
-#undef NO_PRIORITY
-
-/*   STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP  */
-
-/* You shouldn't change anything below this line, unless absolutely needed. */
-
-/* INITIAL_DBUFS - how many dbufs to preallocate
- */
-#define INITIAL_DBUFS 1000 /* preallocate 4 megs of dbufs */ 
-
-/* MAXBUFFERS - increase socket buffers
- *
- * Increase send & receive socket buffer up to 64k,
- * keeps clients at 8K and only raises servers to 64K
- */
-#define MAXBUFFERS
-
-/* PORTNUM - default port where ircd resides
- * Port where ircd resides. NOTE: This *MUST* be greater than 1024 if you
- * plan to run ircd under any other uid than root.
- */
-#define PORTNUM 6667
-
-/* MAXCONNECTIONS - don't touch - change the HARD_FDLIMIT_ instead
- * Maximum number of network connections your server will allow.  This should
- * never exceed max. number of open file descrpitors and wont increase this.
- * Should remain LOW as possible. Most sites will usually have under 30 or so
- * connections. A busy hub or server may need this to be as high as 50 or 60.
- * Making it over 100 decreases any performance boost gained from it being low.
- * if you have a lot of server connections, it may be worth splitting the load
- * over 2 or more servers.
- * 1 server = 1 connection, 1 user = 1 connection.
- * This should be at *least* 3: 1 listen port, 1 dns port + 1 client
- */
-/* change the HARD_FDLIMIT_ instead */
-#define MAXCONNECTIONS  HARD_FDLIMIT
-
-/* TIMESEC - Time interval to wait and if no messages have been received,
- * then check for PINGFREQUENCY and CONNECTFREQUENCY 
- */
-#define TIMESEC  5              /* Recommended value: 5 */
-
-/* PINGFREQUENCY - ping frequency for idle connections
- * If daemon doesn't receive anything from any of its links within
- * PINGFREQUENCY seconds, then the server will attempt to check for
- * an active link with a PING message. If no reply is received within
- * (PINGFREQUENCY * 2) seconds, then the connection will be closed.
- */
-#define PINGFREQUENCY    120    /* Recommended value: 120 */
-
-/* CONNECTFREQUENCY - time to wait before auto-reconencting
- * If the connection to to uphost is down, then attempt to reconnect every 
- * CONNECTFREQUENCY  seconds.
- */
-#define CONNECTFREQUENCY 600    /* Recommended value: 600 */
-
-/* HANGONGOODLINK and HANGONGOODLINK
- * Often net breaks for a short time and it's useful to try to
- * establishing the same connection again faster than CONNECTFREQUENCY
- * would allow. But, to keep trying on bad connection, we require
- * that connection has been open for certain minimum time
- * (HANGONGOODLINK) and we give the net few seconds to steady
- * (HANGONRETRYDELAY). This latter has to be long enough that the
- * other end of the connection has time to notice it broke too.
- * 1997/09/18 recommended values by ThemBones for modern Efnet
- */
-
-#define HANGONRETRYDELAY 60     /* Recommended value: 30-60 seconds */
-#define HANGONGOODLINK 3600     /* Recommended value: 30-60 minutes */
-
-/* WRITEWAITDELAY - Number of seconds to wait for write to
- * complete if stuck.
- */
-#define WRITEWAITDELAY     15   /* Recommended value: 15 */
-
-/* CONNECTTIMEOUT -
- * Number of seconds to wait for a connect(2) call to complete.
- * NOTE: this must be at *LEAST* 10.  When a client connects, it has
- * CONNECTTIMEOUT - 10 seconds for its host to respond to an ident lookup
- * query and for a DNS answer to be retrieved.
- */
-#define CONNECTTIMEOUT  30      /* Recommended value: 30 */
-
-/* KILLCHASETIMELIMIT -
- * Max time from the nickname change that still causes KILL
- * automaticly to switch for the current nick of that user. (seconds)
- */
-#define KILLCHASETIMELIMIT 90   /* Recommended value: 90 */
-
-/* MAXCHANNELSPERUSER -
- * Max number of channels a user is allowed to join.
- */
-#define MAXCHANNELSPERUSER  10  /* Recommended value: 10 */
-
-/* SENDQ_ALWAYS - should always be defined.
- * SendQ-Always causes the server to put all outbound data into the sendq and
- * flushing the sendq at the end of input processing. This should cause more
- * efficient write's to be made to the network.
- * There *shouldn't* be any problems with this method.
- * -avalon
- */
-#define SENDQ_ALWAYS
-
-/* FLUD - CTCP Flood Detection and Protection
- * 
- * This enables server CTCP flood detection and protection for local clients.
- * It works well against fludnets and flood clones.  The effect of this code
- * on server CPU and memory usage is minimal, however you may not wish to
- * take the risk, or be fundamentally opposed to checking the contents of
- * PRIVMSG's (though no privacy is breached).  This code is not useful for
- * routing only servers (ie, HUB's with little or no local client base), and
- * the hybrid team strongly recommends that you do not use FLUD with HUB.
- * The following default thresholds may be tweaked, but these seem to work
- * well.
- */
-#define FLUD
-
-/* ANTI_DRONE_FLOOD - anti flooding code for drones
- * This code adds server side ignore for a client who gets
- * messaged more than drone_count times within drone_time seconds
- * unfortunately, its a great DOS, but at least the client won't flood off.
- * I have no idea what to use for values here, trying 8 privmsgs
- * within 1 seconds. (I'm told it is usually that fast)
- * I'll do better next time, this is a Q&D -Dianora
- */
-#define ANTI_DRONE_FLOOD
-#define DEFAULT_DRONE_TIME 1
-#define DEFAULT_DRONE_COUNT 8
-
-/* JUPE_CHANNEL - jupes a channel from being joined on this server only
- * if added to Q lines e.g. Q:\#packet_channel:Tired of packets
- */
-#undef JUPE_CHANNEL
-
-/* 
- * ANTI_SPAMBOT
- * if ANTI_SPAMBOT is defined try to discourage spambots
- * The defaults =should= be fine for the timers/counters etc.
- * but you can play with them. -Dianora
- *
- * Defining this also does a quick check whether the client sends
- * us a "user foo x x :foo" where x is just a single char.  More
- * often than not, it's a bot if it did. -ThemBones
- */
-#define ANTI_SPAMBOT
-
-/* ANTI_SPAMBOT parameters, don't touch these if you don't
- * understand what is going on.
- *
- * if a client joins MAX_JOIN_LEAVE_COUNT channels in a row,
- * but spends less than MIN_JOIN_LEAVE_TIME seconds
- * on each one, flag it as a possible spambot.
- * disable JOIN for it and PRIVMSG but give no indication to the client
- * that this is happening.
- * every time it tries to JOIN OPER_SPAM_COUNTDOWN times, flag
- * all opers on local server.
- * If a client doesn't LEAVE a channel for at least 2 minutes
- * the join/leave counter is decremented each time a LEAVE is done
- *
- */
-#define MIN_JOIN_LEAVE_TIME  60
-#define MAX_JOIN_LEAVE_COUNT  25
-#define OPER_SPAM_COUNTDOWN   5 
-#define JOIN_LEAVE_COUNT_EXPIRE_TIME 120
-
-/*
- * If ANTI_SPAMBOT_WARN_ONLY is #define'd 
- * Warn opers about possible spambots only, do not disable
- * JOIN and PRIVMSG if possible spambot is noticed
- * Depends on your policies.
- */
-#undef ANTI_SPAMBOT_WARN_ONLY
-
-/* ANTI_SPAM_EXIT_MESSAGE
- *
- * If this is defined, do not allow the clients exit message to be
- * sent to a channel if the client has been on for less than
- * ANTI_SPAM_EXIT_MESSAGE_TIME.
- * The idea is, some spambots exit with their spam, thus advertising
- * this way.
- * (idea due to ThaDragon, I just couldn't find =his= code)
- * - Dianora
- */
-#undef ANTI_SPAM_EXIT_MESSAGE
-/* 300 is five minutes, seems reasonable */
-#define ANTI_SPAM_EXIT_MESSAGE_TIME 300
-
-#ifdef FLUD
-#define FLUD_NUM        4       /* Number of flud messages to trip alarm */
-#define FLUD_TIME       3       /* Seconds in which FLUD_NUM msgs must occur */
-#define FLUD_BLOCK      15      /* Seconds to block fluds */
-#endif
-
-/* REJECT_HOLD 
- * clients that reconnect but are k-lined will have their connections
- * "held" for REJECT_HOLD_TIME seconds, they cannot PRIVMSG. The idea
- * is to keep a reconnecting client from forcing the ircd to re-scan
- * mtrie_conf.
- *
- */
-  
-#undef REJECT_HOLD
-#define REJECT_HOLD_TIME 30 
-
-/* maximum number of fd's that will be used for reject holding */
-#define REJECT_HELD_MAX 25
-
-/*
- * OLD_Y_LIMIT
- *
- * #define this if you prefer the old behaviour of I lines
- * the default behaviour is to limit the total number of clients
- * using the max client limit in the corresponding Y line (class)
- * The old behaviour was to limit the client count per I line
- * without regard to the total class limit. Each have advantages
- * and disadvantages. In an open I line server, the default behaviour
- * i.e. #undef OLD_Y_LIMIT makes more sense, because you can limit
- * the total number of clients in a class. In a closed I line server
- * The old behaviour can make more sense.
- *
- * -Dianora
-*/
-#undef OLD_Y_LIMIT
-
-/*
- * If the OS has SOMAXCONN use that value, otherwise
- * Use the value in HYBRID_SOMAXCONN for the listen(); backlog
- * try 5 or 25. 5 for AIX and SUNOS, 25 should work better for other OS's
-*/
-#define HYBRID_SOMAXCONN 25
-
-/* DEBUGMODE is used mostly for internal development, it is likely
- * to make your client server very sluggish.
- * You usually shouldn't need this. -Dianora
-*/
-#undef DEBUGMODE               /* define DEBUGMODE to enable debugging mode.*/
-
-/*
- * viconf option, if USE_RCS is defined, viconf will use rcs "ci"
- * to keep the conf file  under RCS control.
- */
-#define USE_RCS
-
-/* ----------------- not approved on EFnet section -------------------- */
-/* GLINES - global Kline-like bans
- * Define this if you want GLINE support
- * when this is defined, 3 completely different opers from
- * three different servers must do the identical GLINE in order
- * for the G line to take effect.
- */
-#undef GLINES
-#define GLINEFILE       "gline.log"
-
-/* GLINE_TIME - local expire time for GLINES
- * As configured here, a GLINE will last 12 hours
- */
-#define GLINE_TIME      (12*3600)
-
-/* ----------------- archaic and/or broken section -------------------- */
-#undef DNS_DEBUG
-
-/* SETUID_ROOT - plock - keep the ircd from being swapped out.
- * BSD swapping criteria do not match the requirements of ircd.
- * Note that the server needs to be setuid root for this to work.
- * The result of this is that the text segment of the ircd will be
- * locked in core; thus swapper cannot touch it and the behavior
- * noted above will not occur.  This probably doesn't work right
- * anymore.  IRCD_UID MUST be defined correctly if SETUID_ROOT.
- */
-#undef SETUID_ROOT
- 
-/* SUN_GSO_BUG support removed
- *
- * if you still have a machine with this bug, it doesn't belong on EFnet
- */
-
-/* CHROOTDIR - chroot() before reading conf
- * Define for value added security if you are paranoid.
- * All files you access must be in the directory you define as DPATH.
- * (This may effect the PATH locations above, though you can symlink it)
- *
- * You may want to define IRC_UID and IRC_GID
- */
-#undef CHROOTDIR
-
-/* ------------------------- END CONFIGURATION SECTION -------------------- */
-#define MAX_CLIENTS INIT_MAXCLIENTS
-
-#if defined(CLIENT_FLOOD) && ((CLIENT_FLOOD > 8000) || (CLIENT_FLOOD < 512))
-error CLIENT_FLOOD needs redefining.
-#endif
-
-#if !defined(CLIENT_FLOOD)
-error CLIENT_FLOOD undefined.
-#endif
-
-#if defined(DEBUGMODE) || defined(DNS_DEBUG)
-#  define Debug(x) debug x
-#  define LOGFILE LPATH
-#else
-#  define Debug(x) ;
-#  define LOGFILE "/dev/null"
-#endif
-
-#define REPORT_DLINE_TO_USER
-
-#if defined(NO_CHANOPS_WHEN_SPLIT) || defined(PRESERVE_CHANNEL_ON_SPLIT) || \
-        defined(NO_JOIN_ON_SPLIT) || defined(NO_JOIN_ON_SPLIT_SIMPLE)
-#define NEED_SPLITCODE
-#endif
-
-#ifdef FLUD
-void    free_fluders();
-void    free_fludees();
-#endif /* FLUD */
-
-#ifdef ANTI_SPAMBOT
-#define MIN_SPAM_NUM 5
-#define MIN_SPAM_TIME 60
-#endif
-
-#ifdef IDLE_CHECK
-#define MIN_IDLETIME 1800
-#endif
-
-#define CONFIG_H_LEVEL_6
-
-#endif /* INCLUDED_config_h */
diff -uNrd ircd-hybrid-6.0/include/dbuf.h ircd-pi1.0a/include/dbuf.h
--- ircd-hybrid-6.0/include/dbuf.h	Sat Sep  4 16:21:08 1999
+++ ircd-pi1.0a/include/dbuf.h	Fri Nov  2 19:23:21 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dbuf.h,v 1.6 1999/09/04 20:21:08 lusky Exp $ */
+/* $Id: dbuf.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $ */
 #ifndef INCLUDED_dbuf_h
 #define INCLUDED_dbuf_h
 #ifndef INCLUDED_config_h
diff -uNrd ircd-hybrid-6.0/include/dline_conf.h ircd-pi1.0a/include/dline_conf.h
--- ircd-hybrid-6.0/include/dline_conf.h	Thu Oct  5 23:00:56 2000
+++ ircd-pi1.0a/include/dline_conf.h	Fri Nov  2 19:23:21 2001
@@ -1,6 +1,6 @@
 /* dline_conf.h  -- lets muse over dlines, shall we?
  *
- * $Id: dline_conf.h,v 1.4 2000/10/06 03:00:56 lusky Exp $ 
+ * $Id: dline_conf.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $ 
  */
 
 #ifndef INCLUDED_dline_conf_h
diff -uNrd ircd-hybrid-6.0/include/fdlist.h ircd-pi1.0a/include/fdlist.h
--- ircd-hybrid-6.0/include/fdlist.h	Sat Jul 24 03:54:00 1999
+++ ircd-pi1.0a/include/fdlist.h	Fri Nov  2 19:23:21 2001
@@ -1,7 +1,7 @@
 /*
  * fdlist.h
  *
- * $Id: fdlist.h,v 1.10 1999/07/24 07:54:00 tomh Exp $
+ * $Id: fdlist.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $
  */
 #ifndef INCLUDED_fdlist_h
 #define INCLUDED_fdlist_h
diff -uNrd ircd-hybrid-6.0/include/fileio.h ircd-pi1.0a/include/fileio.h
--- ircd-hybrid-6.0/include/fileio.h	Tue Jul 13 01:58:53 1999
+++ ircd-pi1.0a/include/fileio.h	Fri Nov  2 19:23:21 2001
@@ -16,7 +16,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: fileio.h,v 1.2 1999/07/13 05:58:53 tomh Exp $
+ * $Id: fileio.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $
  */
 #ifndef INCLUDED_fileio_h
 #define INCLUDED_fileio_h
diff -uNrd ircd-hybrid-6.0/include/flud.h ircd-pi1.0a/include/flud.h
--- ircd-hybrid-6.0/include/flud.h	Thu Oct  5 23:00:56 2000
+++ ircd-pi1.0a/include/flud.h	Fri Nov  2 19:23:21 2001
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: flud.h,v 1.4 2000/10/06 03:00:56 lusky Exp $ 
+ * $Id: flud.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $ 
  */
 #ifndef INCLUDED_flud_h
 #define INCLUDED_flud_h
diff -uNrd ircd-hybrid-6.0/include/hash.h ircd-pi1.0a/include/hash.h
--- ircd-hybrid-6.0/include/hash.h	Sun Aug  1 02:47:15 1999
+++ ircd-pi1.0a/include/hash.h	Fri Nov  2 19:23:21 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: hash.h,v 1.8 1999/08/01 06:47:15 tomh Exp $
+ *   $Id: hash.h,v 1.1.1.1 2001/11/03 00:23:21 shifty Exp $
  */
 #ifndef INCLUDED_hash_h
 #define INCLUDED_hash_h
diff -uNrd ircd-hybrid-6.0/include/irc_string.h ircd-pi1.0a/include/irc_string.h
--- ircd-hybrid-6.0/include/irc_string.h	Fri Sep  1 23:42:08 2000
+++ ircd-pi1.0a/include/irc_string.h	Fri May 10 21:30:42 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: irc_string.h,v 1.15 2000/09/02 03:42:08 lusky Exp $
+ *   $Id: irc_string.h,v 1.2 2002/05/11 01:30:42 smoli Exp $
  */
 #ifndef INCLUDED_irc_string_h
 #define INCLUDED_irc_string_h
@@ -40,6 +40,10 @@
  */
 extern char* collapse(char *pattern);
 /*
+ * irclen - lenght of string s
+ */
+extern size_t irclen(const char *s);
+/*
  * irccmp - case insensitive comparison of s1 and s2
  */
 extern int irccmp(const char *s1, const char *s2);
@@ -141,5 +145,8 @@
 
 #define IsNonEOS(c) (CharAttrs[(unsigned char)(c)] & NONEOS_C)
 #define IsEol(c) (CharAttrs[(unsigned char)(c)] & EOL_C)
+
+#define to_upper(c) ((unsigned char)(c) >= (unsigned char)'a'  && (unsigned char)(c) <= (unsigned char)'z') || \
+                    ((unsigned char)(c) >= (unsigned char)'à' && (unsigned char)(c) < (unsigned char)'ÿ') ? ((c) - 0x20) : (c)
 
 #endif /* INCLUDED_irc_string_h */
diff -uNrd ircd-hybrid-6.0/include/ircd.h ircd-pi1.0a/include/ircd.h
--- ircd-hybrid-6.0/include/ircd.h	Sat Dec 30 19:11:55 2000
+++ ircd-pi1.0a/include/ircd.h	Fri May 10 01:32:24 2002
@@ -19,7 +19,7 @@
  *
  * "ircd.h". - Headers file.
  *
- * $Id: ircd.h,v 1.18 2000/12/31 00:11:55 lusky Exp $
+ * $Id: ircd.h,v 1.2 2002/05/10 05:32:24 smoli Exp $
  *
  */
 #ifndef INCLUDED_ircd_h
@@ -75,10 +75,18 @@
   int     chan;           /* Channels */
   int     local;          /* Local Clients */
   int     total;          /* total clients */
+#ifdef HAVE_SSL
+  int     local_ssl;      /* local SSL clients */
+  int     reach_ssl;      /* reachable SSL clients */
+#endif
   int     invisi;         /* invisible clients */
   int     unknown;        /* unknown connections */
   int     max_loc;        /* MAX local clients */
   int     max_tot;        /* MAX global clients */
+#ifdef HAVE_SSL
+  int     max_loc_ssl;    /* MAX local SSL clients */
+  int     max_rch_ssl;    /* MAX reachable SSL clients */
+#endif
   unsigned long totalrestartcount;   /* Total clients since restart */
 };
 
@@ -133,11 +141,15 @@
 extern time_t         LCF;
 extern time_t         nextconnect;
 extern time_t         nextping;
-
-
 extern struct Client* local_cptr_list;
 extern struct Client* oper_cptr_list;
 extern struct Client* serv_cptr_list;
+
+#ifdef BACKUP
+extern int    backup_mode;
+extern int    main_retry;
+extern int    backup_retry;
+#endif /* BACKUP */
 
 #ifdef REJECT_HOLD
 extern int reject_held_fds;
diff -uNrd ircd-hybrid-6.0/include/ircd_defs.h ircd-pi1.0a/include/ircd_defs.h
--- ircd-hybrid-6.0/include/ircd_defs.h	Thu Jul 22 02:33:26 1999
+++ ircd-pi1.0a/include/ircd_defs.h	Fri Nov  2 19:23:22 2001
@@ -17,7 +17,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: ircd_defs.h,v 1.7 1999/07/22 06:33:26 tomh Exp $
+ * $Id: ircd_defs.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  *
  * ircd_defs.h - Global size definitions for record entries used
  * througout ircd. Please think 3 times before adding anything to this
@@ -35,14 +35,14 @@
 #define HOSTLEN         63      /* Length of hostname.  Updated to         */
                                 /* comply with RFC1123                     */
 
-#define NICKLEN         9       /* Necessary to put 9 here instead of 10
+#define NICKLEN         30      /* Necessary to put 9 here instead of 10
                                  * if s_msg.c/m_nick has been corrected.
                                  * This preserves compatibility with old
                                  * servers --msa
                                  */
 #define USERLEN         10
 #define REALLEN         50
-#define TOPICLEN        120     /* old value 90, truncated on other servers */
+#define TOPICLEN        240     /* old value 90, truncated on other servers */
 #define KILLLEN         90      
 #define CHANNELLEN      200
 #define KEYLEN          23
diff -uNrd ircd-hybrid-6.0/include/ircd_signal.h ircd-pi1.0a/include/ircd_signal.h
--- ircd-hybrid-6.0/include/ircd_signal.h	Fri Jul 23 01:05:31 1999
+++ ircd-pi1.0a/include/ircd_signal.h	Fri Nov  2 19:23:22 2001
@@ -17,7 +17,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: ircd_signal.h,v 1.1 1999/07/23 05:05:31 tomh Exp $
+ * $Id: ircd_signal.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  *
  */
 #ifndef INCLUDED_ircd_signal_h
diff -uNrd ircd-hybrid-6.0/include/list.h ircd-pi1.0a/include/list.h
--- ircd-hybrid-6.0/include/list.h	Tue Jul 27 22:42:12 1999
+++ ircd-pi1.0a/include/list.h	Fri Nov  2 19:23:22 2001
@@ -20,7 +20,7 @@
  * "list.h". - Headers file.
  *
  *
- * $Id: list.h,v 1.4 1999/07/28 02:42:12 db Exp $
+ * $Id: list.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  *
  */
 
diff -uNrd ircd-hybrid-6.0/include/listener.h ircd-pi1.0a/include/listener.h
--- ircd-hybrid-6.0/include/listener.h	Thu Jul 29 03:06:47 1999
+++ ircd-pi1.0a/include/listener.h	Tue May 21 22:14:28 2002
@@ -16,7 +16,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: listener.h,v 1.4 1999/07/29 07:06:47 tomh Exp $
+ * $Id: listener.h,v 1.5 2002/05/22 02:14:28 smoli Exp $
  */
 #ifndef INCLUDED_listener_h
 #define INCLUDED_listener_h
@@ -31,6 +31,7 @@
 #ifndef INCLUDED_ircd_defs_h
 #include "ircd_defs.h"       /* HOSTLEN */
 #endif
+#include "config.h"
 
 struct Client;
 
@@ -45,12 +46,19 @@
   time_t           last_accept;        /* last time listener accepted */
   struct in_addr   addr;               /* virtual address or INADDR_ANY */
   char             vhost[HOSTLEN + 1]; /* virtual name of listener */
+#ifdef HAVE_SSL
+  int              is_ssl;             /* is an SSL listener */
+#endif
 };
 
 extern struct Listener* ListenerPollList; /* GLOBAL - listener list */
 
 extern void        accept_connection(struct Listener* listener);
-extern void        add_listener(int port, const char* vaddr_ip);
+#ifdef HAVE_SSL
+extern int         add_listener(int port, const char* vaddr_ip, int is_ssl);
+#else
+extern int         add_listener(int port, const char* vaddr_ip);
+#endif
 extern void        close_listener(struct Listener* listener);
 extern void        close_listeners(void);
 extern const char* get_listener_name(const struct Listener* listener);
diff -uNrd ircd-hybrid-6.0/include/m_commands.h ircd-pi1.0a/include/m_commands.h
--- ircd-hybrid-6.0/include/m_commands.h	Fri Jul 30 22:44:44 1999
+++ ircd-pi1.0a/include/m_commands.h	Wed May 22 07:07:10 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_commands.h,v 1.3 1999/07/31 02:44:44 tomh Exp $
+ * $Id: m_commands.h,v 1.5 2002/05/22 11:07:10 smoli Exp $
  */
 #ifndef INCLUDED_m_commands_h
 #define INCLUDED_m_commands_h
@@ -31,6 +31,7 @@
 
 extern int m_admin(struct Client *,struct Client *,int,char **);
 extern int m_kline(struct Client *,struct Client *,int,char **);
+extern int m_ungline(struct Client *,struct Client *,int,char **);
 extern int m_unkline(struct Client *,struct Client *,int,char **);
 extern int m_dline(struct Client *,struct Client *,int,char **);
 
@@ -40,6 +41,11 @@
 
 extern int m_private(struct Client *,struct Client *,int,char **);
 extern int m_knock(struct Client *,struct Client *,int,char **);
+extern int m_spoof(struct Client *,struct Client *,int,char **);
+#ifdef HAVE_SSL
+extern int m_cert(struct Client *,struct Client *,int,char **);
+#endif
+extern int m_broadcast(struct Client *,struct Client *,int,char **);
 extern int m_topic(struct Client *,struct Client *,int,char **);
 extern int m_join(struct Client *,struct Client *,int,char **);
 extern int m_part(struct Client *,struct Client *,int,char **);
diff -uNrd ircd-hybrid-6.0/include/m_gline.h ircd-pi1.0a/include/m_gline.h
--- ircd-hybrid-6.0/include/m_gline.h	Thu Aug 24 20:20:41 2000
+++ ircd-pi1.0a/include/m_gline.h	Sun Mar 17 13:43:47 2002
@@ -19,7 +19,7 @@
  *
  * "m_gline.h". - Headers file.
  *
- * $Id: m_gline.h,v 1.4 2000/08/25 00:20:41 lusky Exp $
+ * $Id: m_gline.h,v 1.2 2002/03/17 18:43:47 shifty Exp $
  *
  */
 
@@ -44,6 +44,7 @@
 extern struct ConfItem* find_is_glined(const char *, const char *);
 extern void   flush_glines(void);             
 extern void   report_glines(struct Client *); 
+extern int    remove_gline_match(char *host, char *user);
 
 typedef struct gline_pending
 {
@@ -54,12 +55,12 @@
   char *reason1;
   time_t time_request1;
 
-  char oper_nick2[NICKLEN + 1];
+/*  char oper_nick2[NICKLEN + 1];
   char oper_user2[USERLEN + 1];
   char oper_host2[HOSTLEN + 1];
-  const char* oper_server2;     /* point to scache */
+  const char* oper_server2;     // point to scache
   char *reason2;
-  time_t time_request2;
+  time_t time_request2;*/
   
   time_t last_gline_time;       /* for expiring entry */
   char user[USERLEN + 1];
diff -uNrd ircd-hybrid-6.0/include/m_info.h ircd-pi1.0a/include/m_info.h
--- ircd-hybrid-6.0/include/m_info.h	Fri Nov 24 13:51:13 2000
+++ ircd-pi1.0a/include/m_info.h	Fri Nov  2 19:23:22 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_info.h,v 1.6 2000/11/24 18:51:13 lusky Exp $
+ * $Id: m_info.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  */
 #ifndef INCLUDED_m_info_h
 #define INCLUDED_m_info_h
diff -uNrd ircd-hybrid-6.0/include/m_kline.h ircd-pi1.0a/include/m_kline.h
--- ircd-hybrid-6.0/include/m_kline.h	Fri Jul 30 02:48:11 1999
+++ ircd-pi1.0a/include/m_kline.h	Fri Nov  2 19:23:22 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_kline.h,v 1.4 1999/07/30 06:48:11 tomh Exp $
+ * $Id: m_kline.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  */
 #ifndef INCLUDED_m_kline_h
 #define INCLUDED_m_kline_h
diff -uNrd ircd-hybrid-6.0/include/motd.h ircd-pi1.0a/include/motd.h
--- ircd-hybrid-6.0/include/motd.h	Sun Jul 25 14:05:06 1999
+++ ircd-pi1.0a/include/motd.h	Fri Nov  2 19:23:22 2001
@@ -1,7 +1,7 @@
 /*
  * motd.h
  *
- * $Id: motd.h,v 1.7 1999/07/25 18:05:06 tomh Exp $
+ * $Id: motd.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $
  */
 #ifndef INCLUDED_motd_h
 #define INCLUDED_motd_h
diff -uNrd ircd-hybrid-6.0/include/msg.h ircd-pi1.0a/include/msg.h
--- ircd-hybrid-6.0/include/msg.h	Wed Nov  8 22:46:52 2000
+++ ircd-pi1.0a/include/msg.h	Wed May 22 07:07:10 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: msg.h,v 1.14 2000/11/09 03:46:52 lusky Exp $
+ * $Id: msg.h,v 1.5 2002/05/22 11:07:10 smoli Exp $
  */
 #ifndef INCLUDED_msg_h
 #define INCLUDED_msg_h
@@ -119,13 +119,18 @@
 #define MSG_SET      "SET"      /* SET */
 
 #define MSG_GLINE    "GLINE"    /* GLINE */
-
+#define MSG_UNGLINE  "UNGLINE"	/* UNGLINE */
 
 #define MSG_LOCOPS   "LOCOPS"   /* LOCOPS */
 #ifdef LWALLOPS
 #define MSG_LWALLOPS "LWALLOPS" /* Same as LOCOPS */
 #endif /* LWALLOPS */
 #define MSG_KNOCK          "KNOCK"  /* KNOCK */
+#define MSG_SPOOF          "SPOOF"  /* SPOOF */
+#ifdef HAVE_SSL
+#define MSG_CERT           "CERT"   /* CERT */
+#endif
+#define MSG_BROADCAST      "BROADCAST" /* BROADCAST */
 
 #define MAXPARA    15 
 
@@ -166,6 +171,11 @@
   { MSG_QUIT,    m_quit,     0, MAXPARA, 1, 1, 0, 0L },
   { MSG_PART,    m_part,     0, MAXPARA, 1, 0, 0, 0L },
   { MSG_KNOCK,   m_knock,    0, MAXPARA, 1, 0, 0, 0L },
+  { MSG_SPOOF,   m_spoof,    0, MAXPARA, 1, 0, 0, 0L },
+#ifdef HAVE_SSL
+  { MSG_CERT,    m_cert,     0, MAXPARA, 1, 0, 0, 0L },
+#endif      
+  { MSG_BROADCAST, m_broadcast, 0, MAXPARA, 1, 0, 0, 0L },    
   { MSG_TOPIC,   m_topic,    0, MAXPARA, 1, 0, 0, 0L },
   { MSG_INVITE,  m_invite,   0, MAXPARA, 1, 0, 0, 0L },
   { MSG_KICK,    m_kick,     0, MAXPARA, 1, 0, 0, 0L },
@@ -239,6 +249,7 @@
   { MSG_UNKLINE, m_unkline,  0, MAXPARA, 1, 0, 0, 0L },
   { MSG_DLINE,   m_dline,    0, MAXPARA, 1, 0, 0, 0L },
   { MSG_GLINE,   m_gline,    0, MAXPARA, 1, 0, 0, 0L },
+  { MSG_UNGLINE, m_ungline,  0, MAXPARA, 1, 0, 0, 0L },
   { MSG_HASH,    m_hash,     0, MAXPARA, 1, 0, 0, 0L },
   { MSG_DNS,     m_dns,      0, MAXPARA, 1, 0, 0, 0L },
   { MSG_REHASH,  m_rehash,   0, MAXPARA, 1, 0, 0, 0L },
diff -uNrd ircd-hybrid-6.0/include/mtrie_conf.h ircd-pi1.0a/include/mtrie_conf.h
--- ircd-hybrid-6.0/include/mtrie_conf.h	Sat Jul 31 19:45:48 1999
+++ ircd-pi1.0a/include/mtrie_conf.h	Fri Nov  2 19:23:22 2001
@@ -1,4 +1,4 @@
-/* $Id: mtrie_conf.h,v 1.6 1999/07/31 23:45:48 db Exp $ */
+/* $Id: mtrie_conf.h,v 1.1.1.1 2001/11/03 00:23:22 shifty Exp $ */
 #ifndef INCLUDED_mtrie_conf_h
 #define INCLUDED_mtrie_conf_h
 
diff -uNrd ircd-hybrid-6.0/include/numeric.h ircd-pi1.0a/include/numeric.h
--- ircd-hybrid-6.0/include/numeric.h	Thu Dec 23 02:10:51 1999
+++ ircd-pi1.0a/include/numeric.h	Thu May 23 00:22:22 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: numeric.h,v 1.16 1999/12/23 07:10:51 lusky Exp $
+ * $Id: numeric.h,v 1.7 2002/05/23 04:22:22 smoli Exp $
  */
 #ifndef INCLUDED_numeric_h
 #define INCLUDED_numeric_h
@@ -175,6 +175,7 @@
 
 #define RPL_STATSFLINE       224
 #define RPL_STATSDLINE       225
+#define RPL_STATSSSL         226
 
 #define RPL_SERVLIST         234
 #define RPL_SERVLISTEND      235
@@ -204,8 +205,12 @@
 
 #define RPL_LOCALUSERS       265
 #define RPL_GLOBALUSERS      266
+#define RPL_LOCALSSL         267
+#define RPL_REACHSSL         268
 
 /* numeric_replies */
+#define RPL_WHOISSSL         275
+#define RPL_NOTSSL           276
 
 #define RPL_NONE             300
 #define RPL_AWAY             301
@@ -215,6 +220,8 @@
 #define RPL_UNAWAY           305
 #define RPL_NOWAWAY          306
 
+#define RPL_WHOISINFO        309
+#define RPL_WHOISENFORCE     310
 #define RPL_WHOISUSER        311
 #define RPL_WHOISSERVER      312
 #define RPL_WHOISOPERATOR    313
@@ -326,6 +333,7 @@
 #define ERR_YOUWILLBEBANNED  466
 #define ERR_KEYSET           467
 
+#define ERR_NEEDSSL          470
 #define ERR_CHANNELISFULL    471
 #define ERR_UNKNOWNMODE      472
 #define ERR_INVITEONLYCHAN   473
diff -uNrd ircd-hybrid-6.0/include/oratime.h ircd-pi1.0a/include/oratime.h
--- ircd-hybrid-6.0/include/oratime.h	Sun Aug  1 03:19:43 1999
+++ ircd-pi1.0a/include/oratime.h	Wed Dec 31 19:00:00 1969
@@ -1,55 +0,0 @@
-/* 
- * Internet Relay Chat, include/oratime.h
- *   Copyright (C) 1990 Jarkko Oikarinen and
- *                      University of Oulu, Computing Center
- *
- *   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: oratime.h,v 1.1 1999/08/01 07:19:43 tomh Exp $
- */
-#ifndef INCLUDED_oratime_h
-#define INCLUDED_oratime_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
-
-#ifdef ORATIMING
-/* 
- * Timing stuff (for performance measurements): compile with -DORATIMING
- * and put a TMRESET where you want the counter of time spent set to 0,
- * a TMPRINT where you want the accumulated results, and TMYES/TMNO pairs
- * around the parts you want timed -orabidoo
- */
-extern void orat_reset(void);
-extern void orat_yes(void);
-extern void orat_no(void);
-extern void orat_report(void);
-
-#define TMRESET orat_reset();
-#define TMYES   orat_yes();
-#define TMNO    orat_no(); 
-#define TMPRINT orat_report();
-
-#else
-
-#define TMRESET
-#define TMYES
-#define TMNO
-#define TMPRINT
-#endif
-
-#endif /* INCLUDED_oratime_h */
-
diff -uNrd ircd-hybrid-6.0/include/packet.h ircd-pi1.0a/include/packet.h
--- ircd-hybrid-6.0/include/packet.h	Sat Sep  4 16:21:08 1999
+++ ircd-pi1.0a/include/packet.h	Fri Nov  2 19:23:23 2001
@@ -19,7 +19,7 @@
  *
  * "packet.h". - Headers file.
  *
- * $Id: packet.h,v 1.2 1999/09/04 20:21:08 lusky Exp $
+ * $Id: packet.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  *
  */
 #ifndef INCLUDED_packet_h
diff -uNrd ircd-hybrid-6.0/include/parse.h ircd-pi1.0a/include/parse.h
--- ircd-hybrid-6.0/include/parse.h	Mon Jul 26 01:46:35 1999
+++ ircd-pi1.0a/include/parse.h	Fri Nov  2 19:23:23 2001
@@ -20,7 +20,7 @@
  * "parse.h". - Headers file.
  *
  *
- * $Id: parse.h,v 1.3 1999/07/26 05:46:35 tomh Exp $
+ * $Id: parse.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  *
  */
 #ifndef INCLUDED_parse_h_h
diff -uNrd ircd-hybrid-6.0/include/patchlevel.h ircd-pi1.0a/include/patchlevel.h
--- ircd-hybrid-6.0/include/patchlevel.h	Wed Jan  3 22:14:27 2001
+++ ircd-pi1.0a/include/patchlevel.h	Sun May  5 23:02:16 2002
@@ -14,8 +14,16 @@
  *   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: patchlevel.h,v 1.7 2002/05/06 03:02:16 smoli Exp $
  */
 
+#include "setup.h"
+
 #ifndef PATCHLEVEL
-#define PATCHLEVEL    "2.8/hybrid-6.0"
+#ifndef HAVE_SSL
+#define PATCHLEVEL    "2.8/"VERSION
+#else
+#define PATCHLEVEL    "2.8/"VERSION"+ssl"
+#endif
 #endif
diff -uNrd ircd-hybrid-6.0/include/res.h ircd-pi1.0a/include/res.h
--- ircd-hybrid-6.0/include/res.h	Thu Oct  5 23:00:56 2000
+++ ircd-pi1.0a/include/res.h	Fri Nov  2 19:23:23 2001
@@ -1,7 +1,7 @@
 /*
  * include/res.h (C)opyright 1992 Darren Reed.
  *
- * $Id: res.h,v 1.14 2000/10/06 03:00:56 lusky Exp $
+ * $Id: res.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  */
 #ifndef INCLUDED_res_h
 #define INCLUDED_res_h
diff -uNrd ircd-hybrid-6.0/include/restart.h ircd-pi1.0a/include/restart.h
--- ircd-hybrid-6.0/include/restart.h	Thu Oct  5 23:00:57 2000
+++ ircd-pi1.0a/include/restart.h	Fri Nov  2 19:23:23 2001
@@ -1,5 +1,5 @@
 /*
- * $Id: restart.h,v 1.4 2000/10/06 03:00:57 lusky Exp $ 
+ * $Id: restart.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $ 
  */
 
 #ifndef INCLUDED_restart_h
diff -uNrd ircd-hybrid-6.0/include/s_auth.h ircd-pi1.0a/include/s_auth.h
--- ircd-hybrid-6.0/include/s_auth.h	Sun Jul 11 18:39:57 1999
+++ ircd-pi1.0a/include/s_auth.h	Fri Nov  2 19:23:23 2001
@@ -15,7 +15,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_auth.h,v 1.2 1999/07/11 22:39:57 tomh Exp $
+ *   $Id: s_auth.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  */
 #ifndef INCLUDED_s_auth_h
 #define INCLUDED_s_auth_h
diff -uNrd ircd-hybrid-6.0/include/s_bsd.h ircd-pi1.0a/include/s_bsd.h
--- ircd-hybrid-6.0/include/s_bsd.h	Fri Apr 21 19:39:23 2000
+++ ircd-pi1.0a/include/s_bsd.h	Sun May  5 00:07:37 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_bsd.h,v 1.14 2000/04/21 23:39:23 lusky Exp $
+ *   $Id: s_bsd.h,v 1.3 2002/05/05 04:07:37 smoli Exp $
  *
  */
 #ifndef INCLUDED_s_bsd_h
@@ -49,6 +49,7 @@
 extern int   read_message (time_t, unsigned char);
 extern void  report_error(const char*, const char*, int);
 extern int   set_non_blocking(int);
+extern int   set_blocking(int);
 extern int   set_sock_buffers(int, int);
 extern int   send_queued(struct Client*);
 extern int   deliver_it(struct Client*, const char*, int);
diff -uNrd ircd-hybrid-6.0/include/s_conf.h ircd-pi1.0a/include/s_conf.h
--- ircd-hybrid-6.0/include/s_conf.h	Fri Dec  1 01:28:47 2000
+++ ircd-pi1.0a/include/s_conf.h	Tue May 21 22:14:28 2002
@@ -21,9 +21,30 @@
  */
 
 /*
- * $Id: s_conf.h,v 1.45 2000/12/01 06:28:47 lusky Exp $
+ * $Id: s_conf.h,v 1.4 2002/05/22 02:14:28 smoli Exp $
  *
  * $Log: s_conf.h,v $
+ * Revision 1.4  2002/05/22 02:14:28  smoli
+ * made listener, setuid, chroot, color and session stuff
+ *
+ * Revision 1.3  2002/05/18 04:05:57  smoli
+ * juhuuu
+ *
+ * Revision 1.2  2002/05/05 20:52:40  smoli
+ * guess host type
+ *
+ * Revision 1.1.1.1  2001/11/03 00:23:23  shifty
+ * yeyeh, here is it!
+ *
+ * Revision 1.1.1.1  2001/10/14 03:52:52  shifty
+ *
+ *
+ * Revision 1.1.1.1  2001/09/11 12:37:52  root
+ *
+ *
+ * Revision 1.1.1.1  2001/09/09 18:16:59  shifty
+ *
+ *
  * Revision 1.45  2000/12/01 06:28:47  lusky
  * added Gline Exemption flag ('_') to Ilines
  *
@@ -201,6 +222,7 @@
 #ifndef INCLUDED_motd_h
 #include "motd.h"               /* MessageFile */
 #endif
+#include "config.h"
 
 struct Client;
 struct SLink;
@@ -224,6 +246,7 @@
   time_t           hold;     /* Hold action until this time (calendar time) */
   struct Class*    c_class;     /* Class of connection */
   int              dns_pending; /* 1 if dns query pending, 0 otherwise */
+  int              connect_ssl; /* Used by C/N lines */
 };
 
 typedef struct QlineItem {
@@ -261,6 +284,9 @@
 #define CONF_DLINE              0x20000
 #define CONF_XLINE              0x40000
 #define CONF_ULINE              0x80000
+#ifdef HAVE_SSL
+#define CONF_SSL                0x100000
+#endif
 
 #define CONF_OPS                (CONF_OPERATOR | CONF_LOCOP)
 #define CONF_SERVER_MASK        (CONF_CONNECT_SERVER | CONF_NOCONNECT_SERVER)
@@ -358,6 +384,11 @@
 extern struct ConfItem *temporary_ip_klines;
 extern ConfigFileEntryType ConfigFileEntry;    /* GLOBAL - defined in ircd.c */
 
+#ifdef BACKUP
+extern struct ConfItem* main_link;
+extern struct ConfItem* backup_link;
+#endif /* BACKUP */
+
 extern void clear_ip_hash_table(void);
 extern void iphash_stats(struct Client *,struct Client *,int,char **,int);
 
@@ -370,7 +401,7 @@
 extern struct ConfItem* make_conf(void);
 extern void             free_conf(struct ConfItem*);
 
-extern void             read_conf_files(int cold);
+extern int              read_conf_files(int cold);
 
 extern struct DNSReply* conf_dns_lookup(struct ConfItem* aconf);
 extern int              attach_conf(struct Client*, struct ConfItem *);
@@ -396,6 +427,11 @@
                                      int);
 extern struct ConfItem* find_conf_by_name(const char* name, int status);
 extern struct ConfItem* find_conf_by_host(const char* host, int status);
+#ifdef BACKUP
+extern struct ConfItem *find_conf_main_link();
+extern struct ConfItem *find_conf_link_but();
+extern int count_conf_links();
+#endif /* BACKUP */
 extern struct ConfItem* find_kill (struct Client *);
 extern int conf_connect_allowed(struct in_addr addr);
 extern char *oper_flags_as_string(int);
diff -uNrd ircd-hybrid-6.0/include/s_debug.h ircd-pi1.0a/include/s_debug.h
--- ircd-hybrid-6.0/include/s_debug.h	Sat Jul 31 00:13:51 1999
+++ ircd-pi1.0a/include/s_debug.h	Fri Nov  2 19:23:23 2001
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_debug.h,v 1.7 1999/07/31 04:13:51 tomh Exp $
+ *   $Id: s_debug.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  */
 #ifndef INCLUDED_s_debug_h
 #define INCLUDED_s_debug_h
diff -uNrd ircd-hybrid-6.0/include/s_log.h ircd-pi1.0a/include/s_log.h
--- ircd-hybrid-6.0/include/s_log.h	Wed Oct 13 22:48:24 1999
+++ ircd-pi1.0a/include/s_log.h	Sat May 18 00:05:57 2002
@@ -17,8 +17,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: s_log.h,v 1.5 1999/10/14 02:48:24 lusky Exp $
+ * $Id: s_log.h,v 1.2 2002/05/18 04:05:57 smoli Exp $
  */
+
 #ifndef INCLUDED_s_log_h
 #define INCLUDED_s_log_h
 
@@ -34,7 +35,7 @@
 extern void close_log(void);
 extern void set_log_level(int level);
 extern int  get_log_level(void);
-extern void log(int priority, const char* fmt, ...);
+extern void *log(int priority, const char* fmt, ...);
 extern const char *get_log_level_as_string(int level);
 
 #endif /* INCLUDED_s_log_h */
diff -uNrd ircd-hybrid-6.0/include/s_misc.h ircd-pi1.0a/include/s_misc.h
--- ircd-hybrid-6.0/include/s_misc.h	Thu Oct  5 23:00:57 2000
+++ ircd-pi1.0a/include/s_misc.h	Fri Nov  2 19:23:23 2001
@@ -1,5 +1,5 @@
 /*
- * $Id: s_misc.h,v 1.7 2000/10/06 03:00:57 lusky Exp $ 
+ * $Id: s_misc.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $ 
  */
 
 #ifndef INCLUDED_s_misc_h
diff -uNrd ircd-hybrid-6.0/include/s_serv.h ircd-pi1.0a/include/s_serv.h
--- ircd-hybrid-6.0/include/s_serv.h	Fri Jul 30 02:48:11 1999
+++ ircd-pi1.0a/include/s_serv.h	Mon May  6 23:43:56 2002
@@ -17,7 +17,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: s_serv.h,v 1.8 1999/07/30 06:48:11 tomh Exp $
+ * $Id: s_serv.h,v 1.3 2002/05/07 03:43:56 smoli Exp $
  *
  */
 #ifndef INCLUDED_serv_h
@@ -45,6 +45,8 @@
 #define CAP_EX          0x00000008      /* Can do channel +e exemptions */
 #define CAP_CHW         0x00000010      /* Can do channel wall @# */
 #define CAP_DE          0x00000020      /* Can do channel +d (regex deny) */
+#define CAP_RW          0x00000040      /* Can handle remote whois */
+#define CAP_SSL         0x00000080      /* Uses SSL links */
 
 #define DoesCAP(x)      ((x)->caps)
 
@@ -67,6 +69,9 @@
 
 extern int MaxClientCount;     /* GLOBAL - highest number of clients */
 extern int MaxConnectionCount; /* GLOBAL - highest number of connections */
+#ifdef BACKUP
+extern struct Client* backup_drop;
+#endif /* BACKUP */
 
 /* 
  * allow DEFAULT_SERVER_SPLIT_RECOVERY_TIME minutes after server rejoins
@@ -100,7 +105,10 @@
 extern const char* show_capabilities(struct Client* client);
 extern void        show_servers(struct Client *);
 extern time_t      try_connections(time_t currenttime);
-
+#ifdef BACKUP
+extern void        backup_lost_link(struct Client *);
+extern int         backup_regain_link(struct Client *);
+#endif /* BACKUP */
 #endif /* INCLUDED_s_serv_h */
 
 
diff -uNrd ircd-hybrid-6.0/include/s_stats.h ircd-pi1.0a/include/s_stats.h
--- ircd-hybrid-6.0/include/s_stats.h	Fri Jul 30 16:14:04 1999
+++ ircd-pi1.0a/include/s_stats.h	Fri Nov  2 19:23:23 2001
@@ -18,7 +18,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: s_stats.h,v 1.1 1999/07/30 20:14:04 tomh Exp $
+ * $Id: s_stats.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  */
 #ifndef INCLUDED_s_stats_h
 #define INCLUDED_s_stats_h
diff -uNrd ircd-hybrid-6.0/include/s_user.h ircd-pi1.0a/include/s_user.h
--- ircd-hybrid-6.0/include/s_user.h	Fri Jul 30 22:44:44 1999
+++ ircd-pi1.0a/include/s_user.h	Tue May 14 00:03:44 2002
@@ -19,7 +19,7 @@
  *
  * "s_user.h". - Headers file.
  *
- * $Id: s_user.h,v 1.9 1999/07/31 02:44:44 tomh Exp $
+ * $Id: s_user.h,v 1.2 2002/05/14 04:03:44 smoli Exp $
  *
  */
 #ifndef INCLUDED_s_user_h
@@ -44,6 +44,7 @@
 extern void  send_umode_out (struct Client*, struct Client *, int);
 extern int   show_lusers(struct Client *, struct Client *, int, char **);
 extern void  show_opers(struct Client* client);
+extern int   valid_hostname(const char* hostname);
 
 
 #endif
diff -uNrd ircd-hybrid-6.0/include/s_zip.h ircd-pi1.0a/include/s_zip.h
--- ircd-hybrid-6.0/include/s_zip.h	Fri Jul 23 03:02:43 1999
+++ ircd-pi1.0a/include/s_zip.h	Mon May  6 23:43:56 2002
@@ -19,7 +19,7 @@
  *
  * "s_zip.h". - Headers file.
  *
- * $Id: s_zip.h,v 1.2 1999/07/23 07:02:43 tomh Exp $
+ * $Id: s_zip.h,v 1.2 2002/05/07 03:43:56 smoli Exp $
  *
  */
 #ifndef INCLUDED_s_zip_h
@@ -28,7 +28,7 @@
 #include "config.h"       /* config settings */
 #endif
 #ifndef INCLUDED_zlib_h
-#include "zlib.h"         /* z_stream */
+#include <zlib.h>         /* z_stream */
 #define INCLUDED_zlib_h
 #endif
 
diff -uNrd ircd-hybrid-6.0/include/scache.h ircd-pi1.0a/include/scache.h
--- ircd-hybrid-6.0/include/scache.h	Wed Jul 21 22:44:22 1999
+++ ircd-pi1.0a/include/scache.h	Fri Nov  2 19:23:23 2001
@@ -19,7 +19,7 @@
  *
  * "scache.h". - Headers file.
  *
- * $Id: scache.h,v 1.1 1999/07/22 02:44:22 db Exp $
+ * $Id: scache.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $
  *
  */
 #ifndef INCLUDED_scache_h
diff -uNrd ircd-hybrid-6.0/include/send.h ircd-pi1.0a/include/send.h
--- ircd-hybrid-6.0/include/send.h	Fri Nov 24 12:36:25 2000
+++ ircd-pi1.0a/include/send.h	Wed May 22 07:07:10 2002
@@ -2,7 +2,7 @@
  * send.h
  * Copyright (C) 1999 Patrick Alken
  *
- * $Id: send.h,v 1.13 2000/11/24 17:36:25 lusky Exp $
+ * $Id: send.h,v 1.3 2002/05/22 11:07:10 smoli Exp $
  */
 
 #ifndef INCLUDED_send_h
@@ -58,6 +58,7 @@
 extern  void sendto_ops_flags(int, const char *, ...);
 
 extern  void sendto_realops(const char *, ...);
+extern  void sendto_realops_lev(int, const char *, ...);
 extern  void sendto_realops_flags(int, const char *, ...);
 
 extern  void sendto_ops(const char *, ...);
@@ -65,6 +66,7 @@
                                const char *, ...);
 extern  void sendto_wallops_butone(struct Client *, struct Client *, 
                                    const char *, ...);
+extern  void sendto_myclients(struct Client *, const char *, ...);
 extern  void ts_warn(const char *, ...);
 
 extern  void sendto_prefix_one(struct Client *, struct Client *, 
diff -uNrd ircd-hybrid-6.0/include/serno.h ircd-pi1.0a/include/serno.h
--- ircd-hybrid-6.0/include/serno.h	Wed Jan  3 22:31:11 2001
+++ ircd-pi1.0a/include/serno.h	Fri Nov  2 19:23:23 2001
@@ -1 +1 @@
-#define SERIALNUM "20010103_2"
+#define SERIALNUM "20010909_3"
diff -uNrd ircd-hybrid-6.0/include/setup.h ircd-pi1.0a/include/setup.h
--- ircd-hybrid-6.0/include/setup.h	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/include/setup.h	Thu May 23 13:58:20 2002
@@ -0,0 +1,107 @@
+/* include/setup.h.  Generated by configure.  */
+/* include/setup.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define this if your server has an alternative uplink */
+#define BACKUP 1
+
+/* Enable debugging mode */
+/* #undef DEBUG */
+
+/* Define this if you want your IRCops to enforce */
+#define ENFORCE 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `crypt' library (-lcrypt). */
+#define HAVE_LIBCRYPT 1
+
+/* Define to 1 if you have the `descrypt' library (-ldescrypt). */
+/* #undef HAVE_LIBDESCRYPT */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#define HAVE_LIBNSL 1
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+#define HAVE_LIBRESOLV 1
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `z' library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define this if OpenSSL has ASN1_UTCTIME_get */
+#define HAVE_SSL 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define this if you want to run your server as a hub */
+/* #undef HUB */
+
+/* IRCD server root */
+#define IRCDDIR "/usr/local/ircd"
+
+/* IRCD user */
+#define IRCDUSER "ircs"
+
+/* Name of package */
+#define PACKAGE "ircd"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define this if you have the poll() system call */
+#define USE_POLL 1
+
+/* Version number of package */
+#define VERSION "pi1.0a"
diff -uNrd ircd-hybrid-6.0/include/setup.h.in ircd-pi1.0a/include/setup.h.in
--- ircd-hybrid-6.0/include/setup.h.in	Thu Oct  5 23:00:57 2000
+++ ircd-pi1.0a/include/setup.h.in	Thu May 23 13:58:28 2002
@@ -1,72 +1,106 @@
-/* include/setup.h.in.  Generated automatically from configure.in by autoheader.
- *
- * $Id: setup.h.in,v 1.6 2000/10/06 03:00:57 lusky Exp $ 
- */
+/* include/setup.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define if you need to in order for stat and other things to work.  */
-#undef _POSIX_SOURCE
+/* Define this if your server has an alternative uplink */
+#undef BACKUP
 
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
+/* Enable debugging mode */
+#undef DEBUG
 
-/* Define only one of POSIX, BSD, or SYSV signals.  */
-/* Define if your system has reliable POSIX signals.  */
-#undef POSIX_SIGNALS
+/* Define this if you want your IRCops to enforce */
+#undef ENFORCE
 
-/* Define if your system has reliable BSD signals.  */
-#undef BSD_RELIABLE_SIGNALS
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
 
-/* Define if your system has unreliable SYSV signals.  */
-#undef SYSV_UNRELIABLE_SIGNALS
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
 
-/* Define if you have the poll() system call.  */
-#undef USE_POLL
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
 
-/* Chose only one of NBLOCK_POSIX, NBLOCK_BSD, and NBLOCK_SYSV */
-/* Define if you have posix non-blocking sockets (O_NONBLOCK) */
-#undef NBLOCK_POSIX
+/* Define to 1 if you have the `crypt' library (-lcrypt). */
+#undef HAVE_LIBCRYPT
 
-/* Define if you have BSD non-blocking sockets (O_NDELAY) */
-#undef NBLOCK_BSD
+/* Define to 1 if you have the `descrypt' library (-ldescrypt). */
+#undef HAVE_LIBDESCRYPT
 
-/* Define if you have SYSV non-blocking sockets (FIONBIO) */
-#undef NBLOCK_SYSV
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
 
-/* Define if you have the mmap() function.  */
-#undef USE_MMAP
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV
 
-/* Define if you are running SOLARIS2.  */
-#undef OS_SOLARIS2
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
 
-/* Define if you have the <errno.h> header file.  */
-#undef HAVE_ERRNO_H
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
 
-/* Define if you have the <stddef.h> header file.  */
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define this if OpenSSL has ASN1_UTCTIME_get */
+#undef HAVE_SSL
+
+/* Define to 1 if you have the <stddef.h> header file. */
 #undef HAVE_STDDEF_H
 
-/* Define if you have the <stdlib.h> header file.  */
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define if you have the <string.h> header file.  */
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define if you have the <sys/param.h> header file.  */
+/* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
-/* Define if you have the <unistd.h> header file.  */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define if you have the <getopt.h> header file.  */
-#undef HAVE_GETOPT_H
+/* Define this if you want to run your server as a hub */
+#undef HUB
 
-/* Define if you have the descrypt library (-ldescrypt).  */
-#undef HAVE_LIBDESCRYPT
+/* IRCD server root */
+#undef IRCDDIR
 
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
+/* IRCD user */
+#undef IRCDUSER
 
-/* Define if you have the resolv library (-lresolv).  */
-#undef HAVE_LIBRESOLV
+/* Name of package */
+#undef PACKAGE
 
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define this if you have the poll() system call */
+#undef USE_POLL
+
+/* Version number of package */
+#undef VERSION
diff -uNrd ircd-hybrid-6.0/include/sprintf_irc.h ircd-pi1.0a/include/sprintf_irc.h
--- ircd-hybrid-6.0/include/sprintf_irc.h	Thu Oct  5 23:00:57 2000
+++ ircd-pi1.0a/include/sprintf_irc.h	Fri Nov  2 19:23:23 2001
@@ -1,5 +1,5 @@
 /*
- * $Id: sprintf_irc.h,v 1.2 2000/10/06 03:00:57 lusky Exp $ 
+ * $Id: sprintf_irc.h,v 1.1.1.1 2001/11/03 00:23:23 shifty Exp $ 
  */
 
 #ifndef SPRINTF_IRC
diff -uNrd ircd-hybrid-6.0/include/ssl.h ircd-pi1.0a/include/ssl.h
--- ircd-hybrid-6.0/include/ssl.h	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/include/ssl.h	Thu May 23 00:22:22 2002
@@ -0,0 +1,38 @@
+#ifndef INCLUDED_s_ssl_h
+#define INCLUDED_s_ssl_h
+
+#include "setup.h"
+
+#ifdef HAVE_SSL
+
+/* OpenSSL includes */
+#include <openssl/rsa.h>       
+#include <openssl/crypto.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include "client.h"
+
+#define RANDOM_SIZE 168 /* size of random seed */
+
+extern int ssl_capable;
+extern int ssl_cvl;
+extern int ssl_svl;
+extern char *ssl_cipher_list;
+extern char *ssl_pem_passphrase;
+extern SSL_CTX* server_ctx;
+extern SSL_CTX* client_ctx;
+extern SSL_METHOD *server_meth;
+extern SSL_METHOD *client_meth;
+extern int ssl_init();
+extern int ssl_seed_prng(char *filename);
+extern int ssl_read(struct Client *, void *, size_t);
+extern int ssl_write(struct Client *, const void *, size_t);
+extern int ssl_connect(struct Client *);  
+extern int ssl_accept(struct Client *, int);
+extern int ssl_shutdown(SSL *);
+  
+#endif /* HAVE_SSL */
+
+#endif /* INCLUDED_s_ssl_h */
diff -uNrd ircd-hybrid-6.0/include/struct.h ircd-pi1.0a/include/struct.h
--- ircd-hybrid-6.0/include/struct.h	Sun Aug  1 03:19:44 1999
+++ ircd-pi1.0a/include/struct.h	Fri Nov  2 19:23:24 2001
@@ -17,7 +17,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: struct.h,v 1.85 1999/08/01 07:19:44 tomh Exp $
+ * $Id: struct.h,v 1.1.1.1 2001/11/03 00:23:24 shifty Exp $
  */
 #ifndef INCLUDED_struct_h
 #define INCLUDED_struct_h
diff -uNrd ircd-hybrid-6.0/include/whowas.h ircd-pi1.0a/include/whowas.h
--- ircd-hybrid-6.0/include/whowas.h	Thu Oct  5 23:00:58 2000
+++ ircd-pi1.0a/include/whowas.h	Fri Nov  2 19:23:24 2001
@@ -18,7 +18,7 @@
  */
 
 /*
- * $Id: whowas.h,v 1.6 2000/10/06 03:00:58 lusky Exp $
+ * $Id: whowas.h,v 1.1.1.1 2001/11/03 00:23:24 shifty Exp $
  */
 #ifndef INCLUDED_whowas_h
 #define INCLUDED_whowas_h
diff -uNrd ircd-hybrid-6.0/install-sh ircd-pi1.0a/install-sh
--- ircd-hybrid-6.0/install-sh	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/install-sh	Sat May  4 22:04:59 2002
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		:
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		:
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		:
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff -uNrd ircd-hybrid-6.0/missing ircd-pi1.0a/missing
--- ircd-hybrid-6.0/missing	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/missing	Sat May  4 22:54:46 2002
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar ${1+"$@"} && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar ${1+"$@"} && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" ${1+"$@"} && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" ${1+"$@"} && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff -uNrd ircd-hybrid-6.0/mkinstalldirs ircd-pi1.0a/mkinstalldirs
--- ircd-hybrid-6.0/mkinstalldirs	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/mkinstalldirs	Sat May  4 22:54:46 2002
@@ -0,0 +1,101 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.2 2002/05/05 02:54:46 smoli Exp $
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+   case "${1}" in
+     -h | --help | --h* )			# -h for help
+	echo "${usage}" 1>&2; exit 0 ;;
+     -m )					# -m PERM arg
+	shift
+	test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+	dirmode="${1}"
+	shift ;;
+     -- ) shift; break ;;			# stop option processing
+     -* ) echo "${usage}" 1>&2; exit 1 ;;	# unknown option
+     * )  break ;;				# first non-opt arg
+   esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+0) exit 0 ;;
+esac
+
+case $dirmode in
+'')
+  if mkdir -p -- . 2>/dev/null; then
+    echo "mkdir -p -- $*"
+    exec mkdir -p -- "$@"
+  fi ;;
+*)
+  if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+    echo "mkdir -m $dirmode -p -- $*"
+    exec mkdir -m "$dirmode" -p -- "$@"
+  fi ;;
+esac
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+	echo "mkdir $pathcomp"
+
+	mkdir "$pathcomp" || lasterr=$?
+
+	if test ! -d "$pathcomp"; then
+	  errstatus=$lasterr
+	else
+	  if test ! -z "$dirmode"; then
+	     echo "chmod $dirmode $pathcomp"
+
+	     lasterr=""
+	     chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+	     if test ! -z "$lasterr"; then
+	       errstatus=$lasterr
+	     fi
+	  fi
+	fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 3
+# End:
+# mkinstalldirs ends here
diff -uNrd ircd-hybrid-6.0/opers.txt ircd-pi1.0a/opers.txt
--- ircd-hybrid-6.0/opers.txt	Wed Jan  3 22:31:08 2001
+++ ircd-pi1.0a/opers.txt	Wed Dec 31 19:00:00 1969
@@ -1,262 +0,0 @@
-This file outlines the features that ircd-hybrid has for IRC Operators.
-$Id: opers.txt,v 1.12 2001/01/04 03:31:08 lusky Exp $
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-Usermodes: (* designates that the umode is oper only)
-
-     USERMODE     DESCRIPTION
------------------------------------------------------------------
-         +O     - Designates this client is a local IRC Operator.
-                  Use the /oper command to attain this.
-         +o     - Designates this client is a global IRC Operator.
-                  Use the /oper command to attain this.
-         +i     - Designates this client 'invisible'.
-         +w     - Can see server wallops.
-       * +z     - Can see oper wallops.
-         +s     - Can see generic server messages and oper kills.
-       * +c     - Can see client connections and exits.
-       * +r     - Can see 'rejected' client notices.
-         +k     - Can see server kill messages.
-       * +f     - Can see 'I-line is full' notices.
-       * +y     - Can see stats/links/admin requests to name a few.
-       * +d     - Can see server debug messages.
-       * +n     - Can see client nick changes.
-       * +b     - Can see possible bot warnings.
-       * +x     - Can see new server introduction messages.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-Oper Commands: (+ indicates that /quote must be used with ircII)
-
-COMMAND         - USAGE and DESCRIPTION
--------------------------------------------------------------------
-  SQUIT         - SQUIT <server> [reason]
-                  Splits <server> away from your side of the net with
-                  [reason].
-
-  KILL          - KILL <nick> <reason>
-                  Disconnects user <nick> from the IRC server he/she
-                  is connected to with reason <reason>.
-                  Local Opers can only kill clients on his/her server.
-                  Global Opers can kill clients on any server on the
-                  IRC network.
-
-  STATS         - STATS <letter> [server|nick]
-                  Queries server [server] (or your own server if no
-                  server parameter is given) for info corresponing to
-                  <letter>.
-                  LETTER (* = Oper only.)
-                  ------ (^ = Can be configured to be oper only.)
-                    c - Shows C/N lines
-                  ^ b - Shows B lines (Obsolete)
-                  ^ d - Shows D lines
-                  ^ e - Shows E lines (Obsolete)
-                  ^ f - Shows F lines (Obsolete)
-                    g - Shows G lines
-                    h - Shows H/L lines
-                  ^ i - Shows I lines
-                    K - Shows K lines (or matched klines)
-                    k - Shows temporary K lines (or matched temp klines)
-                    L - Shows IP and generic info about [nick]
-                    l - Shows hostname and generic info about [nick]
-                    m - Shows commands and their usage
-                  ^ o - Shows O/o lines
-                  ^ P - Shows configured ports
-                    p - Shows opers connected and their idle times (disabled
-                              if LTRACE option is enabled - see below)
-                  * q - Shows quaranteened nicks
-                    r - Shows resource usage by ircd (only in DEBUGMODE)
-                  * s - Shows the server cache
-                  * t - Shows generic server stats
-                    U - Shows U lines
-                    u - Shows server uptime
-                    v - Shows connected servers and their idle times
-                    x - Shows X lines
-                  * y - Shows Y lines
-                  * z - Shows memory stats
-                    ? - Shows connected servers and sendq info about them
-
-  CONNECT       - CONNECT <server_A> [port] [server_B]
-                  When [server_B] is used, CONNECT asks [server_B] to
-                  connect to <server_A>.  Global Opers only.
-
-                  When [server_B] is not used, CONNECT trys to connect
-                  your server to <server_A>.  Local and Global Opers.
-
-                  When [port] is used, the connection will be attempted
-                  to [port].
-                  When [port] is not used, 6667 is used as a default.
-
-+ WALLOPS       - WALLOPS :<message>
-                  Sends a WALLOPS message of <message> to all opers
-                  who are umode +w and +z (see above)
-
-                  Server sent wallops go to all users who are umode
-                  +w, oper or not.
-
-+ OPERWALL      - OPERWALL :<message>
-                  Sends an OPERWALL message of <message> to all
-                  opers who are umode +w and +z
-
-+ LOCOPS        - LOCOPS :<message>
-                  Sends an LOCOPS message of <message. o to all
-                  opers on local server who are umode +w and +z
-
-+ LWALLOPS      - LWALLOPS :<message>
-                  -- If compiled with LWALLOPS --
-                  Same as LOCOPS (see above)
-
-  TRACE         - TRACE [server|nick]
-                  TRACE shows client info about [server|nick] or about
-                  the server you are on if no [server|nick] is given.
-
-                  All users that use TRACE can see the path to
-                  [server|nick] if given and all servers and opers
-                  connected, as well as the connection class they
-                  fall into.
-
-                  Opers can see all clients connected to a server
-                  with TRACE as well as the connection class they
-                  fall into.
-
-+ LTRACE        - LTRACE [server|nick]
-                  -- If compiled with LTRACE --
-                  Displays only Oper, Serv, Link, and Class reports even if
-                  the O-line is active.  Useful for just showing pertinent
-                  info of a specific server.  Note however that if the
-                  target server is not running this option then you will
-                  still receive a normal trace output.
-
-  REHASH        - REHASH [option]
-                  When no [option] is given, ircd will re-read the
-                  ircd.conf file.
-
-                  [option] can be one of the following:
-                    DNS     - Re-read the /etc/resolv.conf file
-                    IP      - Reloads the IP hash for the new and
-                              improved ACKPATCH.  Should never need 
-                              to be used.
-                    TKLINES - Clears temporary klines
-                    GLINES  - Clears G lines
-                    GC      - Performs garbage collecting of excess
-                              memory.
-                    MOTD    - Re-reads MOTD file
-                    OMOTD   - Re-reads Oper MOTD file
-                    HELP    - Re-reads this HELP file
-                    DLINES  - Re-hashes D-lines
-
-  RESTART       - RESTART
-                  Restarts the IRC server.
-
-  CLOSE         - CLOSE
-                  Close any connections from clients who have not fully
-                  registered yet.
-
-  DIE           - DIE server.name [reason]
-                  Terminates the IRC server with optional reason 
-                  [reason]
-
-+ HASH          - HASH
-                  Shows some stats about ircd's internal hashes.
-
-+ DNS           - DNS
-                  Shows some stats about ircd's asynchronous resolving
-                  code
-
-+ KLINE         - KLINE <nick|user@host> :[reason]
-                  Adds a KLINE to the ircd.conf or klines.conf file which
-                  will ban the specified user from using that server.
-                  The banned client will receive a message saying he/she
-                  is banned with reason [reason]
-
-                  KLINE user@ip.ip.ip.ip :[reason]
-                  will kline the user at the unresolved ip.
-                  ip.ip.ip.ip can be in CIDR form i.e. 192.168.0.0/24
-                  or 192.168.0.* (which is converted to CIDR form internally)
-
-                  For a temporary KLINE, length of kline is given in
-                  minutes as the first parameter i.e.
-                  KLINE 10 <nick|user@host> :cool off for 10 minutes
-
-+ UNKLINE       - UNKLINE <user@host>
-                  Will attempt to unkline the given <user@host>
-                  Will unkline a temporary kline.
-
-+ DLINE         - DLINE <nick|ip> :[reason]
-                  Adds a DLINE to the ircd.conf or klines.conf file
-                  which will deny any connections from the IP address
-                  of the banned client.  The banned client will receive
-                  a message saying he/she is banned with reason [reason]
-
-                  In order to use <nick> rather than <ip>, <nick> must
-                  be on your server.
-
-+ HTM           - HTM [option]
-                  When no [option] is given, HTM shows the current 
-                  High Traffic Mode rate and whether HTM is on or off.
-
-                  [option] can be one of the following:
-                    ON        - Forces High Traffic Mode to be on.  With
-                                this on, ircd is more efficient in
-                                reading server-to-server traffic and
-                                oper traffic, but will be less efficient
-                                than normal with normal client traffic.
-                    OFF       - Forces High Traffic Mode to be off.
-                                (see above)
-                    TO <rate> - Sets the High Traffic Mode rate to
-                                <rate>.  Ircd will automatically go
-                                into High Traffic Mode when <rate>
-                                is reached, and will automatically turn
-                                it off when things calm down.
-                    QUIET     - When set, ircd will not notify opers
-                                when it goes into and out of High
-                                Traffic Mode.
-                    NOISY     - When set, ircd will notify opers
-                                when it goes into and out of High
-                                Traffic Mode.
-+ SET           - SET <option> <value>
-                  <option> can be one of the following:
-                    LOG       - Sets the Logging level for what is logged
-                                to ircd.log and syslog.
-                    MAX       - Sets the number of max connections
-                                to <value>.  (This number cannot exceed
-                                HARD_FDLIMIT in config.h)
-
-                    -- The following three are if compiled with FLUD --
-                     FLUDNUM   - Sets the number of flud messages to 
-                                 trip flud alarm to <value>
-                     FLUDTIME  - Sets the number of seconds in which 
-                                  FLUDNUM msgs must occur to <value>
-                     FLUDBLOCK - Sets the number of seconds to block 
-                                 fluds to <value>
-
-                    -- The following is if compiled with NO_CHANOPS_ON_SPLIT
-                       or NO_JOIN_ON_SPLIT or PRESERVE_CHANNEL_ON_SPLIT
-                     SPLITDELAY - Sets how long after the connect burst
-                                  starts before ops can be hacked on new
-                                  channels. 5(minutes) is usually plenty.
-                                  Disable using 0.
-
-                     SMALLNET   - Below this number of servers present
-                                  means special split handling is now on.
-
-                     -- The following is if compiled with ANTI_SPAMBOT
-                      SPAMNUM   - Sets how many join/parts to channels
-                                  constitutes a possible spambot.
-                      SPAMTIME  - Below this time on a channel
-                                  counts as a join/part as above.
-
-+ GLINE         - GLINE <user@host> :[reason]
-                   -- if compiled with GLINE --
-                   Attempts to add a global IRC-network wide ban on
-                   <user@host> for the reason [reason].
-
-                   It takes three different opers on three different 
-                   servers to do the same GLINE within a short interval,
-                   to have a GLINE triggered for a compiled time of hours.
-
-+ TESTLINE       - TESTLINE <user@host>|ip
-                   -- Looks up given user@host or user@ip 
-                   returns info on any found I line or K line for that user,
-                   or D-line on ip.
diff -uNrd ircd-hybrid-6.0/src/.depend ircd-pi1.0a/src/.depend
--- ircd-hybrid-6.0/src/.depend	Tue Dec 28 22:28:47 1999
+++ ircd-pi1.0a/src/.depend	Wed Dec 31 19:00:00 1969
@@ -1,433 +0,0 @@
-blalloc.o: blalloc.c ../include/blalloc.h ../include/ircd_defs.h \
- ../include/config.h ../include/setup.h ../include/irc_string.h \
- ../include/s_log.h ../include/send.h
-channel.o: channel.c ../include/channel.h ../include/config.h \
- ../include/setup.h ../include/ircd_defs.h ../include/client.h \
- ../include/dbuf.h ../include/common.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/list.h \
- ../include/numeric.h ../include/s_serv.h ../include/s_user.h \
- ../include/send.h ../include/struct.h ../include/whowas.h
-class.o: class.c ../include/class.h ../include/client.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/ircd.h \
- ../include/list.h ../include/numeric.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/send.h \
- ../include/struct.h
-client.o: client.c ../include/client.h ../include/config.h \
- ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
- ../include/class.h ../include/blalloc.h ../include/channel.h \
- ../include/common.h ../include/dline_conf.h ../include/fdlist.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd.h \
- ../include/list.h ../include/m_gline.h ../include/numeric.h \
- ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_log.h \
- ../include/s_misc.h ../include/s_serv.h ../include/send.h \
- ../include/struct.h ../include/whowas.h
-dbuf.o: dbuf.c ../include/dbuf.h ../include/config.h \
- ../include/setup.h ../include/common.h ../include/irc_string.h
-dline_conf.o: dline_conf.c ../include/dline_conf.h ../include/class.h \
- ../include/client.h ../include/config.h ../include/setup.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/send.h ../include/struct.h
-fdlist.o: fdlist.c ../include/fdlist.h ../include/client.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/s_bsd.h
-fileio.o: fileio.c ../include/fileio.h
-flud.o: flud.c ../include/flud.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/list.h ../include/numeric.h ../include/send.h \
- ../include/channel.h ../include/struct.h ../include/blalloc.h \
- ../include/s_stats.h
-hash.o: hash.c ../include/s_conf.h ../include/config.h \
- ../include/setup.h ../include/fileio.h ../include/ircd_defs.h \
- ../include/motd.h ../include/channel.h ../include/client.h \
- ../include/dbuf.h ../include/common.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/send.h ../include/struct.h
-irc_string.o: irc_string.c ../include/irc_string.h ../include/list.h
-ircd.o: ircd.c ../include/ircd.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/dline_conf.h ../include/fdlist.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd_signal.h \
- ../include/list.h ../include/m_gline.h ../include/motd.h \
- ../include/msg.h ../include/mtrie_conf.h ../include/numeric.h \
- ../include/parse.h ../include/res.h ../include/restart.h \
- ../include/s_auth.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/fileio.h ../include/s_debug.h ../include/s_log.h \
- ../include/s_misc.h ../include/s_serv.h ../include/s_stats.h \
- ../include/s_zip.h ../zlib/zlib.h ../zlib/zconf.h ../zlib/setup.h \
- ../include/scache.h ../include/send.h ../include/struct.h \
- ../include/whowas.h
-ircd_signal.o: ircd_signal.c ../include/ircd_signal.h \
- ../include/ircd.h ../include/config.h ../include/setup.h \
- ../include/restart.h ../include/s_log.h ../include/send.h
-list.o: list.c ../include/struct.h ../include/config.h \
- ../include/setup.h ../include/blalloc.h ../include/channel.h \
- ../include/ircd_defs.h ../include/class.h ../include/client.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/list.h ../include/mtrie_conf.h ../include/numeric.h \
- ../include/res.h ../include/restart.h ../include/s_log.h \
- ../include/send.h ../include/flud.h
-listener.o: listener.c ../include/listener.h ../include/ircd_defs.h \
- ../include/config.h ../include/setup.h ../include/client.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_stats.h \
- ../include/send.h ../include/struct.h
-m_admin.o: m_admin.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/s_serv.h ../include/send.h
-m_away.o: m_away.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/send.h
-m_capab.o: m_capab.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/s_serv.h
-m_close.o: m_close.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_bsd.h ../include/send.h
-m_connect.o: m_connect.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/ircd.h \
- ../include/irc_string.h ../include/numeric.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/s_log.h ../include/s_serv.h ../include/send.h
-m_die.o: m_die.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_log.h \
- ../include/send.h
-m_error.o: m_error.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/ircd.h \
- ../include/numeric.h ../include/send.h
-m_gline.o: m_gline.c ../include/m_gline.h ../include/config.h \
- ../include/setup.h ../include/ircd_defs.h ../include/channel.h \
- ../include/client.h ../include/dbuf.h ../include/common.h \
- ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
- ../include/m_kline.h ../include/mtrie_conf.h ../include/numeric.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/s_misc.h ../include/scache.h ../include/send.h \
- ../include/struct.h
-m_htm.o: m_htm.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/send.h
-m_info.o: m_info.c ../include/m_info.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/client.h ../include/dbuf.h ../include/common.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/s_user.h ../include/send.h \
- ../include/struct.h
-m_ison.o: m_ison.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/send.h
-m_help.o: m_help.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/motd.h \
- ../include/msg.h ../include/numeric.h ../include/send.h \
- ../include/s_conf.h ../include/fileio.h
-m_kill.o: m_kill.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_log.h ../include/s_serv.h ../include/send.h \
- ../include/whowas.h ../include/irc_string.h
-m_kline.o: m_kline.c ../include/m_kline.h ../include/channel.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/dline_conf.h ../include/irc_string.h \
- ../include/ircd.h ../include/mtrie_conf.h ../include/numeric.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/s_log.h ../include/s_misc.h ../include/send.h \
- ../include/struct.h ../include/hash.h
-m_links.o: m_links.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_serv.h ../include/send.h
-m_list.o: m_list.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/client.h ../include/dbuf.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/send.h
-m_locops.o: m_locops.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
- ../include/numeric.h ../include/send.h ../include/s_user.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/hash.h
-m_ltrace.o: m_ltrace.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/class.h ../include/client.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
- ../include/send.h
-m_lusers.o: m_lusers.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/s_user.h ../include/send.h
-m_message.o: m_message.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/flud.h ../include/ircd.h \
- ../include/numeric.h ../include/s_serv.h ../include/send.h \
- ../include/msg.h ../include/channel.h ../include/irc_string.h \
- ../include/hash.h ../include/class.h
-m_mode.o: m_mode.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/client.h ../include/dbuf.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/s_user.h ../include/send.h
-m_operwall.o: m_operwall.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
- ../include/numeric.h ../include/send.h ../include/s_user.h
-m_oper.o: m_oper.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/fdlist.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_log.h \
- ../include/s_user.h ../include/send.h ../include/struct.h
-m_pass.o: m_pass.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/send.h \
- ../include/numeric.h ../include/ircd.h
-m_ping.o: m_ping.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/send.h ../include/irc_string.h
-m_pong.o: m_pong.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/send.h ../include/channel.h ../include/irc_string.h
-m_quit.o: m_quit.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h
-m_rehash.o: m_rehash.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/list.h ../include/m_gline.h \
- ../include/numeric.h ../include/res.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_log.h \
- ../include/send.h
-m_restart.o: m_restart.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/restart.h \
- ../include/s_log.h ../include/send.h
-m_server.o: m_server.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/list.h \
- ../include/numeric.h ../include/s_conf.h ../include/fileio.h \
- ../include/motd.h ../include/s_serv.h ../include/s_stats.h \
- ../include/scache.h ../include/send.h ../include/struct.h
-m_set.o: m_set.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
- ../include/send.h ../include/common.h ../include/channel.h
-m_squit.o: m_squit.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_log.h \
- ../include/s_serv.h ../include/send.h
-m_stats.o: m_stats.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/class.h ../include/client.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
- ../include/listener.h ../include/msg.h ../include/mtrie_conf.h \
- ../include/m_gline.h ../include/numeric.h ../include/scache.h \
- ../include/send.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/fileio.h ../include/motd.h ../include/s_debug.h \
- ../include/s_misc.h ../include/s_serv.h ../include/s_stats.h \
- ../include/s_user.h
-m_svinfo.o: m_svinfo.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/send.h
-m_time.o: m_time.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_misc.h ../include/s_serv.h ../include/send.h
-m_trace.o: m_trace.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/class.h ../include/client.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
- ../include/send.h
-m_unkline.o: m_unkline.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/client.h ../include/dbuf.h ../include/common.h \
- ../include/dline_conf.h ../include/fileio.h ../include/irc_string.h \
- ../include/ircd.h ../include/mtrie_conf.h ../include/numeric.h \
- ../include/s_conf.h ../include/motd.h ../include/s_log.h \
- ../include/s_misc.h ../include/send.h ../include/struct.h
-m_userhost.o: m_userhost.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h ../include/irc_string.h
-m_users.o: m_users.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h
-m_version.o: m_version.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h
-m_wallops.o: m_wallops.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
- ../include/numeric.h ../include/send.h ../include/s_user.h
-m_who.o: m_who.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/channel.h ../include/hash.h \
- ../include/struct.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h ../include/list.h \
- ../include/irc_string.h
-m_whois.o: m_whois.c ../include/m_commands.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/channel.h ../include/hash.h \
- ../include/struct.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/send.h ../include/list.h \
- ../include/irc_string.h
-match.o: match.c ../include/irc_string.h ../include/config.h \
- ../include/setup.h
-motd.o: motd.c ../include/motd.h ../include/ircd_defs.h \
- ../include/config.h ../include/setup.h ../include/ircd.h \
- ../include/s_bsd.h ../include/fileio.h ../include/res.h \
- ../include/s_conf.h ../include/class.h ../include/send.h \
- ../include/numeric.h ../include/client.h ../include/dbuf.h \
- ../include/irc_string.h ../include/s_serv.h
-mtrie_conf.o: mtrie_conf.c ../include/mtrie_conf.h ../include/class.h \
- ../include/client.h ../include/config.h ../include/setup.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_conf.h ../include/fileio.h \
- ../include/motd.h ../include/send.h ../include/struct.h
-oratime.o: oratime.c ../include/oratime.h ../include/config.h \
- ../include/setup.h
-numeric.o: numeric.c ../include/numeric.h ../include/config.h \
- ../include/setup.h ../include/irc_string.h ../include/common.h \
- messages.tab
-packet.o: packet.c ../include/packet.h ../include/client.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/ircd.h \
- ../include/list.h ../include/parse.h ../include/s_zip.h \
- ../zlib/zlib.h ../zlib/zconf.h ../zlib/setup.h ../include/struct.h
-parse.o: parse.c ../include/parse.h ../include/channel.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/client.h ../include/dbuf.h ../include/common.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_log.h ../include/s_stats.h \
- ../include/send.h ../include/struct.h ../include/msg.h \
- ../include/m_commands.h
-res.o: res.c ../include/res.h ../include/client.h ../include/config.h \
- ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
- ../include/common.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/restart.h ../include/s_bsd.h \
- ../include/send.h ../include/struct.h
-restart.o: restart.c ../include/restart.h ../include/common.h \
- ../include/ircd.h ../include/config.h ../include/setup.h \
- ../include/send.h ../include/struct.h ../include/s_debug.h \
- ../include/s_log.h
-s_auth.o: s_auth.c ../include/s_auth.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/fdlist.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/res.h ../include/s_bsd.h ../include/s_log.h \
- ../include/s_stats.h ../include/send.h ../include/struct.h
-s_bsd.o: s_bsd.c ../include/s_bsd.h ../include/class.h \
- ../include/client.h ../include/config.h ../include/setup.h \
- ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
- ../include/fdlist.h ../include/irc_string.h ../include/ircd.h \
- ../include/list.h ../include/listener.h ../include/numeric.h \
- ../include/packet.h ../include/res.h ../include/restart.h \
- ../include/s_auth.h ../include/s_conf.h ../include/fileio.h \
- ../include/motd.h ../include/s_log.h ../include/s_serv.h \
- ../include/s_stats.h ../include/s_zip.h ../zlib/zlib.h \
- ../zlib/zconf.h ../zlib/setup.h ../include/send.h ../include/struct.h
-s_conf.o: s_conf.c ../include/s_conf.h ../include/config.h \
- ../include/setup.h ../include/fileio.h ../include/ircd_defs.h \
- ../include/motd.h ../include/channel.h ../include/class.h \
- ../include/client.h ../include/dbuf.h ../include/common.h \
- ../include/dline_conf.h ../include/hash.h ../include/irc_string.h \
- ../include/ircd.h ../include/list.h ../include/listener.h \
- ../include/mtrie_conf.h ../include/numeric.h ../include/res.h \
- ../include/s_bsd.h ../include/s_log.h ../include/send.h \
- ../include/struct.h
-s_debug.o: s_debug.c ../include/s_debug.h ../include/channel.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/hash.h ../include/ircd.h \
- ../include/list.h ../include/numeric.h ../include/res.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h \
- ../include/s_log.h ../include/scache.h ../include/send.h \
- ../include/struct.h
-s_log.o: s_log.c ../include/s_log.h ../include/irc_string.h \
- ../include/ircd.h ../include/config.h ../include/setup.h \
- ../include/s_misc.h
-s_misc.o: s_misc.c ../include/s_misc.h ../include/client.h \
- ../include/config.h ../include/setup.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/common.h ../include/irc_string.h \
- ../include/ircd.h ../include/numeric.h ../include/res.h \
- ../include/s_bsd.h ../include/s_conf.h ../include/fileio.h \
- ../include/motd.h ../include/s_serv.h ../include/send.h \
- ../include/struct.h
-s_serv.o: s_serv.c ../include/s_serv.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/fdlist.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/list.h \
- ../include/numeric.h ../include/res.h ../include/struct.h \
- ../include/s_bsd.h ../include/s_conf.h ../include/fileio.h \
- ../include/motd.h ../include/s_stats.h ../include/s_user.h \
- ../include/s_zip.h ../zlib/zlib.h ../zlib/zconf.h ../zlib/setup.h \
- ../include/scache.h ../include/send.h
-s_stats.o: s_stats.c ../include/s_stats.h ../include/config.h \
- ../include/setup.h ../include/client.h ../include/ircd_defs.h \
- ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/s_bsd.h ../include/send.h
-s_user.o: s_user.c ../include/s_user.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/fdlist.h ../include/flud.h \
- ../include/hash.h ../include/irc_string.h ../include/ircd.h \
- ../include/list.h ../include/listener.h ../include/motd.h \
- ../include/msg.h ../include/numeric.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/fileio.h ../include/s_log.h \
- ../include/s_serv.h ../include/s_stats.h ../include/scache.h \
- ../include/send.h ../include/struct.h ../include/whowas.h
-s_zip.o: s_zip.c ../include/s_zip.h ../include/config.h \
- ../include/setup.h ../zlib/zlib.h ../zlib/zconf.h ../zlib/setup.h \
- ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \
- ../include/irc_string.h ../include/packet.h ../include/s_bsd.h \
- ../include/s_serv.h ../include/send.h ../include/struct.h
-scache.o: scache.c ../include/client.h ../include/config.h \
- ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
- ../include/common.h ../include/irc_string.h ../include/ircd.h \
- ../include/numeric.h ../include/send.h ../include/struct.h
-send.o: send.c ../include/send.h ../include/config.h \
- ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
- ../include/class.h ../include/client.h ../include/dbuf.h \
- ../include/common.h ../include/irc_string.h ../include/ircd.h \
- ../include/m_commands.h ../include/numeric.h ../include/s_bsd.h \
- ../include/s_serv.h ../include/s_zip.h ../zlib/zlib.h ../zlib/zconf.h \
- ../zlib/setup.h ../include/sprintf_irc.h ../include/struct.h \
- ../include/s_conf.h ../include/fileio.h ../include/motd.h
-sprintf_irc.o: sprintf_irc.c ../include/sprintf_irc.h
-whowas.o: whowas.c ../include/whowas.h ../include/ircd_defs.h \
- ../include/config.h ../include/setup.h ../include/client.h \
- ../include/dbuf.h ../include/common.h ../include/hash.h \
- ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
- ../include/s_serv.h ../include/s_user.h ../include/send.h \
- ../include/struct.h
diff -uNrd ircd-hybrid-6.0/src/Makefile.in ircd-pi1.0a/src/Makefile.in
--- ircd-hybrid-6.0/src/Makefile.in	Thu Jun 22 01:40:55 2000
+++ ircd-pi1.0a/src/Makefile.in	Thu May 23 13:59:21 2002
@@ -1,217 +1,802 @@
-#
-# Makefile.in for ircd/src
-#
-# $Id: Makefile.in,v 1.58 2000/06/22 05:40:55 lusky Exp $
-#
-CC = @CC@
-RM = @RM@
-MKDEP = ${CC} -MM
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
 
-IRCDLIBS = @LIBS@ ../zlib/libz.a
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-INCLUDES = -I../include -I../zlib
-CPPFLAGS = ${INCLUDES} @CPPFLAGS@
- 
-#
-# For developers
-# CFLAGS= -g -O2 -Wall 
-#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-SRCS = \
-	blalloc.c \
-	channel.c \
-	class.c \
-	client.c \
-	dbuf.c \
-	dline_conf.c \
-	fdlist.c \
-	fileio.c \
-	flud.c \
-	hash.c \
-	irc_string.c \
-	ircd.c \
-	ircd_signal.c \
-	list.c \
-	listener.c \
-	m_admin.c \
-	m_away.c \
-	m_capab.c \
-	m_close.c \
-	m_connect.c \
-	m_die.c \
-	m_error.c \
-	m_gline.c \
-	m_htm.c \
-	m_info.c \
-	m_ison.c \
-	m_help.c \
-	m_kill.c \
-	m_kline.c \
-	m_links.c \
-	m_list.c \
-	m_locops.c \
-	m_ltrace.c \
-	m_lusers.c \
-	m_message.c \
-	m_mode.c \
-	m_operwall.c \
-	m_oper.c \
-	m_pass.c \
-	m_ping.c \
-	m_pong.c \
-	m_quit.c \
-	m_rehash.c \
-	m_restart.c \
-	m_server.c \
-	m_set.c \
-	m_squit.c \
-	m_stats.c \
-	m_svinfo.c \
-	m_time.c \
-	m_trace.c \
-	m_unkline.c \
-	m_userhost.c \
-	m_users.c \
-	m_version.c \
-	m_wallops.c \
-	m_who.c \
-	m_whois.c \
-	match.c \
-	motd.c \
-	mtrie_conf.c \
-	oratime.c \
-	numeric.c \
-	packet.c \
-	parse.c \
-	res.c \
-	restart.c \
-	s_auth.c \
-	s_bsd.c \
-	s_conf.c \
-	s_debug.c \
-	s_log.c \
-	s_misc.c \
-	s_serv.c \
-	s_stats.c \
-	s_user.c \
-	s_zip.c \
-	scache.c \
-	send.c \
-	sprintf_irc.c \
-	whowas.c
+@SET_MAKE@
+SHELL = @SHELL@
 
-#
-# Do it this way for Ultrix, and its portable at least
-# just make sure OBJ's match SRC's (pointed out by Ian)
-# Ultrix can't use gnu make????? feh --Bleep
-# 
-#OBJS = \
-#	blalloc.o \
-#	channel.o \
-#	class.o \
-#	client.o \
-#	dbuf.o \
-#	dline_conf.o \
-#	fdlist.o \
-#	fileio.o \
-#	hash.o \
-#	irc_string.o \
-#	ircd.o \
-#	ircd_signal.o \
-#	list.o \
-#	listener.o \
-#	m_admin.o \
-#	m_away.o \
-#	m_capab.o \
-#	m_close.o \
-#	m_connect.o \
-#	m_die.o \
-#	m_error.o \
-#	m_gline.o \
-#	m_help.o \
-#	m_htm.o \
-#	m_info.o \
-#	m_kline.o \
-#	m_links.o \
-#	m_list.o \
-#	m_locops.o \
-#	m_ltrace.o \
-#	m_lusers.o \
-#	m_mode.o \
-#	m_operwall.o \
-#	m_pass.o \
-#	m_ping.o \
-#	m_pong.o \
-#	m_quit.o \
-#	m_rehash.o \
-#	m_restart.o \
-#	m_server.o \
-#	m_set.o \
-#	m_squit.o \
-#	m_stats.c \
-#	m_svinfo.o \
-#	m_time.o \
-#	m_trace.o \
-#	m_unkline.o \
-#	m_users.o \
-#	m_version.o \
-#	m_wallops.o \
-#	m_who.o \
-#	m_whois.o \
-#	match.o \
-#	motd.o \
-#	mtrie_conf.o \
-#	oratime.o \
-#	numeric.o \
-#	packet.o \
-#	parse.o \
-#	res.o \
-#	s_auth.o \
-#	s_bsd.o \
-#	s_conf.o \
-#	s_debug.o \
-#	s_log.o \
-#	s_misc.o \
-#	s_numeric.o \
-#	s_serv.o \
-#	s_stats.o \
-#	s_user.o \
-#	s_zip.o \
-#	scache.o \
-#	send.o \
-#	sprintf_irc.o \
-#	support.o \
-#	whowas.o
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
 
-OBJS = ${SRCS:.c=.o}
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+ircddir = $(exec_prefix)/@IRCDDIR@
+ircduser = @IRCDUSER@
 
-all: ircd
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
 
-build: all
+PATHS =
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -m 644
+install_sh_PROGRAM = $(install_sh)
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
 
-ircd: ${OBJS} version.o
-	${CC} ${LDFLAGS} -o $@ ${OBJS} version.o ${IRCDLIBS}
-	mv version.c version.c.last
+SUBDIRS = noarch i386
+ASM = @ASM@
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+CC = @CC@
+MKDEP = $(CC) -MM
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+bin_PROGRAMS = ircd
+ircd_SOURCES = blalloc.c channel.c class.c client.c dbuf.c dline_conf.c \
+               fdlist.c fileio.c flud.c hash.c irc_string.c ircd.c \
+               ircd_signal.c list.c listener.c m_admin.c m_away.c m_broadcast.c \
+               m_capab.c m_close.c m_connect.c m_die.c m_error.c \
+               m_gline.c m_help.c m_htm.c m_info.c m_ison.c m_kill.c \
+               m_kline.c m_links.c m_list.c m_locops.c m_ltrace.c \
+               m_lusers.c m_message.c m_mode.c m_oper.c m_operwall.c \
+               m_pass.c m_ping.c m_pong.c m_quit.c m_rehash.c \
+               m_restart.c m_server.c m_set.c m_spoof.c m_squit.c m_stats.c \
+               m_svinfo.c m_time.c m_trace.c m_ungline.c m_unkline.c \
+               m_userhost.c m_users.c m_version.c m_wallops.c m_who.c \
+               m_whois.c match.c motd.c mtrie_conf.c numeric.c packet.c \
+               parse.c res.c restart.c s_auth.c s_bsd.c s_conf.c \
+               s_debug.c s_log.c s_misc.c s_serv.c s_stats.c s_user.c \
+               s_zip.c scache.c send.c sprintf_irc.c ssl.c version.c \
+               whowas.c
 
-install: build
-	@echo "Please do a make install from the top level directory"
+subdir = src
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/setup.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ircd$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-version.c: version.c.SH
-	/bin/sh ./version.c.SH
+ircd_OBJECTS = blalloc.$(OBJEXT) channel.$(OBJEXT) class.$(OBJEXT) \
+	client.$(OBJEXT) dbuf.$(OBJEXT) dline_conf.$(OBJEXT) \
+	fdlist.$(OBJEXT) fileio.$(OBJEXT) flud.$(OBJEXT) hash.$(OBJEXT) \
+	irc_string.$(OBJEXT) ircd.$(OBJEXT) ircd_signal.$(OBJEXT) \
+	list.$(OBJEXT) listener.$(OBJEXT) m_admin.$(OBJEXT) \
+	m_away.$(OBJEXT) m_broadcast.$(OBJEXT) m_capab.$(OBJEXT) m_close.$(OBJEXT) \
+	m_connect.$(OBJEXT) m_die.$(OBJEXT) m_error.$(OBJEXT) \
+	m_gline.$(OBJEXT) m_help.$(OBJEXT) m_htm.$(OBJEXT) \
+	m_info.$(OBJEXT) m_ison.$(OBJEXT) m_kill.$(OBJEXT) \
+	m_kline.$(OBJEXT) m_links.$(OBJEXT) m_list.$(OBJEXT) \
+	m_locops.$(OBJEXT) m_ltrace.$(OBJEXT) m_lusers.$(OBJEXT) \
+	m_message.$(OBJEXT) m_mode.$(OBJEXT) m_oper.$(OBJEXT) \
+	m_operwall.$(OBJEXT) m_pass.$(OBJEXT) m_ping.$(OBJEXT) \
+	m_pong.$(OBJEXT) m_quit.$(OBJEXT) m_rehash.$(OBJEXT) \
+	m_restart.$(OBJEXT) m_server.$(OBJEXT) m_set.$(OBJEXT) \
+        m_spoof.$(OBJEXT) m_squit.$(OBJEXT) m_stats.$(OBJEXT) \
+        m_svinfo.$(OBJEXT) m_time.$(OBJEXT) m_trace.$(OBJEXT) \
+        m_ungline.$(OBJEXT) m_unkline.$(OBJEXT) m_userhost.$(OBJEXT) \
+        m_users.$(OBJEXT) m_version.$(OBJEXT) m_wallops.$(OBJEXT) \
+        m_who.$(OBJEXT) m_whois.$(OBJEXT) match.$(OBJEXT) motd.$(OBJEXT) \
+	mtrie_conf.$(OBJEXT) numeric.$(OBJEXT) packet.$(OBJEXT) \
+	parse.$(OBJEXT) res.$(OBJEXT) restart.$(OBJEXT) \
+	s_auth.$(OBJEXT) s_bsd.$(OBJEXT) s_conf.$(OBJEXT) \
+	s_debug.$(OBJEXT) s_log.$(OBJEXT) s_misc.$(OBJEXT) \
+	s_serv.$(OBJEXT) s_stats.$(OBJEXT) s_user.$(OBJEXT) \
+	s_zip.$(OBJEXT) scache.$(OBJEXT) send.$(OBJEXT) \
+	sprintf_irc.$(OBJEXT) version.$(OBJEXT) ssl.$(OBJEXT) \
+        whowas.$(OBJEXT)
+
+ircd_LDADD = $(srcdir)/$(ASM)/libircasm.a
+ircd_DEPENDENCIES =
+ircd_LDFLAGS = 
+
+DEFS = @DEFS@
+INCLUDES = -I$(top_builddir)/include
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+NASM = @NASM@
+COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
+LINK = $(CC) $(LDFLAGS) $(CFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(ircd_SOURCES)
+DIST_COMMON = Makefile.in messages.tab version.c.sh
+SOURCES = $(ircd_SOURCES)
+all: Makefile all-recursive $(PROGRAMS)
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
+version.c: $(srcdir)/version.c.sh
+	$(srcdir)/version.c.sh
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+#$(ircd_OBJECTS): Makefile
+
+ircd$(EXEEXT): $(ircd_OBJECTS) $(ircd_DEPENDENCIES) version.c
+	@rm -f ircd$(EXEEXT)
+	$(LINK) $(ircd_OBJECTS) $(LIBS) $(ircd_LDADD)
+	@mv version.c version.c.old
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core *~
+
+distclean-compile:
+	-rm -f *.tab.c
 
-# this is really the default rule for c files
 .c.o:
-	${CC} ${CPPFLAGS} ${CFLAGS} -c $<
+	$(COMPILE) -c $<
 
-.PHONY: depend clean distclean
-depend:
-	${MKDEP} ${CPPFLAGS} ${SRCS} > .depend
+.c.obj:
+	$(COMPILE) -c $<
 
-clean:
-	${RM} -f *.o *.exe *~ ircd.core core ircd 
+uninstall-info:
+
+all-recursive:
+	(cd $(ASM) && $(MAKE) all)
+
+mostlyclean-recursive clean-recursive distclean-recursive maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+        dot_seen=no; \
+        case "$@" in \
+          distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+          *) list='$(SUBDIRS)' ;; \
+        esac; \
+        rev=''; for subdir in $$list; do \
+          if test "$$subdir" = "."; then :; else \
+            rev="$$subdir $$rev"; \
+          fi; \
+        done; \
+        rev="$$rev ."; \
+        target=`echo $@ | sed s/-recursive//`; \
+        for subdir in $$rev; do \
+          echo "Making $$target in $$subdir"; \
+          if test "$$subdir" = "."; then continue; fi; \
+          local_target="$$target"; \
+          (cd $$subdir && $(MAKE) $$local_target) \
+           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+        done && test -z "$$fail"
+tags-recursive:
+        list='$(SUBDIRS)'; for subdir in $$list; do \
+          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+        done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+          if test "$$subdir" = .; then :; else \
+            test -d $(distdir)/$$subdir \
+            || mkdir $(distdir)/$$subdir \
+            || exit 1; \
+            (cd $$subdir && \
+              $(MAKE) \
+                top_distdir="$(top_distdir)" \
+                distdir=../$(distdir)/$$subdir \
+                distdir) \
+              || exit 1; \
+          fi; \
+	done
+
+check: all
+
+installdirs:
+	$(mkinstalldirs) $(ircddir)
+
+install: all installdirs install-exec
+
+install-strip:
+	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-binPROGRAMS clean-recursive clean-generic mostlyclean
 
 distclean: clean
-	${RM} -f Makefile version.c.last
 
-include .depend
+dvi:
+
+info:
 
+install-data:
+
+install-exec:
+	@if test "`id -u`" = "0"; \
+        then \
+	  echo "$(INSTALL_PROGRAM) -c -o $(ircduser) -m 775 $(PROGRAMS) $(ircddir)"; \
+	  $(INSTALL_PROGRAM) -c -o $(ircduser) -m 775 $(PROGRAMS) $(ircddir)/$$X; \
+          chown $(ircduser) $(ircddir) ; \
+        else \
+  	  echo "$(INSTALL_PROGRAM) $(PROGRAMS) $(ircddir)/$$X"; \
+	  $(INSTALL_PROGRAM) -c -m 775 $(PROGRAMS) $(ircddir)/$$X; \
+        fi        
+
+install-man:
+
+maintainer-clean: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-compile mostlyclean-generic
+
+uninstall:
+	rm -f $(ircddir)/ircd
+
+blalloc.o: blalloc.c ../include/blalloc.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h ../include/irc_string.h \
+  ../include/s_log.h ../include/send.h
+channel.o: channel.c ../include/channel.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/client.h \
+  ../include/dbuf.h ../include/common.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/list.h \
+  ../include/numeric.h ../include/s_serv.h ../include/s_user.h \
+  ../include/send.h ../include/struct.h ../include/whowas.h
+class.o: class.c ../include/class.h ../include/client.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/ircd.h \
+  ../include/list.h ../include/numeric.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/send.h \
+  ../include/struct.h ../include/s_debug.h
+client.o: client.c ../include/client.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/class.h ../include/blalloc.h ../include/channel.h \
+  ../include/common.h ../include/dline_conf.h ../include/fdlist.h \
+  ../include/hash.h ../include/irc_string.h ../include/ircd.h \
+  ../include/list.h ../include/m_gline.h ../include/numeric.h \
+  ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_log.h \
+  ../include/s_misc.h ../include/s_serv.h ../include/send.h \
+  ../include/struct.h ../include/whowas.h ../include/s_debug.h
+dbuf.o: dbuf.c ../include/dbuf.h ../include/config.h ../include/setup.h \
+  ../include/common.h ../include/irc_string.h ../include/ircd_defs.h
+dline_conf.o: dline_conf.c ../include/dline_conf.h ../include/class.h \
+  ../include/client.h ../include/config.h ../include/setup.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/send.h ../include/struct.h
+fdlist.o: fdlist.c ../include/fdlist.h ../include/client.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/s_bsd.h
+fileio.o: fileio.c ../include/fileio.h ../include/irc_string.h \
+  ../include/ircd_defs.h ../include/config.h ../include/setup.h
+flud.o: flud.c ../include/flud.h ../include/config.h ../include/setup.h \
+  ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/irc_string.h ../include/ircd.h ../include/list.h \
+  ../include/numeric.h ../include/send.h ../include/channel.h \
+  ../include/struct.h ../include/blalloc.h ../include/s_stats.h
+hash.o: hash.c ../include/s_conf.h ../include/config.h ../include/setup.h \
+  ../include/fileio.h ../include/ircd_defs.h ../include/motd.h \
+  ../include/channel.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/hash.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/send.h \
+  ../include/struct.h ../include/s_debug.h
+ircd.o: ircd.c ../include/ircd.h ../include/config.h ../include/setup.h \
+  ../include/channel.h ../include/ircd_defs.h ../include/class.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/ssl.h ../include/dline_conf.h ../include/fdlist.h \
+  ../include/hash.h ../include/listener.h ../include/irc_string.h \
+  ../include/ircd_signal.h ../include/list.h ../include/m_gline.h \
+  ../include/motd.h ../include/msg.h ../include/mtrie_conf.h \
+  ../include/numeric.h ../include/parse.h ../include/res.h \
+  ../include/restart.h ../include/s_auth.h ../include/s_bsd.h \
+  ../include/s_conf.h ../include/fileio.h ../include/s_debug.h \
+  ../include/s_log.h ../include/s_misc.h ../include/s_serv.h \
+  ../include/s_stats.h ../include/s_zip.h ../include/scache.h \
+  ../include/send.h ../include/struct.h ../include/whowas.h
+ircd_signal.o: ircd_signal.c ../include/config.h ../include/setup.h \
+  ../include/ircd_signal.h ../include/ircd.h ../include/restart.h \
+  ../include/s_log.h ../include/send.h
+irc_string.o: irc_string.c ../include/irc_string.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h ../include/list.h
+list.o: list.c ../include/struct.h ../include/config.h ../include/setup.h \
+  ../include/blalloc.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/class.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/irc_string.h ../include/list.h \
+  ../include/mtrie_conf.h ../include/numeric.h ../include/res.h \
+  ../include/restart.h ../include/s_log.h ../include/send.h \
+  ../include/flud.h
+listener.o: listener.c ../include/listener.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h ../include/client.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_stats.h \
+  ../include/send.h ../include/struct.h
+m_admin.o: m_admin.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_serv.h ../include/send.h
+match.o: match.c ../include/irc_string.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h
+m_away.o: m_away.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/send.h
+m_broadcast.o: m_broadcast.c ../include/client.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/numeric.h ../include/ircd.h ../include/s_user.h \
+  ../include/send.h
+m_capab.o: m_capab.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/s_serv.h
+m_close.o: m_close.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_bsd.h ../include/send.h
+m_connect.o: m_connect.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/ircd.h \
+  ../include/irc_string.h ../include/numeric.h ../include/s_bsd.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_log.h ../include/s_serv.h ../include/send.h
+m_die.o: m_die.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_log.h \
+  ../include/send.h
+m_error.o: m_error.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/ircd.h \
+  ../include/numeric.h ../include/send.h ../include/s_debug.h
+m_gline.o: m_gline.c ../include/m_gline.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/channel.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/m_kline.h ../include/mtrie_conf.h ../include/numeric.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_misc.h ../include/scache.h ../include/send.h \
+  ../include/struct.h
+m_help.o: m_help.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/motd.h ../include/msg.h \
+  ../include/numeric.h ../include/send.h ../include/s_conf.h \
+  ../include/fileio.h
+m_htm.o: m_htm.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/send.h
+m_info.o: m_info.c ../include/m_info.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/s_user.h ../include/send.h \
+  ../include/struct.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h
+m_ison.o: m_ison.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/send.h
+m_kill.o: m_kill.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_log.h ../include/s_serv.h ../include/send.h \
+  ../include/whowas.h ../include/irc_string.h
+m_kline.o: m_kline.c ../include/m_kline.h ../include/channel.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/class.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/dline_conf.h ../include/irc_string.h \
+  ../include/ircd.h ../include/mtrie_conf.h ../include/numeric.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_log.h ../include/s_misc.h ../include/send.h \
+  ../include/struct.h ../include/hash.h
+m_links.o: m_links.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_serv.h ../include/send.h
+m_list.o: m_list.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/send.h
+m_locops.o: m_locops.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
+  ../include/numeric.h ../include/send.h ../include/s_user.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/hash.h
+m_ltrace.o: m_ltrace.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/class.h ../include/client.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/hash.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
+  ../include/send.h
+m_lusers.o: m_lusers.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/s_user.h ../include/send.h
+m_message.o: m_message.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/flud.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_serv.h ../include/send.h \
+  ../include/msg.h ../include/channel.h ../include/irc_string.h \
+  ../include/hash.h ../include/class.h
+m_mode.o: m_mode.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_user.h ../include/send.h
+m_oper.o: m_oper.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/fdlist.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_log.h \
+  ../include/s_user.h ../include/send.h ../include/struct.h
+m_operwall.o: m_operwall.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
+  ../include/numeric.h ../include/send.h ../include/s_user.h
+motd.o: motd.c ../include/motd.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h ../include/ircd.h \
+  ../include/s_bsd.h ../include/fileio.h ../include/res.h \
+  ../include/s_conf.h ../include/class.h ../include/send.h \
+  ../include/numeric.h ../include/client.h ../include/dbuf.h \
+  ../include/irc_string.h ../include/s_serv.h
+m_pass.o: m_pass.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/send.h \
+  ../include/numeric.h ../include/ircd.h
+m_ping.o: m_ping.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/send.h ../include/irc_string.h
+m_pong.o: m_pong.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/send.h ../include/channel.h ../include/irc_string.h
+m_quit.o: m_quit.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h ../include/irc_string.h
+m_rehash.o: m_rehash.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/list.h ../include/m_gline.h \
+  ../include/numeric.h ../include/res.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_log.h \
+  ../include/send.h
+m_restart.o: m_restart.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/restart.h \
+  ../include/s_log.h ../include/send.h
+m_server.o: m_server.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/list.h \
+  ../include/numeric.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h ../include/s_serv.h ../include/s_stats.h \
+  ../include/scache.h ../include/send.h ../include/struct.h
+m_set.o: m_set.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
+  ../include/send.h ../include/common.h ../include/channel.h \
+  ../include/s_log.h
+m_spoof.o: m_spoof.c ../include/client.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/numeric.h ../include/ircd.h ../include/s_user.h \
+  ../include/send.h
+m_squit.o: m_squit.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_log.h \
+  ../include/s_serv.h ../include/send.h
+m_stats.o: m_stats.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/class.h ../include/client.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/listener.h ../include/msg.h ../include/mtrie_conf.h \
+  ../include/m_gline.h ../include/numeric.h ../include/scache.h \
+  ../include/send.h ../include/s_bsd.h ../include/s_conf.h \
+  ../include/fileio.h ../include/motd.h ../include/s_debug.h \
+  ../include/s_misc.h ../include/s_serv.h ../include/s_stats.h \
+  ../include/s_user.h ../include/ssl.h
+m_svinfo.o: m_svinfo.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/send.h
+m_time.o: m_time.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_misc.h ../include/s_serv.h ../include/send.h
+m_trace.o: m_trace.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/class.h ../include/client.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/hash.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
+  ../include/send.h
+mtrie_conf.o: mtrie_conf.c ../include/mtrie_conf.h ../include/class.h \
+  ../include/client.h ../include/config.h ../include/setup.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h ../include/send.h ../include/struct.h
+m_ungline.o: m_ungline.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/fileio.h ../include/irc_string.h \
+  ../include/ircd.h ../include/mtrie_conf.h ../include/numeric.h \
+  ../include/s_conf.h ../include/motd.h ../include/s_log.h \
+  ../include/s_misc.h ../include/send.h ../include/struct.h
+m_unkline.o: m_unkline.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/fileio.h ../include/irc_string.h \
+  ../include/ircd.h ../include/mtrie_conf.h ../include/numeric.h \
+  ../include/s_conf.h ../include/motd.h ../include/s_log.h \
+  ../include/s_misc.h ../include/send.h ../include/struct.h
+m_userhost.o: m_userhost.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h ../include/irc_string.h
+m_users.o: m_users.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h
+m_version.o: m_version.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h
+m_wallops.o: m_wallops.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/ircd.h ../include/irc_string.h \
+  ../include/numeric.h ../include/send.h ../include/s_user.h
+m_who.o: m_who.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/channel.h ../include/hash.h \
+  ../include/struct.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h ../include/list.h \
+  ../include/irc_string.h
+m_whois.o: m_whois.c ../include/m_commands.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/channel.h ../include/hash.h \
+  ../include/struct.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/send.h ../include/list.h \
+  ../include/irc_string.h ../include/s_log.h
+numeric.o: numeric.c ../include/numeric.h ../include/config.h \
+  ../include/setup.h ../include/irc_string.h ../include/ircd_defs.h \
+  ../include/common.h messages.tab
+packet.o: packet.c ../include/packet.h ../include/client.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/ircd.h \
+  ../include/list.h ../include/parse.h ../include/s_zip.h \
+  ../include/struct.h ../include/irc_string.h
+parse.o: parse.c ../include/parse.h ../include/channel.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/hash.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_log.h ../include/s_stats.h \
+  ../include/send.h ../include/struct.h ../include/msg.h \
+  ../include/m_commands.h
+res.o: res.c ../include/res.h ../include/client.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/common.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/restart.h ../include/s_bsd.h \
+  ../include/send.h ../include/struct.h ../include/s_debug.h
+restart.o: restart.c ../include/restart.h ../include/common.h \
+  ../include/ircd.h ../include/config.h ../include/setup.h \
+  ../include/send.h ../include/struct.h ../include/s_debug.h \
+  ../include/s_log.h
+s_auth.o: s_auth.c ../include/s_auth.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/fdlist.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/res.h ../include/s_bsd.h ../include/s_log.h \
+  ../include/s_stats.h ../include/send.h ../include/struct.h \
+  ../include/ssl.h
+s_bsd.o: s_bsd.c ../include/s_bsd.h ../include/class.h \
+  ../include/client.h ../include/config.h ../include/setup.h \
+  ../include/ircd_defs.h ../include/dbuf.h ../include/common.h \
+  ../include/fdlist.h ../include/irc_string.h ../include/ircd.h \
+  ../include/list.h ../include/listener.h ../include/numeric.h \
+  ../include/packet.h ../include/res.h ../include/restart.h \
+  ../include/s_auth.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h ../include/s_log.h ../include/s_serv.h \
+  ../include/s_stats.h ../include/s_zip.h ../include/send.h \
+  ../include/struct.h ../include/ssl.h
+scache.o: scache.c ../include/client.h ../include/config.h \
+  ../include/setup.h ../include/ircd_defs.h ../include/dbuf.h \
+  ../include/common.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/send.h ../include/struct.h
+s_conf.o: s_conf.c ../include/s_conf.h ../include/config.h \
+  ../include/setup.h ../include/fileio.h ../include/ircd_defs.h \
+  ../include/motd.h ../include/channel.h ../include/class.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/dline_conf.h ../include/hash.h ../include/irc_string.h \
+  ../include/ircd.h ../include/list.h ../include/listener.h \
+  ../include/mtrie_conf.h ../include/numeric.h ../include/res.h \
+  ../include/s_bsd.h ../include/s_log.h ../include/send.h \
+  ../include/struct.h ../include/s_debug.h ../include/ssl.h
+s_debug.o: s_debug.c ../include/s_debug.h ../include/channel.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/class.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/hash.h ../include/ircd.h \
+  ../include/list.h ../include/numeric.h ../include/res.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_log.h ../include/scache.h ../include/send.h \
+  ../include/struct.h ../include/irc_string.h
+send.o: send.c ../include/send.h ../include/config.h ../include/setup.h \
+  ../include/channel.h ../include/ircd_defs.h ../include/class.h \
+  ../include/client.h ../include/dbuf.h ../include/common.h \
+  ../include/irc_string.h ../include/ircd.h ../include/m_commands.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/s_serv.h \
+  ../include/s_zip.h ../include/sprintf_irc.h ../include/struct.h \
+  ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+  ../include/s_debug.h ../include/s_log.h
+s_log.o: s_log.c ../include/s_log.h ../include/irc_string.h \
+  ../include/ircd_defs.h ../include/config.h ../include/setup.h \
+  ../include/ircd.h ../include/s_misc.h
+s_misc.o: s_misc.c ../include/s_misc.h ../include/client.h \
+  ../include/config.h ../include/setup.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/common.h ../include/irc_string.h \
+  ../include/ircd.h ../include/numeric.h ../include/res.h \
+  ../include/s_bsd.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h ../include/s_serv.h ../include/send.h \
+  ../include/struct.h
+sprintf_irc.o: sprintf_irc.c ../include/sprintf_irc.h
+s_serv.o: s_serv.c ../include/s_serv.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/class.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/fdlist.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/list.h \
+  ../include/numeric.h ../include/res.h ../include/struct.h \
+  ../include/s_bsd.h ../include/s_conf.h ../include/fileio.h \
+  ../include/motd.h ../include/s_log.h ../include/s_stats.h \
+  ../include/s_user.h ../include/s_zip.h ../include/scache.h \
+  ../include/send.h ../include/s_debug.h
+ssl.o: ssl.c ../include/config.h ../include/setup.h ../include/s_log.h \
+  ../include/ssl.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/struct.h ../include/common.h \
+  ../include/s_bsd.h ../include/send.h ../include/numeric.h \
+  ../include/ircd.h ../include/s_user.h
+s_stats.o: s_stats.c ../include/s_stats.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/ircd.h \
+  ../include/numeric.h ../include/s_bsd.h ../include/send.h
+s_user.o: s_user.c ../include/s_user.h ../include/config.h \
+  ../include/setup.h ../include/channel.h ../include/ircd_defs.h \
+  ../include/class.h ../include/client.h ../include/dbuf.h \
+  ../include/common.h ../include/fdlist.h ../include/flud.h \
+  ../include/hash.h ../include/irc_string.h ../include/ircd.h \
+  ../include/list.h ../include/listener.h ../include/motd.h \
+  ../include/msg.h ../include/numeric.h ../include/s_bsd.h \
+  ../include/s_conf.h ../include/fileio.h ../include/s_log.h \
+  ../include/s_serv.h ../include/s_stats.h ../include/scache.h \
+  ../include/send.h ../include/struct.h ../include/whowas.h
+s_zip.o: s_zip.c ../include/s_zip.h ../include/config.h \
+  ../include/setup.h ../include/client.h ../include/ircd_defs.h \
+  ../include/dbuf.h ../include/irc_string.h ../include/packet.h \
+  ../include/s_bsd.h ../include/s_serv.h ../include/send.h \
+  ../include/struct.h
+whowas.o: whowas.c ../include/whowas.h ../include/ircd_defs.h \
+  ../include/config.h ../include/setup.h ../include/client.h \
+  ../include/dbuf.h ../include/common.h ../include/hash.h \
+  ../include/irc_string.h ../include/ircd.h ../include/numeric.h \
+  ../include/s_serv.h ../include/s_user.h ../include/send.h \
+  ../include/struct.h
+
+#BLAAAAAAAAH
+#.depend: version.c
+#	$(MKDEP) $(ircd_SOURCES) $(INCLUDES) > .depend
+#
+#include .depend
+
+.PHONY: GTAGS all depend check clean clean-binPROGRAMS clean-generic \
+	distclean distclean-compile distclean-depend \
+	distclean-generic distclean-tags distdir dvi info \
+	install install-binPROGRAMS install-data install-exec \
+	install-info install-man install-strip installcheck \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	tags uninstall uninstall-binPROGRAMS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/src/blalloc.c ircd-pi1.0a/src/blalloc.c
--- ircd-hybrid-6.0/src/blalloc.c	Sat Jul 31 04:22:56 1999
+++ ircd-pi1.0a/src/blalloc.c	Fri Nov  2 19:23:24 2001
@@ -4,7 +4,7 @@
  * Owner:  Wohali (Joan Touzet)
  *
  *
- * $Id: blalloc.c,v 1.18 1999/07/31 08:22:56 tomh Exp $
+ * $Id: blalloc.c,v 1.1.1.1 2001/11/03 00:23:24 shifty Exp $
  */
 #include "blalloc.h"
 #include "ircd_defs.h"      /* DEBUG_BLOCK_ALLOCATOR */
diff -uNrd ircd-hybrid-6.0/src/channel.c ircd-pi1.0a/src/channel.c
--- ircd-hybrid-6.0/src/channel.c	Sun Nov 26 23:11:49 2000
+++ ircd-pi1.0a/src/channel.c	Thu May 23 00:22:22 2002
@@ -34,7 +34,7 @@
  *                mode * -p etc. if flag was clear
  *
  *
- * $Id: channel.c,v 1.186 2000/11/27 04:11:49 lusky Exp $
+ * $Id: channel.c,v 1.13 2002/05/23 04:22:22 smoli Exp $
  */
 #include "channel.h"
 #include "client.h"
@@ -49,11 +49,13 @@
 #include "send.h"
 #include "struct.h"
 #include "whowas.h"
+#include "config.h"
 
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
 
+#define OLD_NON_RED
 #ifdef NEED_SPLITCODE
 
 static void check_still_split();
@@ -395,9 +397,9 @@
     return -1;
   for (ban = &(chptr->banlist); *ban; ban = &((*ban)->next))
 #ifdef BAN_INFO
-    if (irccmp(banid, (*ban)->value.banptr->banstr)==0)
+    if (strcmp(banid, (*ban)->value.banptr->banstr)==0)
 #else
-      if (irccmp(banid, (*ban)->value.cp)==0)
+      if (strcmp(banid, (*ban)->value.cp)==0)
 #endif
         {
           tmp = *ban;
@@ -433,7 +435,7 @@
   if (!eid)
     return -1;
   for (ex = &(chptr->exceptlist); *ex; ex = &((*ex)->next))
-    if (irccmp(eid, BANSTR(*ex)) == 0)
+    if (strcmp(eid, BANSTR(*ex)) == 0)
       {
         tmp = *ex;
         *ex = tmp->next;
@@ -804,6 +806,30 @@
   return 0;
 }
 
+#ifdef HAVE_SSL
+int is_ssl_channel(struct Channel *chptr)
+{
+  Link  *lp;
+  
+  if(chptr)
+    {
+      if((lp = chptr->members))
+        {
+          do
+            if(!IsSSLUmode(lp->value.cptr))
+              return 0;
+          while((lp = lp->next));
+          
+          return 1;
+        }
+      else
+        return 0;
+    }
+  else
+    return 0;
+}
+#endif
+
 /*
  * write the "simple" list of channel modes for channel chptr onto buffer mbuf
  * with the parameters in pbuf.
@@ -811,8 +837,27 @@
 void channel_modes(struct Client *cptr, char *mbuf, char *pbuf, struct Channel *chptr)
 {
   *mbuf++ = '+';
-  if (chptr->mode.mode & MODE_SECRET)
-    *mbuf++ = 's';
+  
+  if(chptr->mode.mode & MODE_INVITEONLY)
+    *mbuf++ = 'i';
+  
+  if(*chptr->mode.key)
+    {
+      *mbuf++ = 'k';
+      if (IsMember(cptr, chptr) || IsServer(cptr))
+        (void)strcat(pbuf, chptr->mode.key);
+    }
+  if(chptr->mode.limit)
+    {
+      *mbuf++ = 'l';
+      if (IsMember(cptr, chptr) || IsServer(cptr))
+        ircsprintf(pbuf, "%d ", chptr->mode.limit);
+    }
+  
+  if(chptr->mode.mode & MODE_MODERATED)
+    *mbuf++ = 'm';
+  if(chptr->mode.mode & MODE_NOPRIVMSGS)
+    *mbuf++ = 'n';
 
   /* bug found by "is" ejb@debian.org */
 #ifdef OLD_P_S
@@ -823,26 +868,18 @@
     *mbuf++ = 'p';
 #endif
 
-  if (chptr->mode.mode & MODE_MODERATED)
-    *mbuf++ = 'm';
-  if (chptr->mode.mode & MODE_TOPICLIMIT)
+  if(chptr->mode.mode & MODE_SECRET)
+    *mbuf++ = 's';
+  if(chptr->mode.mode & MODE_TOPICLIMIT)
     *mbuf++ = 't';
-  if (chptr->mode.mode & MODE_INVITEONLY)
-    *mbuf++ = 'i';
-  if (chptr->mode.mode & MODE_NOPRIVMSGS)
-    *mbuf++ = 'n';
-  if (chptr->mode.limit)
-    {
-      *mbuf++ = 'l';
-      if (IsMember(cptr, chptr) || IsServer(cptr))
-        ircsprintf(pbuf, "%d ", chptr->mode.limit);
-    }
-  if (*chptr->mode.key)
-    {
-      *mbuf++ = 'k';
-      if (IsMember(cptr, chptr) || IsServer(cptr))
-        (void)strcat(pbuf, chptr->mode.key);
-    }
+  
+#ifdef HAVE_SSL
+  if(IsSSLOnlyChannel(chptr))
+    *mbuf++ = 'x';
+  if(IsSSLChannel(chptr))
+    *mbuf++ = 'z';
+#endif
+  
   *mbuf++ = '\0';
   return;
 }
@@ -1180,17 +1217,37 @@
   int   chan_op;
   int   self_lose_ops;
   int   user_mode;
+  int   who_mode;
+#ifdef ENFORCE
+  int   enforced = 0; /* MODE has been enforced */
 
+#endif /* ENFORCE */
   self_lose_ops = 0;
 
   user_mode = user_channel_mode(sptr, chptr);
   chan_op = (user_mode & CHFL_CHANOP);
+#ifdef ENFORCE
+             /* a server doesn't enforce */
+  enforced = !IsServer(sptr) && !chan_op &&
+             /* remote enforcer */
+             (IsServer(cptr) ||
+             /* local enforcer */
+               IsEnforce(sptr));
+#endif
 
   /* has ops or is a server */
-  ischop = IsServer(sptr) || chan_op;
+  ischop = IsServer(sptr) || 
+#ifdef ENFORCE
+           enforced ||
+#endif
+           chan_op;
 
   /* is client marked as deopped */
-  isdeop = !ischop && !IsServer(sptr) && (user_mode & CHFL_DEOPPED);
+  isdeop = !ischop && !IsServer(sptr) &&
+#ifdef ENFORCE
+           !enforced &&
+#endif
+           (user_mode & CHFL_DEOPPED);
 
   /* is an op or server or remote user on a TS channel */
   isok = ischop || (!isdeop && IsServer(cptr) && chptr->channelts);
@@ -1247,105 +1304,128 @@
 
         case 'o' :
         case 'v' :
-          if (MyClient(sptr))
-            {
-              if(!IsMember(sptr, chptr))
-                {
-                  if(!errsent(SM_ERR_NOTONCHANNEL, &errors_sent))
-                    sendto_one(sptr, form_str(ERR_NOTONCHANNEL),
-                               me.name, sptr->name, chptr->chname);
-                  /* eat the parameter */
-                  parc--;
-                  parv++;
-                  break;
-                }
+          if(MyClient(sptr))
+          {
+            if(!IsMember(sptr, chptr)
+#ifdef ENFORCE
+               && !enforced
+#endif
+               )
+              {
+                if(!errsent(SM_ERR_NOTONCHANNEL, &errors_sent))
+                   sendto_one(sptr, form_str(ERR_NOTONCHANNEL),
+                              me.name, sptr->name, chptr->chname);
+                /* eat the parameter */
+                parc--;
+                parv++;
+                break;
+              }
 #ifdef LITTLE_I_LINES
-              else
-                {
-                  if(IsRestricted(sptr) && (whatt == MODE_ADD))
-                    {
-                      if(!errsent(SM_ERR_RESTRICTED, &errors_sent))
-                        {
-                          sendto_one(sptr,
-            ":%s NOTICE %s :*** Notice -- You are restricted and cannot chanop others",
-                                 me.name,
-                                 sptr->name);
-                        }
-                      /* eat the parameter */
-                      parc--;
-                      parv++;
-                      break;
-                    }
-                }
+            else
+              if(IsRestricted(sptr) && (whatt == MODE_ADD) && !enforced)
+              {
+                if(!errsent(SM_ERR_RESTRICTED, &errors_sent))
+                   sendto_one(sptr,
+                              ":%s NOTICE %s :*** Notice -- You are restricted and cannot chanop others",
+                              me.name,
+                              sptr->name);
+                  /* eat the parameter */
+                parc--;
+                parv++;
+                break;
+              }
 #endif
-            }
-          if (whatt == MODE_QUERY)
+          }
+
+          if(whatt == MODE_QUERY)
             break;
-          if (parc-- <= 0)
+          if(parc-- <= 0)
             break;
           arg = check_string(*parv++);
 
-          if (MyClient(sptr) && opcnt >= MAXMODEPARAMS)
+          if(MyClient(sptr) && opcnt >= MAXMODEPARAMS)
             break;
 
-          if (!(who = find_chasing(sptr, arg, NULL)))
+          if(!(who = find_chasing(sptr, arg, NULL)))
             break;
 
           /* there is always the remote possibility of picking up
            * a bogus user, be nasty to core for that. -Dianora
            */
 
-          if (!who->user)
+          if(!who->user)
             break;
 
           /* no more of that mode bouncing crap */
           if (!IsMember(who, chptr))
-            {
-              if (MyClient(sptr))
-                sendto_one(sptr, form_str(ERR_USERNOTINCHANNEL), me.name, 
-                           sptr->name, arg, chptr->chname);
-              break;
-            }
-
-          if ((who == sptr) && (c == 'o'))
-            {
-              if(whatt == MODE_ADD)
-                break;
-              
-              if(whatt == MODE_DEL)
-                self_lose_ops = 1;
-              }
+          {
+            if(MyClient(sptr))
+              sendto_one(sptr, form_str(ERR_USERNOTINCHANNEL), me.name, 
+                         sptr->name, arg, chptr->chname);
+            break;
+          }
 
-          /* ignore server-generated MODE +-ovh */
-          if (IsServer(sptr))
-            {
-              ts_warn( "MODE %c%c on %s for %s from server %s (ignored)", 
-                       (whatt == MODE_ADD ? '+' : '-'), c, chptr->chname, 
-                       who->name,sptr->name);
+          if((who == sptr) && (c == 'o'))
+          {
+            if(whatt == MODE_ADD && chan_op)
               break;
-            }
+            if(whatt == MODE_DEL && !chan_op)
+	      break;
+            if(whatt == MODE_ADD
+#ifdef ENFORCE
+               && !enforced
+#endif
+               )
+	      break;
+            if(whatt == MODE_DEL)
+              self_lose_ops = 1;
+          }
 
           if (c == 'o')
             the_mode = MODE_CHANOP;
           else if (c == 'v')
             the_mode = MODE_VOICE;
+          
+          /* code for non-redundant op/voice */
+          who_mode = user_channel_mode(who, chptr);
+          
+          if(the_mode == MODE_CHANOP)
+            {              
+              if((who_mode & CHFL_CHANOP) && whatt == MODE_ADD)
+                break;
+              
+              if(!(who_mode & CHFL_CHANOP) && whatt == MODE_DEL)
+                 break;
+            }
+          else if(the_mode == MODE_VOICE)
+            {
+              if((who_mode & CHFL_VOICE) && whatt == MODE_ADD)
+                break;
+              
+              if(!(who_mode & CHFL_VOICE) && whatt == MODE_DEL)
+                break;
+            }      
 
           if (isdeop && (c == 'o') && whatt == MODE_ADD)
             set_deopped(who, chptr, the_mode);
 
 #ifdef HIDE_OPS
 	  if(the_mode == MODE_CHANOP && whatt == MODE_DEL)
-	    sendto_one(who,":%s MODE %s -o %s",
-		       sptr->name,chptr->chname,who->name);
+	    sendto_one(who, ":%s MODE %s -o %s",
+		       sptr->name, chptr->chname, who->name);
 #endif
 
-          if (!isok)
-            {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
-            }
+          if(!isok
+#ifdef ENFORCE
+             && !enforced
+#endif
+            )
+          {
+            if(MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+              sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                         sptr->name, chptr->chname);
+            break;
+          }
         
           tmp = strlen(arg);
           if (len + tmp + 2 >= MODEBUFLEN)
@@ -1361,7 +1441,11 @@
 
           change_chan_flag(chptr, who, the_mode|whatt);
 
-          if (self_lose_ops)
+          if(self_lose_ops
+#ifdef ENFORCE
+             && !enforced
+#endif
+            )
             isok = 0;
 
           break;
@@ -1380,9 +1464,7 @@
           else
             {
               if (whatt == MODE_DEL)
-                {
                   arg = check_string(*parv++);
-                }
               else
                 {
                   if MyClient(sptr)
@@ -1392,37 +1474,39 @@
                 }
             }
 
-          if (keychange++)
-            break;
-          /*      if (MyClient(sptr) && opcnt >= MAXMODEPARAMS)
+          if(keychange++)
             break;
-            */
-          if (!*arg)
+
+	  if(!*arg)
             break;
 
-          if (!isok)
-            {
-              if (!errsent(SM_ERR_NOOPS, &errors_sent) && MyClient(sptr))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
-            }
+          if(!isok
+#ifdef ENFORCE
+             && !enforced
+#endif
+            )
+          {	    
+            if(MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+              sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                         sptr->name, chptr->chname);
+            break; 
+          }
 
 #ifdef OLD_MODE_K
-          if ((whatt == MODE_ADD) && (*chptr->mode.key))
-            {
-              sendto_one(sptr, form_str(ERR_KEYSET), me.name, 
-                         sptr->name, chptr->chname);
-              break;
-            }
+          if((whatt == MODE_ADD) && (*chptr->mode.key))
+          {
+            sendto_one(sptr, form_str(ERR_KEYSET), me.name, 
+                       sptr->name, chptr->chname);
+            break;
+          }
 #endif
-          if ( (tmp = strlen(arg)) > KEYLEN)
-            {
-              arg[KEYLEN] = '\0';
-              tmp = KEYLEN;
-            }
+          if((tmp = strlen(arg)) > KEYLEN)
+          {
+            arg[KEYLEN] = '\0';
+            tmp = KEYLEN;
+          }
 
-          if (len + tmp + 2 >= MODEBUFLEN)
+          if(len + tmp + 2 >= MODEBUFLEN)
             break;
 
 #ifndef OLD_MODE_K
@@ -1500,7 +1584,7 @@
               /* don't allow a non chanop to see the exception list
                * suggested by Matt on operlist nov 25 1998
                */
-              if(isok)
+              if(isok || IsEnforce(cptr))
                 {
 #ifdef BAN_INFO
                   for (lp = chptr->exceptlist; lp; lp = lp->next)
@@ -1526,7 +1610,8 @@
                   sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
                                sptr->name, chptr->chname);
                 }
-              break;
+
+	      break;
             }
           arg = check_string(*parv++);
 
@@ -1535,11 +1620,19 @@
 
           if (!isok)
             {
-              if (!errsent(SM_ERR_NOOPS, &errors_sent) && MyClient(sptr))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
-                           me.name, sptr->name, 
-                           chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
           
           if(MyClient(sptr))
@@ -1640,11 +1733,19 @@
 
           if (!isok)
             {
-              if (!errsent(SM_ERR_NOOPS, &errors_sent) && MyClient(sptr))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
-                           me.name, sptr->name, 
-                           chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
           
           if(MyClient(sptr))
@@ -1754,14 +1855,21 @@
 
           if (!isok)
             {
-              if (!errsent(SM_ERR_NOOPS, &errors_sent) && MyClient(sptr))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
-                           me.name, sptr->name, 
-                           chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
 
-
           /* Ignore colon at beginning of ban string.
            * Unfortunately, I can't ignore all such strings,
            * because otherwise the channel could get desynced.
@@ -1781,22 +1889,22 @@
           /* user-friendly ban mask generation, taken
           ** from Undernet's ircd  -orabidoo
           */
-          if (MyClient(sptr))
+          if(MyClient(sptr))
+          {
+            if( (*arg == ':') && (whatt & MODE_ADD) )
             {
-              if( (*arg == ':') && (whatt & MODE_ADD) )
-                {
-                  parc--;
-                  parv++;
-                  break;
-                }
-              arg = collapse(pretty_mask(arg));
+              parc--;
+              parv++;
+              break;
             }
+            arg = collapse(pretty_mask(arg));
+          }
 
           tmp = strlen(arg);
           if (len + tmp + 2 >= MODEBUFLEN)
             break;
 
-          if (!(((whatt & MODE_ADD) && !add_banid(sptr, chptr, arg)) ||
+          if(!(((whatt & MODE_ADD) && !add_banid(sptr, chptr, arg)) ||
                 ((whatt & MODE_DEL) && !del_banid(chptr, arg))))
             break;
 
@@ -1874,15 +1982,19 @@
            * -Dianora
            */
 
-        case 'i' :
+        case 'i':
           if (whatt == MODE_QUERY)      /* shouldn't happen. */
             break;
-          if (!isok)
+          if(!isok
+#ifdef ENFORCE
+             && !enforced
+#endif
+             )
             {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
+                if(MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+                             sptr->name, chptr->chname);
+                break;
             }
 
           if(MyClient(sptr))
@@ -1955,12 +2067,16 @@
           break;
 #endif
 
-        case 'm' :
-          if (!isok)
-            {
+        case 'm' :	    
+            if(!isok
+#ifdef ENFORCE
+               && !enforced
+#endif               
+              )
+	    {
               if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
               break;
             }
 
@@ -2008,12 +2124,21 @@
           break;
 
         case 'n' :
-          if (!isok)
-            {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
+            if(!isok)
+	    {
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
 
           if(MyClient(sptr))
@@ -2062,12 +2187,21 @@
         case 'p' :
           if (!isok)
             {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
-
+          
           if(MyClient(sptr))
             {
 #ifdef OLD_P_S
@@ -2131,10 +2265,19 @@
         case 's' :
           if (!isok)
             {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
 
           /* ickity poo, traditional +p-s nonsense */
@@ -2202,10 +2345,19 @@
         case 't' :
           if (!isok)
             {
-              if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
-                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
-                           sptr->name, chptr->chname);
-              break;
+#ifdef ENFORCE
+	      if(!IsEnforce(sptr))
+	      {	    
+#endif /* ENFORCE */
+                if (MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                  sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name, 
+                             sptr->name, chptr->chname);
+                break;
+#ifdef ENFORCE
+	      } else {	    
+		enforced = 1;
+	      }
+#endif /* ENFORCE */
             }
 
           if(MyClient(sptr))
@@ -2251,6 +2403,98 @@
             }
           break;
 
+#ifdef HAVE_SSL
+        case 'x':
+          
+          if(whatt == MODE_QUERY)      /* shouldn't happen. */
+            break;
+          
+          if(!isok
+#ifdef ENFORCE
+             && !enforced
+#endif
+             )
+            {
+              if(MyClient(sptr) && !errsent(SM_ERR_NOOPS, &errors_sent))
+                sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+                           sptr->name, chptr->chname);
+              break;
+            }
+
+          if(whatt == MODE_ADD)
+            {
+              if(!IsSSLChannel(chptr))
+                {
+                  sendto_one(sptr, ":%s NOTICE %s :Cannot set +x when not +z", me.name, sptr->name);
+                  break;
+                }
+              
+              if(len + 2 >= MODEBUFLEN)
+                break;
+#ifdef OLD_NON_RED
+              if(!IsSSLOnlyChannel(chptr))
+#endif
+                {
+                  SetSSLOnlyChannel(chptr);
+                  *mbufw++ = '+';
+                  *mbufw++ = 'x';
+                  len += 2;
+                }
+            }
+          else
+            {
+              if(len + 2 >= MODEBUFLEN)
+                break;
+
+#ifdef OLD_NON_RED
+              if(IsSSLOnlyChannel(chptr))
+#endif
+                {
+                  ClearSSLOnlyChannel(chptr);
+                  *mbufw++ = '-';
+                  *mbufw++ = 'x';
+                  len += 2;
+                }
+            }
+          break;
+          
+        case 'z':
+          
+          if(!IsServer(sptr)) /* users can't decide this */
+            break;
+                    
+          if(whatt == MODE_ADD)
+            {
+              if(len + 2 >= MODEBUFLEN)
+                break;
+
+              if(!IsSSLChannel(chptr))
+                {
+                  sendto_realops_flags(FLAGS_DEBUG, "Channel %s entered SSL mode (from %s)", chptr->chname, sptr->name);
+                  SetSSLChannel(chptr);  
+                  *mbufw++ = '+';
+                  *mbufw++ = 'z';
+                  len += 2;
+                }
+            }
+          else
+            {              
+              if(len + 2 >= MODEBUFLEN)
+                break;
+
+              if(whatt == MODE_DEL && IsSSLChannel(chptr))
+                {
+                  sendto_realops_flags(FLAGS_DEBUG, "Channel %s left SSL mode (from %s)", chptr->chname, sptr->name);
+                  ClearSSLChannel(chptr);
+                  *mbufw++ = '-';
+                  *mbufw++ = 'z';
+                  len += 2;
+                }
+            }
+          
+          break;
+#endif
+          
         default:
           if (whatt == MODE_QUERY)
             break;
@@ -2278,46 +2522,113 @@
   collapse_signs(modebuf_new);
   collapse_signs(modebuf_newer);
 
+
   if(*modebuf)
     {
+#ifdef ENFORCE
+      if(enforced)
+       {
+         if(sptr->host && *sptr->host)
+           sendto_realops("Enforced mode %s %son %s from %s (%s@%s)",
+  		          modebuf, parabuf, chptr->chname, sptr->name,
+                          sptr->username, sptr->host);
+         
+         if(IsServer(cptr))
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  sptr->servptr->name, chptr->chname,
+                                  modebuf, parabuf);
+         else
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  me.name, chptr->chname,
+                                  modebuf, parabuf);
+       }
+       else
+#endif        
 #ifdef HIDE_OPS
-      sendto_channel_chanops_butserv(chptr, sptr, ":%s MODE %s %s %s", 
-				     sptr->name, chptr->chname,
-				     modebuf, parabuf);
+         sendto_channel_chanops_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                        sptr->name, chptr->chname,  modebuf, parabuf);
 #else
-      sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
-                           sptr->name, chptr->chname,
-                           modebuf, parabuf);
+         sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                sptr->name, chptr->chname,  modebuf, parabuf);
 #endif
-      sendto_match_servs(chptr, cptr, ":%s MODE %s %s %s",
-                         sptr->name, chptr->chname,
-                         modebuf, parabuf);
+     
+       sendto_match_servs(chptr, sptr, ":%s MODE %s %s %s",
+                          sptr->name, chptr->chname,
+                          modebuf, parabuf);
     }
 
   if(*modebuf_new)
     {
-      sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
-                             sptr->name, chptr->chname,
-                             modebuf_new, parabuf_new);
+#ifdef ENFORCE
+       if(enforced)
+       {
+         if(sptr->host && *sptr->host)
+           sendto_realops("Enforced mode %s %son %s from %s (%s@%s)",
+	  	          modebuf_new, parabuf_new, chptr->chname, sptr->name,
+                          sptr->username, sptr->host);
 
-      sendto_match_cap_servs(chptr, cptr, CAP_EX, ":%s MODE %s %s %s",
-                             sptr->name, chptr->chname,
-                             modebuf_new, parabuf_new);
+         if(IsServer(cptr))
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  sptr->servptr->name, chptr->chname,
+                                  modebuf_new, parabuf_new);
+         else
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  me.name, chptr->chname,
+                                  modebuf_new, parabuf_new);
+       }
+       else
+#endif
+#ifdef HIDE_OPS
+         sendto_channel_chanops_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                        sptr->name, chptr->chname,  modebuf_new, parabuf_new);
+#else
+         sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                sptr->name, chptr->chname,  modebuf_new, parabuf_new);
+#endif
+     
+       sendto_match_servs(chptr, sptr, ":%s MODE %s %s %s",
+                          sptr->name, chptr->chname,
+                          modebuf_new, parabuf_new);
     }
+
   if(*modebuf_newer)
     {
-      sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s",
-                             sptr->name, chptr->chname,
-                             modebuf_newer, parabuf_newer);
-      sendto_match_cap_servs(chptr, cptr, CAP_DE, ":%s MODE %s %s %s",
-                             sptr->name, chptr->chname,
-                             modebuf_newer, parabuf_newer);
-    }
+#ifdef ENFORCE
+      if(enforced)
+       {
+         if(sptr->host && *sptr->host)
+           sendto_realops("Enforced mode %s %son %s from %s (%s@%s)",
+	  	          modebuf_newer, parabuf_newer, chptr->chname, sptr->name,
+                          sptr->username, sptr->host);
 
+         if(IsServer(cptr))
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  sptr->servptr->name, chptr->chname,
+                                  modebuf_newer, parabuf_newer);
+         else
+           sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s", 
+                                  me.name, chptr->chname,
+                                  modebuf_newer, parabuf_newer);
+       }
+       else
+#endif
+#ifdef HIDE_OPS
+         sendto_channel_chanops_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                        sptr->name, chptr->chname,  modebuf_newer, parabuf_newer);
+#else
+         sendto_channel_butserv(chptr, sptr, ":%s MODE %s %s %s",
+                                sptr->name, chptr->chname,  modebuf_newer, parabuf_newer);
+#endif
+     
+       sendto_match_servs(chptr, sptr, ":%s MODE %s %s %s",
+                          sptr->name, chptr->chname,
+                          modebuf_newer, parabuf_newer);
+    }
                      
   return;
 }
 
+
 static  int     can_join(struct Client *sptr, struct Channel *chptr, char *key, int *flags)
 {
   Link  *lp;
@@ -2334,26 +2645,49 @@
     }
 #endif
 
-  if ( (ban_or_exception = is_banned(sptr, chptr)) == CHFL_BAN)
-    return (ERR_BANNEDFROMCHAN);
+  if((ban_or_exception = is_banned(sptr, chptr)) == CHFL_BAN)
+    return ERR_BANNEDFROMCHAN;
   else
     *flags |= ban_or_exception; /* Mark this client as "charmed" */
 
-  if (chptr->mode.mode & MODE_INVITEONLY)
+  if(chptr->mode.mode & MODE_INVITEONLY)
     {
-      for (lp = sptr->user->invited; lp; lp = lp->next)
-        if (lp->value.chptr == chptr)
+      for(lp = sptr->user->invited; lp; lp = lp->next)
+        if(lp->value.chptr == chptr)
           break;
-      if (!lp)
-        return (ERR_INVITEONLYCHAN);
+      if(!lp)
+        return ERR_INVITEONLYCHAN;
     }
 
-  if (*chptr->mode.key && (BadPtr(key) || irccmp(chptr->mode.key, key)))
-    return (ERR_BADCHANNELKEY);
+  if(*chptr->mode.key && (BadPtr(key) || strcmp(chptr->mode.key, key)))
+    return ERR_BADCHANNELKEY;
 
-  if (chptr->mode.limit && chptr->users >= chptr->mode.limit)
-    return (ERR_CHANNELISFULL);
+  if(chptr->mode.limit && chptr->users >= chptr->mode.limit)
+    return ERR_CHANNELISFULL;
 
+#ifdef HAVE_SSL
+  if(MyConnect(sptr) && IsSSLChannel(chptr))
+    {
+      if(!IsSSL(sptr) || !is_ssl_channel(chptr))
+        {
+          if(IsSSLOnlyChannel(chptr))
+            return ERR_NEEDSSL;
+          
+          sendto_realops_flags(FLAGS_DEBUG,
+                               "Local JOIN for channel %s, nick %s breaks SSL mode.",
+                               chptr->chname, sptr->name);
+          
+          ClearSSLChannel(chptr);
+          sendto_channel_butserv(chptr, sptr,
+                                 ":%s MODE %s -z",
+                                 me.name, chptr->chname);
+          sendto_match_servs(chptr, sptr,
+                             ":%s MODE %s -z",
+                             me.name, chptr->chname);
+        }
+    }
+#endif
+  
   return 0;
 }
 
@@ -2971,20 +3305,19 @@
   int   successful_join_count = 0; /* Number of channels successfully joined */
 #endif
   
-  if (!(sptr->user))
+  if(!(sptr->user))
     {
       /* something is *fucked* - bail */
       return 0;
     }
 
-  if (parc < 2 || *parv[1] == '\0')
+  if(parc < 2 || *parv[1] == '\0')
     {
       sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
                  me.name, parv[0], "JOIN");
       return 0;
     }
 
-
 #ifdef NEED_SPLITCODE
 
   /* Check to see if the timer has timed out, and if so, see if
@@ -3056,7 +3389,7 @@
       (void)strncat(jbuf, name, sizeof(jbuf) - i - 1);
       i += strlen(name)+1;
     }
-  /*    (void)strcpy(parv[1], jbuf);*/
+/*    (void)strcpy(parv[1], jbuf);  whats this? */
 
   p = NULL;
   if (parv[2])
@@ -3125,25 +3458,25 @@
           continue;
         }
       
-      if (MyConnect(sptr))
+      if(MyConnect(sptr))
         {
           /*
           ** local client is first to enter previously nonexistent
           ** channel so make them (rightfully) the Channel
           ** Operator.
           */
-           /*     flags = (ChannelExists(name)) ? 0 : CHFL_CHANOP; */
+          /*     flags = (ChannelExists(name)) ? 0 : CHFL_CHANOP; */
 
           /* To save a redundant hash table lookup later on */
            
-           if((chptr = hash_find_channel(name, NullChn)))
-             flags = 0;
-           else
-             flags = CHFL_CHANOP;
-
-           /* if its not a local channel, or isn't an oper
-            * and server has been split
-            */
+          if((chptr = hash_find_channel(name, NullChn)))
+            flags = 0;
+          else
+            flags = CHFL_CHANOP;
+          
+          /* if its not a local channel, or isn't an oper
+           * and server has been split
+           */
 
 #ifdef NO_CHANOPS_WHEN_SPLIT
           if((*name != '&') && !IsAnOper(sptr) && server_was_split)
@@ -3152,12 +3485,12 @@
 
               if(!IsRestricted(sptr) && (flags & CHFL_CHANOP))
                 sendto_one(sptr,":%s NOTICE %s :*** Notice -- Due to a network split, you can not obtain channel operator status in a new channel at this time.",
-                       me.name,
-                       sptr->name);
+                           me.name,
+                          sptr->name);
             }
 #endif
 
-          if ((sptr->user->joined >= MAXCHANNELSPERUSER) &&
+          if((sptr->user->joined >= MAXCHANNELSPERUSER) &&
              (!IsAnOper(sptr) || (sptr->user->joined >= MAXCHANNELSPERUSER*3)))
             {
               sendto_one(sptr, form_str(ERR_TOOMANYCHANNELS),
@@ -3173,7 +3506,7 @@
 #ifdef ANTI_SPAMBOT       /* Dianora */
           if(flags == 0)        /* if channel doesn't exist, don't penalize */
             successful_join_count++;
-          if( SPAMNUM && (sptr->join_leave_count >= SPAMNUM))
+          if(SPAMNUM && (sptr->join_leave_count >= SPAMNUM))
             { 
               /* Its already known as a possible spambot */
  
@@ -3181,20 +3514,20 @@
                 sptr->oper_warn_count_down--;
               else
                 sptr->oper_warn_count_down = 0;
- 
+
               if(sptr->oper_warn_count_down == 0)
                 {
                   sendto_ops_flags(FLAGS_BOTS,
-                    "User %s (%s@%s) trying to join %s is a possible spambot",
-                             sptr->name,
-                             sptr->username,
-                             sptr->host,
-                             name);     
+                                   "User %s (%s@%s) trying to join %s is a possible spambot",
+                                   sptr->name,
+                                   sptr->username,
+                                   sptr->host,
+                                   name);
                   sptr->oper_warn_count_down = OPER_SPAM_COUNTDOWN;
                 }
 #ifndef ANTI_SPAMBOT_WARN_ONLY
               return 0; /* Don't actually JOIN anything, but don't let
-                           spambot know that */
+                          spambot know that */
 #endif
             }
 #endif
@@ -3205,7 +3538,7 @@
           ** complain for remote JOINs to existing channels
           ** (they should be SJOINs) -orabidoo
           */
-          if (!ChannelExists(name))
+          if(!ChannelExists(name))
             ts_warn("User on %s remotely JOINing new channel", 
                     sptr->user->server);
         }
@@ -3213,13 +3546,13 @@
 #if defined(NO_JOIN_ON_SPLIT)
       if(server_was_split && (*name != '&'))
         {
-          if( chptr )   /* The channel existed, so I can't join it */
+          if(chptr)   /* The channel existed, so I can't join it */
             {
-              if (IsMember(sptr, chptr)) /* already a member, ignore this */
+              if(IsMember(sptr, chptr)) /* already a member, ignore this */
                 continue;
 
               /* allow local joins to this channel */
-              if( (chptr->users == 0) && !IsAnOper(sptr) )
+              if((chptr->users == 0) && !IsAnOper(sptr))
                 {
                   sendto_one(sptr, form_str(ERR_UNAVAILRESOURCE),
                              me.name, parv[0], name);
@@ -3231,17 +3564,17 @@
         }
       else
 #endif
-      if(!chptr)        /* If I already have a chptr, no point doing this */
-        chptr = get_channel(sptr, name, CREATE);
+        if(!chptr)        /* If I already have a chptr, no point doing this */
+          chptr = get_channel(sptr, name, CREATE);
 
       if(chptr)
         {
-          if (IsMember(sptr, chptr))    /* already a member, ignore this */
+          if(IsMember(sptr, chptr))    /* already a member, ignore this */
             continue;
         }
       else
         {
-           sendto_one(sptr, form_str(ERR_UNAVAILRESOURCE),
+          sendto_one(sptr, form_str(ERR_UNAVAILRESOURCE),
                       me.name, parv[0], name);
 #ifdef ANTI_SPAMBOT
           if(successful_join_count > 0)
@@ -3256,16 +3589,19 @@
        * flags will have CHFL_EXCEPTION set
        */
 
-      if (MyConnect(sptr) && (i = can_join(sptr, chptr, key, &flags)))
+      if(MyConnect(sptr) && !IsEnforce(sptr) && (i = can_join(sptr, chptr, key, &flags)))
         {
           sendto_one(sptr,
-                    form_str(i), me.name, parv[0], name);
+                     form_str(i), me.name, parv[0], name);
 #ifdef ANTI_SPAMBOT
           if(successful_join_count > 0)
             successful_join_count--;
 #endif
           continue;
         }
+      if(can_join(sptr, chptr, key, &flags))
+         sendto_realops("Enforced join to %s from %s",     
+                         chptr->chname, sptr->name);
 
       /*
       **  Complete user entry to the new channel (if any)
@@ -3273,20 +3609,17 @@
 
 #ifdef NO_CHANOPS_WHEN_SPLIT
       if(allow_op)
-        {
-          add_user_to_channel(chptr, sptr, flags);
-        }
+        add_user_to_channel(chptr, sptr, flags);
       else
-        {
-          add_user_to_channel(chptr, sptr, flags & CHFL_EXCEPTION);
-        }
+        add_user_to_channel(chptr, sptr, flags & CHFL_EXCEPTION);
 #else
       add_user_to_channel(chptr, sptr, flags);
 #endif
+      
       /*
       **  Set timestamp if appropriate, and propagate
       */
-      if (MyClient(sptr) && (flags & CHFL_CHANOP) )
+      if(MyClient(sptr) && (flags & CHFL_CHANOP))
         {
           chptr->channelts = CurrentTime;
 #ifdef NO_CHANOPS_WHEN_SPLIT
@@ -3294,54 +3627,70 @@
             {
               sendto_match_servs(chptr, cptr,
                                  ":%s SJOIN %lu %s + :@%s", me.name,
-                                 chptr->channelts, name, parv[0]);
-
+                                 chptr->channelts, chptr->chname, parv[0]);
             }                                
           else
             sendto_match_servs(chptr, cptr,
                                ":%s SJOIN %lu %s + :%s", me.name,
-                               chptr->channelts, name, parv[0]);
+                               chptr->channelts, chptr->chname, parv[0]);
 #else
           sendto_match_servs(chptr, cptr,
                              ":%s SJOIN %lu %s + :@%s", me.name,
-                             chptr->channelts, name, parv[0]);
+                             chptr->channelts, chptr->chname, parv[0]);
 #endif
         }
-      else if (MyClient(sptr))
+      else if(MyClient(sptr))
         {
           sendto_match_servs(chptr, cptr,
                              ":%s SJOIN %lu %s + :%s", me.name,
-                             chptr->channelts, name, parv[0]);
+                             chptr->channelts, chptr->chname, parv[0]);
         }
       else
         sendto_match_servs(chptr, cptr, ":%s JOIN :%s", parv[0],
-                           name);
+                            chptr->chname);
 
       /*
       ** notify all other users on the new channel
       */
       sendto_channel_butserv(chptr, sptr, ":%s JOIN :%s",
-                             parv[0], name);
-
-      if (MyClient(sptr))
+                             parv[0], chptr->chname);
+          
+      if(MyClient(sptr))
         {
-          if( flags & CHFL_CHANOP )
+          if(flags & CHFL_CHANOP)
             {
               chptr->mode.mode |= MODE_TOPICLIMIT;
               chptr->mode.mode |= MODE_NOPRIVMSGS;
-
-              sendto_channel_butserv(chptr, sptr,
-                                 ":%s MODE %s +nt",
-                                 me.name, chptr->chname);
-
-              sendto_match_servs(chptr, sptr, 
-                                 ":%s MODE %s +nt",
-                                 me.name, chptr->chname);
+#ifdef HAVE_SSL
+              if(IsSSLUmode(sptr))
+                {
+                  sendto_realops_flags(FLAGS_DEBUG,
+                                       "Local channel creation for channel %s, nick %s initiated into SSL mode.",
+                                       chptr->chname, sptr->name);
+                  
+                  SetSSLChannel(chptr);
+                  sendto_channel_butserv(chptr, sptr,
+                                         ":%s MODE %s +ntz",
+                                       me.name, chptr->chname);
+                  sendto_match_servs(chptr, sptr, 
+                                     ":%s MODE %s +ntz",
+                                     me.name, chptr->chname);
+                }
+              else
+#endif              
+                {
+                  sendto_channel_butserv(chptr, sptr,
+                                         ":%s MODE %s +nt",
+                                         me.name, chptr->chname);
+                  sendto_match_servs(chptr, sptr, 
+                                     ":%s MODE %s +nt",
+                                     me.name, chptr->chname);
+                }
             }
 
           del_invite(sptr, chptr);
-
-          if (chptr->topic[0] != '\0')
+  
+          if(chptr->topic[0] != '\0')
             {
               sendto_one(sptr, form_str(RPL_TOPIC), me.name,
                          parv[0], name, chptr->topic);
@@ -3352,8 +3701,9 @@
                          chptr->topic_time);
 #endif
             }
+
           parv[1] = name;
-          (void)m_names(cptr, sptr, 2, parv);
+          m_names(cptr, sptr, 2, parv);
         }
     }
 
@@ -3454,6 +3804,25 @@
       sendto_channel_butserv(chptr, sptr, PartFmt, parv[0], name);
       remove_user_from_channel(sptr, chptr, 0);
       name = strtoken(&p, (char *)NULL, ",");
+      
+#ifdef HAVE_SSL
+      if(!IsSSLChannel(chptr))
+        {
+          if(is_ssl_channel(chptr))
+             {
+               sendto_realops_flags(FLAGS_DEBUG, "PART from channel %s by %s puts channel into SSL mode.",
+                                    chptr->chname, sptr->name);
+               
+               SetSSLChannel(chptr);
+               sendto_channel_butserv(chptr, sptr,
+                                      ":%s MODE %s +z",
+                                      me.name, chptr->chname);
+               sendto_match_servs(chptr, sptr,
+                                  ":%s MODE %s +z",
+                                  me.name, chptr->chname);
+             }
+        }
+#endif
     }
   return 0;
 }
@@ -3492,6 +3861,7 @@
   char  *name;
   char  *p = (char *)NULL;
   char  *user;
+  int   enforced = 0;
 
   if (parc < 3 || *parv[1] == '\0')
     {
@@ -3530,7 +3900,7 @@
     { 
       /* was a user, not a server, and user isn't seen as a chanop here */
       
-      if(MyConnect(sptr))
+      if(MyConnect(sptr) && !IsEnforce(sptr))
         {
           /* user on _my_ server, with no chanops.. so go away */
           
@@ -3539,7 +3909,7 @@
           return(0);
         }
 
-      if(chptr->channelts == 0)
+      if((chptr->channelts == 0) && !IsEnforce(sptr))
         {
           /* If its a TS 0 channel, do it the old way */
           
@@ -3548,6 +3918,8 @@
           return(0);
         }
 
+      enforced = 1;
+
       /* Its a user doing a kick, but is not showing as chanop locally
        * its also not a user ON -my- server, and the channel has a TS.
        * There are two cases we can get to this point then...
@@ -3596,24 +3968,58 @@
 
   if (IsMember(who, chptr))
     {
+      if(enforced)
+      {
+        sendto_realops("Enforced kick for %s on %s from %s (%s@%s)",
+                       parv[2], chptr->chname, sptr->name, sptr->username, sptr->host);
+
+        if(IsServer(cptr))        
+          sendto_channel_butserv(chptr, sptr,
+                                 ":%s KICK %s %s :%s", sptr->servptr->name,
+                                 name, who->name, comment);
+        else
+          sendto_channel_butserv(chptr, sptr,
+                                 ":%s KICK %s %s :%s", me.name,
+                                 name, who->name, comment);
+      }
+      else
+      {
+
 #ifdef HIDE_OPS
-      sendto_channel_chanops_butserv(chptr, sptr,
-                             ":%s KICK %s %s :%s", parv[0],
-                             name, who->name, comment);
-      sendto_channel_non_chanops_butserv(chptr, sptr,
-                             ":%s KICK %s %s :%s", NETWORK_NAME,
-                             name, who->name, comment);
+        sendto_channel_chanops_butserv(chptr, sptr,
+                                       ":%s KICK %s %s :%s", parv[0],
+                                       name, who->name, comment);
+        sendto_channel_non_chanops_butserv(chptr, sptr,
+                                           ":%s KICK %s %s :%s", NETWORK_NAME,
+                                           name, who->name, comment);
 
 #else
-      sendto_channel_butserv(chptr, sptr,
-                             ":%s KICK %s %s :%s", parv[0],
-                             name, who->name, comment);
+        sendto_channel_butserv(chptr, sptr,
+                               ":%s KICK %s %s :%s", parv[0],
+                               name, who->name, comment);
 #endif
+      }
       sendto_match_servs(chptr, cptr,
                          ":%s KICK %s %s :%s",
                          parv[0], name,
                          who->name, comment);
       remove_user_from_channel(who, chptr, 1);
+#ifdef HAVE_SSL
+      if(!IsSSLChannel(chptr) && is_ssl_channel(chptr))
+        {
+          sendto_realops_flags(FLAGS_DEBUG, "KICK for %s puts channel %s into SSL mode",
+                               sptr->name, chptr->chname);
+          
+          SetSSLChannel(chptr);
+          sendto_channel_butserv(chptr, sptr,
+                                 ":%s MODE %s +z",
+                                 me.name, chptr->chname);
+          sendto_match_servs(chptr, sptr,
+                             ":%s MODE %s +z",
+                             me.name, chptr->chname);
+          
+        }
+#endif      
     }
   else
     sendto_one(sptr, form_str(ERR_USERNOTINCHANNEL),
@@ -3791,6 +4197,7 @@
 {
   struct Channel *chptr = NullChn;
   char  *topic = (char *)NULL, *name, *p = (char *)NULL;
+  int enforced = 0;
   
   if (parc < 2)
     {
@@ -3818,7 +4225,11 @@
           return 0;
         }
 
-      if (!IsMember(sptr, chptr))
+      /* topic is enforced if user is +e and not chanop or not member and chan is +t */
+      enforced = ((chptr->mode.mode & MODE_TOPICLIMIT) && !IsServer(sptr) &&
+                  (!IsMember(sptr, chptr) || !is_chan_op(sptr, chptr)) && (IsServer(cptr) || IsEnforce(sptr)));
+        
+      if (!IsMember(sptr, chptr) && !enforced)
         {
           sendto_one(sptr, form_str(ERR_NOTONCHANNEL), me.name, parv[0],
               name);
@@ -3827,11 +4238,14 @@
 
       if (parc > 2) /* setting topic */
         topic = parv[2];
+      else
+        enforced = 0;
+
 
       if(topic) /* a little extra paranoia never hurt */
         {
           if ((chptr->mode.mode & MODE_TOPICLIMIT) == 0 ||
-               is_chan_op(sptr, chptr))
+               is_chan_op(sptr, chptr) || enforced || IsServer(cptr))
             {
               /* setting a topic */
               /*
@@ -3847,15 +4261,24 @@
               chptr->topic_time = CurrentTime;
 #endif
               sendto_match_servs(chptr, cptr,":%s TOPIC %s :%s",
-                                 parv[0], chptr->chname,
+                                 sptr->name, chptr->chname,
                                  chptr->topic);
-              sendto_channel_butserv(chptr, sptr, ":%s TOPIC %s :%s",
-                                     parv[0],
-                                     chptr->chname, chptr->topic);
+              
+              if(enforced && sptr->servptr)
+                sendto_channel_butserv(chptr, &me, ":%s TOPIC %s :%s",
+                                         sptr->servptr->name, chptr->chname, chptr->topic);
+              else
+                sendto_channel_butserv(chptr, &me, ":%s TOPIC %s :%s", 
+                                       sptr->name, chptr->chname, chptr->topic);
             }
           else
-            sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
-                       me.name, parv[0], chptr->chname);
+            {           
+              sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
+                         me.name, parv[0], chptr->chname);
+              return 0;
+            }
+          
+
         }
       else  /* only asking  for topic  */
         {
@@ -3882,6 +4305,10 @@
                  me.name, parv[0], name);
     }
 
+  if(enforced)
+     sendto_realops("Enforced topic on %s from %s (%s@%s)",
+                    chptr->chname, sptr->name, sptr->username, sptr->host);
+
   return 0;
 }
 
@@ -3899,6 +4326,7 @@
   struct Client *acptr;
   struct Channel *chptr;
   int need_invite=NO;
+  int enforced=0;
 
   if (parc < 3 || *parv[1] == '\0')
     {
@@ -3956,9 +4384,13 @@
       return 0;
     }
 
+  enforced = !is_chan_op(sptr, chptr) && chptr &&
+             (chptr->mode.mode & MODE_INVITEONLY) &&
+             (IsEnforce(sptr) || IsServer(cptr));
+
   /* By this point, chptr is non NULL */  
 
-  if (!IsMember(sptr, chptr))
+  if (!IsMember(sptr, chptr) && !enforced)
     {
       if (MyClient(sptr))
         sendto_one(sptr, form_str(ERR_NOTONCHANNEL),
@@ -3978,15 +4410,14 @@
     {
       need_invite = YES;
 
-      if (!is_chan_op(sptr, chptr))
-        {
-          if (MyClient(sptr))
-            sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
-                       me.name, parv[0], parv[2]);
-          return -1;
-        }
-    }
-
+      if (!is_chan_op(sptr, chptr) && !enforced)
+      {
+        if (MyClient(sptr))
+          sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
+                     me.name, parv[0], parv[2]);
+        return -1;
+     }
+  }
   /*
    * due to some whining I've taken out the need for the channel
    * being +i before sending an INVITE. It was intentionally done this
@@ -4042,8 +4473,28 @@
   if(MyConnect(acptr) && need_invite)
     add_invite(acptr, chptr);
 
-  sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s",
-                    parv[0], acptr->name, parv[2]);
+  if(enforced)
+  {
+    sendto_realops("Enforced invite for %s on %s from %s (%s@%s)",
+                   acptr->name, chptr->chname, sptr->name, sptr->username, sptr->host);
+
+    if(MyClient(acptr))
+    {
+      if(IsServer(cptr))
+        sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s",
+                          sptr->servptr->name, acptr->name, parv[2]);
+      else
+        sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s",
+                          me.name, acptr->name, parv[2]);
+    }
+    else
+      sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s",
+                        parv[0], acptr->name, parv[2]);
+  }
+  else
+    sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s",
+                      parv[0], acptr->name, parv[2]);
+      
   return 0;
 }
 
@@ -4175,7 +4626,12 @@
 	  if(is_chan_op(sptr,chptr))
 #endif
 	    {
-	      if (lp->flags & CHFL_CHANOP)
+              if(IsEnforce(c2ptr))
+                {
+                  strcat(buf, "!");
+                  idx++;
+                }              
+	      else if (lp->flags & CHFL_CHANOP)
 		{
 		  strcat(buf, "@");
 		  idx++;
@@ -4184,7 +4640,7 @@
 		{
 		  strcat(buf, "+");
 		  idx++;
-		}
+		}              
 	    }
           strncat(buf, c2ptr->name, NICKLEN);
           idx += strlen(c2ptr->name) + 1;
@@ -4228,6 +4684,7 @@
 
       if (!IsPerson(c2ptr) || IsInvisible(c2ptr))
         continue;
+
       lp = c2ptr->user->channel;
       /*
        * dont show a client if they are on a secret channel or
@@ -4513,7 +4970,7 @@
       if (doesop && !haveops)
         {
           chptr->channelts = tstosend = newts;
-#if 0
+
           /* Only warn of Hacked ops if the channel already
            * existed on this side.
            * This should drop the number of warnings down dramatically
@@ -4525,8 +4982,7 @@
                              sptr->name,
                              chptr->chname);
             }
-#endif
-        }
+       }
       else
         tstosend = oldts;
     }
@@ -4850,6 +5306,40 @@
       people++;
       if (!IsMember(acptr, chptr))
         {
+#ifdef HAVE_SSL
+          if(IsSSLChannel(chptr) && !IsSSLUmode(acptr))
+            {
+              if(IsSSLOnlyChannel(chptr))
+                {
+                  char message[NICKLEN+CHANNELLEN+HOSTLEN+60];
+                  
+                  /* something unexpected happened */
+                  ircsprintf(message, "WARNING: SJOIN from %s for channel %s by %s breaks SSL only mode.",
+                             cptr->name, parv[2], s);
+                  
+                  sendto_realops(message);
+                  sendto_channel_type_notice(cptr, chptr, MODE_CHANOP, message);                  
+                                 
+                  ClearSSLOnlyChannel(chptr);
+                  ClearSSLChannel(chptr);
+                  sendto_channel_butserv(chptr, sptr, ":%s MODE %s -xz",
+                                         me.name, chptr->chname);
+                  sendto_match_servs(chptr, sptr, ":%s MODE %s -xz",
+                                     me.name, chptr->chname);
+                }
+              else
+                {                  
+                  sendto_realops_flags(FLAGS_DEBUG, "SJOIN from %s for channel %s by %s breaks SSL mode.",
+                                       cptr->name, parv[2], s);
+              
+                  ClearSSLChannel(chptr);
+                  sendto_channel_butserv(chptr, sptr, ":%s MODE %s -z",
+                                         me.name, chptr->chname);
+                  sendto_match_servs(chptr, sptr, ":%s MODE %s -z",
+                                     me.name, chptr->chname);
+                }
+            }
+#endif      
           add_user_to_channel(chptr, acptr, fl);
           sendto_channel_butserv(chptr, acptr, ":%s JOIN :%s",
                                  s, parv[2]);
diff -uNrd ircd-hybrid-6.0/src/class.c ircd-pi1.0a/src/class.c
--- ircd-hybrid-6.0/src/class.c	Mon Jan 31 19:44:11 2000
+++ ircd-pi1.0a/src/class.c	Fri Nov  2 19:23:27 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: class.c,v 1.14 2000/02/01 00:44:11 lusky Exp $
+ *   $Id: class.c,v 1.1.1.1 2001/11/03 00:23:27 shifty Exp $
  */
 #include "class.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/client.c ircd-pi1.0a/src/client.c
--- ircd-hybrid-6.0/src/client.c	Sat Dec 30 19:11:59 2000
+++ ircd-pi1.0a/src/client.c	Tue May 14 00:03:35 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: client.c,v 1.58 2000/12/31 00:11:59 lusky Exp $
+ *  $Id: client.c,v 1.8 2002/05/14 04:03:35 smoli Exp $
  */
 #include "client.h"
 #include "class.h"
@@ -45,6 +45,7 @@
 #include "struct.h"
 #include "whowas.h"
 #include "s_debug.h"
+#include "config.h"
 
 #include <assert.h>
 #include <fcntl.h>
@@ -181,8 +182,10 @@
 #ifdef FLUD
   cptr->fludees = NULL;
 #endif
+#ifdef HAVE_SSL
+  cptr->ssl     = NULL;
+#endif
 #endif /* NULL_POINTER_NOT_ZERO */
-
   return cptr;
 }
 
@@ -520,6 +523,9 @@
                 {
                   sendto_ops("No response from %s, closing link",
                              get_client_name(cptr, MASK_IP));
+#ifdef BACKUP
+                  backup_lost_link(cptr);
+#endif /* BACKUP */
                 }
               /*
                * this is used for KILL lines with time restrictions
@@ -680,13 +686,20 @@
 #endif
     }
 
-  else if (IsClient(cptr)) {
-    --Count.total;
-    if (IsAnOper(cptr))
-      --Count.oper;
-    if (IsInvisible(cptr)) 
-      --Count.invisi;
-  }
+  else if(IsClient(cptr))
+    {      
+      --Count.total;
+      
+#ifdef HAVE_SSL
+      if(IsSSLUmode(cptr))
+        --Count.reach_ssl;
+#endif
+        
+      if (IsAnOper(cptr))
+        --Count.oper;
+      if (IsInvisible(cptr)) 
+        --Count.invisi;
+    }
 }
 
 static void release_client_state(struct Client* cptr)
@@ -1214,7 +1227,24 @@
                                    sptr->name, comment);
 
           while ((lp = sptr->user->channel))
-            remove_user_from_channel(sptr,lp->value.chptr,0);
+            {  
+              remove_user_from_channel(sptr,lp->value.chptr,0);
+#ifdef HAVE_SSL
+              if(!IsSSLChannel(lp->value.chptr) && is_ssl_channel(lp->value.chptr))
+                {
+                  sendto_realops_flags(FLAGS_DEBUG, "QUIT by %s puts channel %s into SSL mode.",
+                                       sptr->name, lp->value.chptr->chname);
+                  
+                  SetSSLChannel(lp->value.chptr);
+                  sendto_channel_butserv(lp->value.chptr, sptr,
+                                         ":%s MODE %s +z",
+                                         me.name, lp->value.chptr->chname);
+                  sendto_match_servs(lp->value.chptr, sptr,
+                                     ":%s MODE %s +z",
+                                     me.name, lp->value.chptr->chname);
+                }
+#endif
+            }
           
           /* Clean up invitefield */
           while ((lp = sptr->user->invited))
@@ -1432,7 +1462,10 @@
       if (IsClient(sptr))
         {
           Count.local--;
-
+#ifdef HAVE_SSL          
+          if(IsSSL(sptr))
+            Count.local_ssl--;
+#endif
           /* LINKLIST */
           /* oh for in-line functions... */
           if(IsPerson(sptr))        /* a little extra paranoia */
@@ -1460,7 +1493,7 @@
         {
           Count.myserver--;
           fdlist_delete(sptr->fd, FDL_SERVER | FDL_BUSY);
-
+          
           /* LINKLIST */
           /* oh for in-line functions... */
           {
@@ -1539,7 +1572,7 @@
                             sptr->host,
                             sptr->sendK,
                             sptr->receiveK);
-                write(logfile, linebuf, strlen(linebuf));
+                write(logfile, linebuf, irclen(linebuf));
                 /*
                  * Resync the file evey 10 seconds
                  */
@@ -1603,10 +1636,13 @@
           sendto_ops("%s was connected for %d seconds.  %d/%d sendK/recvK.",
                      sptr->name, CurrentTime - sptr->firsttime,
                      sptr->sendK, sptr->receiveK);
+
           log(L_NOTICE, "%s was connected for %d seconds.  %d/%d sendK/recvK.",
               sptr->name, CurrentTime - sptr->firsttime, 
               sptr->sendK, sptr->receiveK);
-
+#ifdef BACKUP
+          backup_lost_link(sptr);
+#endif /* BACKUP */
               /* Just for paranoia... this shouldn't be necessary if the
               ** remove_dependents() stuff works, but it's still good
               ** to do it.    MyConnect(sptr) has been set to false,
diff -uNrd ircd-hybrid-6.0/src/dbuf.c ircd-pi1.0a/src/dbuf.c
--- ircd-hybrid-6.0/src/dbuf.c	Thu Dec 23 02:10:54 1999
+++ ircd-pi1.0a/src/dbuf.c	Sun May  5 00:42:24 2002
@@ -21,7 +21,7 @@
  * see the header file (dbuf.h).
  *
  *
- * $Id: dbuf.c,v 1.16 1999/12/23 07:10:54 lusky Exp $
+ * $Id: dbuf.c,v 1.6 2002/05/05 04:42:24 smoli Exp $
  */
 #include "dbuf.h"
 #include "common.h"
@@ -31,7 +31,7 @@
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
-
+#include <string.h>
 
 /*
  * And this 'DBufBuffer' should never be referenced outside the
diff -uNrd ircd-hybrid-6.0/src/dline_conf.c ircd-pi1.0a/src/dline_conf.c
--- ircd-hybrid-6.0/src/dline_conf.c	Fri Dec 10 23:11:34 1999
+++ ircd-pi1.0a/src/dline_conf.c	Fri May 10 23:49:04 2002
@@ -1,7 +1,7 @@
 /*
  * dline_conf.c
  *
- * $Id: dline_conf.c,v 1.36 1999/12/11 04:11:34 lusky Exp $
+ * $Id: dline_conf.c,v 1.2 2002/05/11 03:49:04 smoli Exp $
  */
 #include "dline_conf.h"
 #include "class.h"
@@ -504,7 +504,7 @@
       /* #endif */
 
       /* if this is a *@ Kline, then we can toast all the other Klines in the clist */
-      if (!(strcmp(conf_ptr->user,"*")))
+      if (!(irccmp(conf_ptr->user,"*")))
         clist=trim_ip_Klines(clist,0);
 
       conf_ptr->next=clist;
@@ -521,7 +521,7 @@
   for (scan=node->conf;scan;scan=scan->next)
     {
       if (((scan->status & CONF_KILL) || (scan->flags & CONF_FLAGS_E_LINED)) &&
-          (!(strcmp(scan->user,"*"))) &&
+          (!(irccmp(scan->user,"*"))) &&
           (scan->ip_mask<host_mask)) break;
     }
   if (scan) return; /* don't bother adding */
@@ -529,7 +529,7 @@
   /* update oracle */
   ike_oracle[host_ip>>24] |= ((0xffffffff-host_mask)+host_ip);
 
-  if (strcmp(conf_ptr->user,"*")) 
+  if (irccmp(conf_ptr->user,"*")) 
     {  /* not adding a *@ Kline, just slap it in */
       conf_ptr->next=node->conf;
       node->conf=conf_ptr;
@@ -577,7 +577,7 @@
         delete_ip_subtree(ip_Kline[host_ip>>24], host_ip, host_mask, &clist);
 
       /* if this is a *@ Eline, then we can toast all the others in the clist */
-      if (!(strcmp(conf_ptr->user,"*"))) 
+      if (!(irccmp(conf_ptr->user,"*"))) 
         clist=trim_ip_Elines(clist,0);
 
       conf_ptr->next=clist;
@@ -594,7 +594,7 @@
   for (scan=node->conf;scan;scan=scan->next)
     {
       if ((scan->flags & CONF_FLAGS_E_LINED) &&
-          (!(strcmp(scan->user,"*"))) &&
+          (!(irccmp(scan->user,"*"))) &&
           (scan->ip_mask<host_mask)) break;
     }
   if (scan) return; /* don't bother adding */
@@ -602,7 +602,7 @@
   /* update oracle */
   ike_oracle[host_ip>>24] |= ((0xffffffff-host_mask)+host_ip);
 
-  if (strcmp(conf_ptr->user,"*")) 
+  if (irccmp(conf_ptr->user,"*")) 
     {  /* not adding a *@ Eline, just slap it in */
       conf_ptr->next=node->conf;
       node->conf=conf_ptr;
diff -uNrd ircd-hybrid-6.0/src/fdlist.c ircd-pi1.0a/src/fdlist.c
--- ircd-hybrid-6.0/src/fdlist.c	Sat Jul 24 03:58:57 1999
+++ ircd-pi1.0a/src/fdlist.c	Fri Nov  2 19:23:28 2001
@@ -3,7 +3,7 @@
  * fdlist.c   maintain lists of certain important fds 
  *
  *
- * $Id: fdlist.c,v 1.10 1999/07/24 07:58:57 tomh Exp $
+ * $Id: fdlist.c,v 1.1.1.1 2001/11/03 00:23:28 shifty Exp $
  */
 #include "fdlist.h"
 #include "client.h"  /* struct Client */
diff -uNrd ircd-hybrid-6.0/src/fileio.c ircd-pi1.0a/src/fileio.c
--- ircd-hybrid-6.0/src/fileio.c	Thu Oct  5 23:00:58 2000
+++ ircd-pi1.0a/src/fileio.c	Fri May 10 23:49:04 2002
@@ -4,7 +4,7 @@
  * Copyright (C) 1990 Jarkko Oikarinen and
  *                    University of Oulu, Co Center
  *
- * $Id: fileio.c,v 1.5 2000/10/06 03:00:58 lusky Exp $
+ * $Id: fileio.c,v 1.5 2002/05/11 03:49:04 smoli Exp $
  *
  * 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
@@ -21,11 +21,13 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #include "fileio.h"
+#include "irc_string.h"
 #include <stdio.h>  /* BUFSIZ, EOF */
 #include <stdlib.h> /* malloc, free */
 #include <fcntl.h>  /* O_RDONLY, O_WRONLY, ... */
 #include <unistd.h> /* read, write, open, close */
 #include <assert.h> /* assert */
+#include <string.h>
 
 #define FB_EOF  0x01
 #define FB_FAIL 0x02
@@ -171,7 +173,7 @@
   assert(fb);
 
   if (0 == fb->flags) {
-    n = write(fb->fd, str, strlen(str));
+    n = write(fb->fd, str, irclen(str));
     if (-1 == n)
       fb->flags |= FB_FAIL;
   }
diff -uNrd ircd-hybrid-6.0/src/flud.c ircd-pi1.0a/src/flud.c
--- ircd-hybrid-6.0/src/flud.c	Sat Nov 18 14:11:11 2000
+++ ircd-pi1.0a/src/flud.c	Fri Nov  2 19:23:29 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: flud.c,v 1.5 2000/11/18 19:11:11 lusky Exp $
+ *   $Id: flud.c,v 1.1.1.1 2001/11/03 00:23:29 shifty Exp $
  */
 #include "flud.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/hash.c ircd-pi1.0a/src/hash.c
--- ircd-hybrid-6.0/src/hash.c	Mon Jan 31 19:44:11 2000
+++ ircd-pi1.0a/src/hash.c	Fri May 10 23:49:04 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: hash.c,v 1.37 2000/02/01 00:44:11 lusky Exp $
+ *  $Id: hash.c,v 1.2 2002/05/11 03:49:04 smoli Exp $
  */
 #include "s_conf.h"
 #include "channel.h"
@@ -539,7 +539,7 @@
             {
               sprintf(result_buf,"Hash Entry:%6d Hits;%7d Links:%6d\n",
                             i, tab->hits, l);
-              write(out,result_buf,strlen(result_buf));
+              write(out,result_buf,irclen(result_buf));
             }
         }
 
diff -uNrd ircd-hybrid-6.0/src/i386/Makefile.in ircd-pi1.0a/src/i386/Makefile.in
--- ircd-hybrid-6.0/src/i386/Makefile.in	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/i386/Makefile.in	Fri May 10 21:30:43 2002
@@ -0,0 +1,242 @@
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+ASM = @ASM@
+AWK = @AWK@
+CC = @CC@
+HUB = @HUB@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IRCDDIR = @IRCDDIR@
+NASM = @NASM@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SSL = @SSL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+lib_LIBRARIES = libircasm.a
+libircasm_a_SOURCES = irccmp.asm irclen.asm ircncmp.asm
+bin_PROGRAMS = asmtest
+asmtest_SOURCES = asmtest.c
+subdir = src/i386
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/setup.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
+PROGRAMS = $(bin_PROGRAMS)
+
+libircasm_a_AR = $(AR) cru
+libircasm_a_LIBADD =
+libircasm_a_OBJECTS = irccmp.$(OBJEXT) irclen.$(OBJEXT) ircncmp.$(OBJEXT)
+asmtest_LIBADD = libircasm.a
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I$(top_builddir)/include
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+NASMFLAGS = @NASMFLAGS@
+COMPILE = $(CC) $(DEFAULT_INCLUDES) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(libircasm_a_SOURCES) $(asmtest_SOURCES)
+DIST_COMMON = Makefile.in
+SOURCES = $(libircasm_a_SOURCES) $(asmtest_SOURCES)
+
+all: Makefile $(LIBRARIES) $(PROGRAMS)
+
+.SUFFIXES:
+.SUFFIXES: .o .obj .asm
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+AR = ar
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+libircasm.a: $(libircasm_a_OBJECTS)
+	-rm -f libircasm.a
+	$(libircasm_a_AR) libircasm.a $(libircasm_a_OBJECTS)
+	$(RANLIB) libircasm.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core *~ 
+
+distclean-compile:
+	-rm -f *.tab.c
+
+asmtest: asmtest.c $(LIBRARIES)
+	$(COMPILE) -o $@ $^ $(asmtest_LIBADD)
+
+.asm.o:
+	$(NASM) $(NASMFLAGS) $<
+        
+CCDEPMODE = @CCDEPMODE@
+uninstall-info:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check: all
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install:
+install-exec:
+install-data:
+uninstall:
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-generic clean-libLIBRARIES clean-binPROGRAMS mostlyclean
+
+distclean: clean distclean-compile \
+	distclean-generic distclean-tags
+
+dvi:
+
+info:
+
+install-man:
+
+maintainer-clean: distclean maintainer-clean-generic
+
+mostlyclean: mostlyclean-compile mostlyclean-generic
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/src/i386/asmtest.c ircd-pi1.0a/src/i386/asmtest.c
--- ircd-hybrid-6.0/src/i386/asmtest.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/i386/asmtest.c	Fri May 10 23:49:07 2002
@@ -0,0 +1,81 @@
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include "irc_string.h"
+
+struct timezone tz = { 0, 0 };
+unsigned long stamp = 0;
+struct timeval tv;
+
+void profile_start()
+{
+  gettimeofday(&tv, &tz);
+  stamp = tv.tv_usec + tv.tv_sec * 1000000;
+}
+
+void profile_end(const char *function, const void *buf, unsigned long size, unsigned long bytes)
+{
+  unsigned long current;
+  unsigned long delta;
+  
+  gettimeofday(&tv, &tz);
+  current = tv.tv_usec + tv.tv_sec * 1000000;
+  delta = current - stamp;
+  
+  fprintf(stderr, "function: %s buf: %p size: %lu retval: %lu time: %lu usecs\n",
+          function, buf, size, bytes, delta);
+}
+
+int main()
+{
+  FILE *f;
+  char buf[131072];
+  char buf2[131072];
+  int l1, l2;
+  
+  f = fopen("/etc/services", "r");
+  
+  l1 = fread(buf, 100000, 1, f);
+  rewind(f);
+  fread(buf2, 100000, 1, f);
+  
+  profile_start();
+  l2 = irclen(&buf[1]);
+  profile_end("irclen()", buf, l1, l2);
+
+  usleep(20000);
+  
+  profile_start();
+  l2 = strlen(&buf[1]);
+  profile_end("strlen()", buf, l1, l2);
+
+  usleep(20000);
+
+  profile_start();
+  l2 = irccmp(&buf[1], &buf2[1]);
+  profile_end("irccmp()", buf2, l1, l2);
+
+  usleep(20000);
+
+  profile_start();
+  l2 = strcmp(&buf[1], &buf2[1]);
+  profile_end("strcmp()", buf2, l1, l2);
+
+  usleep(20000);
+
+  profile_start();
+  l2 = ircncmp(&buf[1], &buf2[1], 1000000);
+  profile_end("ircncmp()", buf2, l1, l2);
+
+  usleep(20000);
+
+  profile_start();
+  l2 = strncmp(&buf[1], &buf2[1], 1000000);
+  profile_end("strncmp()", buf2, l1, l2);
+
+  usleep(20000);
+
+  printf("%d %d\n", !irccmp("TESTLINE", ""), !strcmp("TESTLINE", ""));
+  return 0;
+}
diff -uNrd ircd-hybrid-6.0/src/i386/irccmp.asm ircd-pi1.0a/src/i386/irccmp.asm
--- ircd-hybrid-6.0/src/i386/irccmp.asm	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/i386/irccmp.asm	Fri May 10 21:30:43 2002
@@ -0,0 +1,182 @@
+; IRC - Internet Relay Chat, src/i386/irccmp.asm
+; Copyright (C) 1990 Jarkko Oikarinen and
+;                    University of Oulu, Computing Center
+;
+; See file AUTHORS in IRC package for additional names of
+; the programmers.
+;
+; 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: irccmp.asm,v 1.2 2002/05/11 01:30:43 smoli Exp $
+
+		global	irccmp
+
+[segment .text]
+
+irccmp:		push	ebx
+		push	edi
+		push	esi
+		push	ecx
+                xor     eax, eax
+		mov	esi, [esp + 14h]
+		mov	edi, [esp + 18h]
+		cmp	esi, edi
+		jne	.loop
+		pop	ecx
+		pop	esi
+		pop	edi
+		pop	ebx
+		ret
+
+.loop:		mov	ebx, [esi]
+		mov	ecx, [edi]
+
+		test	bl, bl		; byte 0
+		jz	.exit_cl
+		test	cl, cl
+		jz	.exit_bl
+
+		cmp	bl, 'a'
+		jb	.b0_nc
+		cmp	bl, 'z'
+		ja	.b0_ch
+		sub	bl, 20h
+.b0_ch:		cmp	bl, 'à'
+		jb	.b0_nc
+		cmp	bl, 'ÿ'
+		jae	.b0_nc
+		sub	bl, 20h
+.b0_nc:		cmp	cl, 'a'
+		jb	.c0_nc
+		cmp	cl, 'z'
+		ja	.c0_ch
+		sub	cl, 20h
+.c0_ch:		cmp	cl, 'à'
+		jb	.c0_nc
+		cmp	cl, 'ÿ'
+		jae	.c0_nc
+		sub	cl, 20h
+.c0_nc:
+		cmp	bl, cl
+		jne	.exit_bl
+
+		test	bh, bh		; byte 1
+		jz	.exit_ch
+		test	ch, ch
+		jz	.exit_bh
+		
+		cmp	bh, 'a'
+		jb	.b1_nc
+		cmp	bh, 'z'
+		ja	.b1_ch
+		sub	bh, 20h
+.b1_ch:		cmp	bh, 'à'
+		jb	.b1_nc
+		cmp	bh, 'ÿ'
+		jae	.b1_nc
+		sub	bh, 20h
+.b1_nc:		cmp	ch, 'a'
+		jb	.c1_nc
+		cmp	ch, 'z'
+		ja	.c1_ch
+		sub	ch, 20h
+.c1_ch:		cmp	ch, 'à'
+		jb	.c1_nc
+		cmp	ch, 'ÿ'
+		jae	.c1_nc
+		sub	ch, 20h
+.c1_nc:
+		cmp	bh, ch
+		je	.rotate
+
+.exit_cl:	movzx	eax, cl
+		xor	ecx, ecx
+		jz	.exit
+.exit_bl:	movzx	eax, bl
+		jmp	.exit
+.exit_bh:	movzx	eax, bh
+		jmp	.exit
+.exit_ch:	movzx	eax, ch
+.exit:
+		pop	ecx
+		pop	esi
+		pop	edi
+		pop	ebx
+		ret
+
+.rotate:	ror	ebx, 10h
+		ror	ecx, 10h
+
+		test	bl, bl		; byte 2
+		jz	.exit_cl
+		test	cl, cl
+		jz	.exit_bl
+
+		cmp	bl, 'a'
+		jb	.b2_nc
+		cmp	bl, 'z'
+		ja	.b2_ch
+		sub	bl, 20h
+.b2_ch:		cmp	bl, 'à'
+		jb	.b2_nc
+		cmp	bl, 'ÿ'
+		jae	.b2_nc
+		sub	bl, 20h
+.b2_nc:		cmp	cl, 'a'
+		jb	.c2_nc
+		cmp	cl, 'z'
+		ja	.c2_ch
+		sub	cl, 20h
+.c2_ch:		cmp	cl, 'à'
+		jb	.c2_nc
+		cmp	cl, 'ÿ'
+		jae	.c2_nc
+		sub	cl, 20h
+.c2_nc:
+		cmp	bl, cl
+		jne	.exit_bl
+
+		test	bh, bh		; byte 3
+		jz	.exit_ch
+		test	ch, ch
+		jz	.exit_bh
+		
+		cmp	bh, 'a'
+		jb	.b3_nc
+		cmp	bh, 'z'
+		ja	.b3_ch
+		sub	bh, 20h
+.b3_ch:		cmp	bh, 'à'
+		jb	.b3_nc
+		cmp	bh, 'ÿ'
+		jae	.b3_nc
+		sub	bh, 20h
+.b3_nc:		cmp	ch, 'a'
+		jb	.c3_nc
+		cmp	ch, 'z'
+		ja	.c3_ch
+		sub	ch, 20h
+.c3_ch:		cmp	ch, 'à'
+		jb	.c3_nc
+		cmp	ch, 'ÿ'
+		jae	.c3_nc
+		sub	ch, 20h
+.c3_nc:
+		cmp	bh, ch
+		jne	.exit_bh
+
+		add	esi, 04h
+		add	edi, 04h
+		jmp	.loop
diff -uNrd ircd-hybrid-6.0/src/i386/irclen.asm ircd-pi1.0a/src/i386/irclen.asm
--- ircd-hybrid-6.0/src/i386/irclen.asm	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/i386/irclen.asm	Fri May 10 23:49:07 2002
@@ -0,0 +1,67 @@
+; IRC - Internet Relay Chat, src/s_serv.c
+; Copyright (C) 1990 Jarkko Oikarinen and
+;                    University of Oulu, Computing Center
+;
+; See file AUTHORS in IRC package for additional names of
+; the programmers.
+;
+; 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: irclen.asm,v 1.2 2002/05/11 03:49:07 smoli Exp $
+;
+; speed gain was 50%, compared to noarch on i686-pc-linux-gnu, athlon CPU
+;
+		global	irclen
+
+[segment .text]
+
+irclen:		push	esi
+		push	ecx
+
+		xor	ecx, ecx
+		mov	esi, [esp + 0Ch]
+		test	esi, 00000003h
+		jz	.loop
+		
+.align:		test	byte [esi], 0xff
+		jz	.exit
+		inc	esi
+		inc	ecx
+		test	esi, 00000003h
+		jnz	.align
+
+.loop:		lodsd
+		test	al, al
+		jz	.exit
+		inc	ecx
+		test	ah, ah
+		jz	.exit
+		inc	ecx
+
+		ror	eax, 10h
+
+		test	al, al
+		jz	.exit
+		inc	ecx
+		test	ah, ah
+		jz	.exit
+		inc	ecx
+
+		jmp	.loop
+
+.exit:		pop	eax
+		xchg	eax, ecx
+                pop	esi
+                ret
diff -uNrd ircd-hybrid-6.0/src/i386/ircncmp.asm ircd-pi1.0a/src/i386/ircncmp.asm
--- ircd-hybrid-6.0/src/i386/ircncmp.asm	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/i386/ircncmp.asm	Fri May 10 23:49:07 2002
@@ -0,0 +1,197 @@
+; IRC - Internet Relay Chat, src/i386/ircncmp.asm
+; Copyright (C) 1990 Jarkko Oikarinen and
+;                    University of Oulu, Computing Center
+;
+; See file AUTHORS in IRC package for additional names of
+; the programmers.
+;
+; 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: ircncmp.asm,v 1.3 2002/05/11 03:49:07 smoli Exp $
+
+		global	ircncmp
+
+[segment .text]
+
+ircncmp:	push	ebx
+		push	edi
+		push	esi
+		push	ecx
+		mov	esi, [esp + 14h]
+		mov	edi, [esp + 18h]
+		mov	eax, [esp + 1Ch]
+		test	eax, eax
+		jz	.exit_zero
+		cmp	esi, edi
+		jne	.loop
+		xor	eax, eax
+.exit_zero:	pop	ecx
+		pop	esi
+		pop	edi
+		pop	ebx
+		ret
+
+.loop:		mov	ebx, [esi]
+		mov	ecx, [edi]
+
+		test	bl, bl		; byte 0
+		jz	.exit_cl
+		test	cl, cl
+		jz	.exit_bl
+
+		cmp	bl, 'a'
+		jb	.b0_nc
+		cmp	bl, 'z'
+		ja	.b0_ch
+		sub	bl, 20h
+.b0_ch:		cmp	bl, 'à'
+		jb	.b0_nc
+		cmp	bl, 'ÿ'
+		jae	.b0_nc
+		sub	bl, 20h
+.b0_nc:		cmp	cl, 'a'
+		jb	.c0_nc
+		cmp	cl, 'z'
+		ja	.c0_ch
+		sub	cl, 20h
+.c0_ch:		cmp	cl, 'à'
+		jb	.c0_nc
+		cmp	cl, 'ÿ'
+		jae	.c0_nc
+		sub	cl, 20h
+.c0_nc:
+		cmp	bl, cl
+		jne	.exit_bl
+
+		dec	eax
+		jnz	.continue
+		jz	.exit
+
+.exit_cl:	movzx	eax, cl
+		jmp	.exit
+.exit_bl:	movzx	eax, bl
+.exit:		pop	ecx
+		pop	esi
+		pop	edi
+		pop	ebx
+		ret
+
+.continue:	test	bh, bh		; byte 1
+		jz	.exit_ch
+		test	ch, ch
+		jz	.exit_bh
+		
+		cmp	bh, 'a'
+		jb	.b1_nc
+		cmp	bh, 'z'
+		ja	.b1_ch
+		sub	bh, 20h
+.b1_ch:		cmp	bh, 'à'
+		jb	.b1_nc
+		cmp	bh, 'ÿ'
+		jae	.b1_nc
+		sub	bh, 20h
+.b1_nc:		cmp	ch, 'a'
+		jb	.c1_nc
+		cmp	ch, 'z'
+		ja	.c1_ch
+		sub	ch, 20h
+.c1_ch:		cmp	ch, 'à'
+		jb	.c1_nc
+		cmp	ch, 'ÿ'
+		jae	.c1_nc
+		sub	ch, 20h
+.c1_nc:
+		cmp	bh, ch
+		je	.rotate
+
+.exit_bh:	movzx	eax, bh
+		jmp	.exit
+.exit_ch:	movzx	eax, ch
+		jmp	.exit
+
+.rotate:	dec	eax
+		jz	.exit
+
+		ror	ebx, 10h
+		ror	ecx, 10h
+
+		test	bl, bl		; byte 2
+		jz	.exit_cl
+		test	cl, cl
+		jz	.exit_bl
+
+		cmp	bl, 'a'
+		jb	.b2_nc
+		cmp	bl, 'z'
+		ja	.b2_ch
+		sub	bl, 20h
+.b2_ch:		cmp	bl, 'à'
+		jb	.b2_nc
+		cmp	bl, 'ÿ'
+		jae	.b2_nc
+		sub	bl, 20h
+.b2_nc:		cmp	cl, 'a'
+		jb	.c2_nc
+		cmp	cl, 'z'
+		ja	.c2_ch
+		sub	cl, 20h
+.c2_ch:		cmp	cl, 'à'
+		jb	.c2_nc
+		cmp	cl, 'ÿ'
+		jae	.c2_nc
+		sub	cl, 20h
+.c2_nc:
+		cmp	bl, cl
+		jne	.exit_bl
+
+		dec	eax
+		jz	.exit
+
+		test	bh, bh		; byte 3
+		jz	.exit_ch
+		test	ch, ch
+		jz	.exit_bh
+		
+		cmp	bh, 'a'
+		jb	.b3_nc
+		cmp	bh, 'z'
+		ja	.b3_ch
+		sub	bh, 20h
+.b3_ch:		cmp	bh, 'à'
+		jb	.b3_nc
+		cmp	bh, 'ÿ'
+		jae	.b3_nc
+		sub	bh, 20h
+.b3_nc:		cmp	ch, 'a'
+		jb	.c3_nc
+		cmp	ch, 'z'
+		ja	.c3_ch
+		sub	ch, 20h
+.c3_ch:		cmp	ch, 'à'
+		jb	.c3_nc
+		cmp	ch, 'ÿ'
+		jae	.c3_nc
+		sub	ch, 20h
+.c3_nc:
+		cmp	bh, ch
+		jne	.exit_bh
+
+		dec	eax
+		jz	.exit
+
+		add	esi, 04h
+		add	edi, 04h
+		jmp	.loop
diff -uNrd ircd-hybrid-6.0/src/irc_string.c ircd-pi1.0a/src/irc_string.c
--- ircd-hybrid-6.0/src/irc_string.c	Wed Aug  9 18:50:25 2000
+++ ircd-pi1.0a/src/irc_string.c	Fri Nov  2 19:23:29 2001
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: irc_string.c,v 1.9 2000/08/09 22:50:25 lusky Exp $
+ *  $Id: irc_string.c,v 1.1.1.1 2001/11/03 00:23:29 shifty Exp $
  */
 #include "irc_string.h"
 #include "list.h"
diff -uNrd ircd-hybrid-6.0/src/ircd.c ircd-pi1.0a/src/ircd.c
--- ircd-hybrid-6.0/src/ircd.c	Sat Dec 30 19:12:00 2000
+++ ircd-pi1.0a/src/ircd.c	Tue May 21 22:14:29 2002
@@ -17,16 +17,21 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd.c,v 1.137 2000/12/31 00:12:00 lusky Exp $
+ * $Id: ircd.c,v 1.10 2002/05/22 02:14:29 smoli Exp $
  */
 #include "ircd.h"
 #include "channel.h"
 #include "class.h"
 #include "client.h"
 #include "common.h"
+#ifdef HAVE_SSL
+#include "ssl.h"
+#endif
+#include "config.h"
 #include "dline_conf.h"
 #include "fdlist.h"
 #include "hash.h"
+#include "listener.h"
 #include "irc_string.h"
 #include "ircd_signal.h"
 #include "list.h"
@@ -55,14 +60,18 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <errno.h>
 #include <time.h>
 #include <pwd.h>
+#include <grp.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
 
 #if defined(HAVE_GETOPT_H)
 #include <getopt.h>
@@ -148,6 +157,12 @@
 int     debuglevel = -1;        /* Server debug level */
 char*   debugmode  = "";        /*  -"-    -"-   -"-  */
 
+#ifdef BACKUP
+int     backup_mode = 0;
+int     main_retry = 0;
+int     backup_retry = 0;
+#endif /* BACKUP */
+
 
 int     rehashed = YES;
 int     dline_in_progress = NO; /* killing off matching D lines ? */
@@ -161,13 +176,20 @@
 /* Changed by Taner Halicioglu (taner@CERF.NET) */
 
 #define LOADCFREQ 5     /* every 5s */
-#define LOADRECV 40     /* 40k/s */
+#define LOADRECV 20     /* 40k/s */
 
 int    LRV = LOADRECV;
 time_t LCF = LOADCFREQ;
 float currlife = 0.0;
 
 
+struct Class* cltmp;
+
+#define INIT_OK   1
+#define INIT_FAIL 0
+
+static int screen_width = 80;
+
 /*
  * get_vm_top - get the operating systems notion of the resident set size
  */
@@ -196,17 +218,62 @@
 }
 
 /*
+ * get terminal screen width
+ */
+int get_screenwidth()
+{
+  struct winsize size;
+
+  if(ioctl(STDOUT_FILENO, TIOCGWINSZ, &size) < 0)
+    return 0;
+
+  return size.ws_col;
+}
+
+void msg_init(char *format, ...)
+{
+  va_list args;
+  char buffer1[512];
+  char buffer2[512];
+  
+  va_start(args, format);
+  vsprintf(buffer1, format, args);
+  sprintf(buffer2, "%-511s", buffer1);
+  
+  if(screen_width > 10)
+    buffer2[screen_width - 10] = '\0';
+  else
+    buffer2[0] = '\0';
+  
+  fprintf(stderr, "%s", buffer2);
+  fflush(stderr);
+  
+  va_end(args);  
+}
+
+void msg_init_stat(int status)
+{
+  if(status)
+    fprintf(stderr, "  (\033[1;34mok\033[0;37m)\n");
+  else
+    {
+      fprintf(stderr, "(\033[1;31mfailed\033[0;37m)\nconsult " DPATH LPATH " for details\n");
+      exit(-1);
+    }
+}
+
+
+/*
  * init_sys
  */
-static void init_sys(int boot_daemon)
+static void init_sys()
 {
 #ifdef RLIMIT_FD_MAX
   struct rlimit limit;
 
-  if (!getrlimit(RLIMIT_FD_MAX, &limit))
+  if(!getrlimit(RLIMIT_FD_MAX, &limit))
     {
-
-      if (limit.rlim_max < MAXCONNECTIONS)
+      if(limit.rlim_max < MAXCONNECTIONS)
         {
           fprintf(stderr,"ircd fd table too big\n");
           fprintf(stderr,"Hard Limit: %ld IRC max: %d\n",
@@ -238,31 +305,36 @@
       printf("Value of NOFILE is %d\n", NOFILE);
     }
 #endif        /* RLIMIT_FD_MAX */
+}
 
-  /* This is needed to not fork if -s is on */
-  if (boot_daemon)
+static void init_daemon()
+{
+  int pid;
+  
+  msg_init("detaching");
+  
+  if((pid = fork()) < 0)
     {
-      int pid;
-      if((pid = fork()) < 0)
+      msg_init_stat(INIT_FAIL);
+      exit(0);
+    }
+  else if(pid > 0)
+    {
+      fprintf(stderr, " (\033[1;32m%u\033[0m)\n", pid);
+      exit(0);
+    }
+#ifdef TIOCNOTTY
+    { /* scope */
+      int fd;
+      if((fd = open("/dev/tty", O_RDWR)) >= 0)
         {
-          fprintf(stderr, "Couldn't fork: %s\n", strerror(errno));
-          exit(0);
+          ioctl(fd, TIOCNOTTY, NULL);
+          close(fd);
         }
-      else if (pid > 0)
-        exit(0);
-#ifdef TIOCNOTTY
-      { /* scope */
-        int fd;
-        if ((fd = open("/dev/tty", O_RDWR)) >= 0)
-          {
-            ioctl(fd, TIOCNOTTY, NULL);
-            close(fd);
-          }
-      }
-#endif
-     setsid();
     }
-  close_all_connections();
+#endif
+  setsid();
+/*  close_all_connections(); damn, ommiting this could be dangerous */
 }
 
 /*
@@ -327,11 +399,7 @@
       break;
     case 'v':
       printf("ircd %s\n\tzlib %s\n\tircd_dir: %s\n", version,
-#ifndef ZIP_LINKS
-             "not used",
-#else
-              zlib_version,
-#endif
+              ZLIB_VERSION,
               ConfigFileEntry.dpath);
       exit(0);
       break;   /* NOT REACHED */
@@ -628,7 +696,7 @@
   if ((fd = open(PPATH, O_CREAT|O_WRONLY, 0600))>=0)
     {
       ircsprintf(buff,"%d\n", (int)getpid());
-      if (write(fd, buff, strlen(buff)) == -1)
+      if (write(fd, buff, irclen(buff)) == -1)
         log(L_ERROR,"Error writing to pid file %s", PPATH);
       close(fd);
       return;
@@ -640,19 +708,53 @@
 
 int main(int argc, char *argv[])
 {
-  uid_t       uid;
-  uid_t       euid;
-  time_t      delay = 0;
-  aConfItem*  aconf;
+  uid_t            cuid, uid;
+  gid_t            gid;
+  time_t           delay = 0;
+  aConfItem       *aconf;
+  struct passwd   *pwd;
+  struct group    *grp;
 
+  cuid = getuid();
+  
+  if(!(pwd = getpwnam(IRCDUSER)))
+    {
+      fprintf(stderr, "ERROR: Invalid user " IRCDUSER);
+      exit(errno);
+    }
+  grp = getgrgid(pwd->pw_gid);
+  uid = pwd->pw_uid;
+  gid = grp->gr_gid;
+  
+  screen_width = get_screenwidth();
+  
   /*
    * save server boot time right away, so getrusage works correctly
    */
-  if ((CurrentTime = time(0)) == -1)
+  if((CurrentTime = time(NULL)) == -1)
     {
       fprintf(stderr, "ERROR: Clock Failure: %s\n", strerror(errno));
       exit(errno);
     }
+
+  msg_init("entering server root");
+  if(chdir(DPATH))
+    {
+      msg_init_stat(INIT_FAIL);
+      exit(-1);
+    }
+  msg_init_stat(INIT_OK);
+
+  /* seed the random generator */
+  msg_init("seeding random number generator");
+  srand((int)CurrentTime);
+#ifdef HAVE_SSL
+  if(!ssl_seed_prng(RNPATH))
+    msg_init_stat(INIT_FAIL);
+  else
+#endif
+    msg_init_stat(INIT_OK);
+
   /* 
    * set initialVMTop before we allocate any memory
    */
@@ -678,14 +780,10 @@
  * criteria do not match the requirements of ircd 
  */
 #ifdef SETUID_ROOT
-  if (setuid(IRCD_UID) < 0)
+  if (setuid(0) < 0)
     exit(-1); /* blah.. this should be done better */
 #endif
 
-
-  uid = getuid();
-  euid = geteuid();
-
   ConfigFileEntry.dpath = DPATH;
 
   ConfigFileEntry.configfile = CPATH;   /* Server configuration file */
@@ -706,20 +804,6 @@
   ConfigFileEntry.glinefile = GLINEFILE;
 #endif
 
-#ifdef  CHROOTDIR
-  if (chdir(DPATH))
-    {
-      perror("chdir " DPATH );
-      exit(-1);
-    }
-
-  if (chroot(DPATH))
-    {
-      fprintf(stderr,"ERROR:  Cannot chdir/chroot\n");
-      exit(5);
-    }
-#endif /*CHROOTDIR*/
-
 #ifdef  ZIP_LINKS
   if (zlib_version[0] == '0')
     {
@@ -731,7 +815,7 @@
       fprintf(stderr, "incompatible zlib version\n");
       exit(1);
     }
-  if (strcmp(zlib_version, ZLIB_VERSION) != 0)
+  if (irccmp(zlib_version, ZLIB_VERSION) != 0)
     {
       fprintf(stderr, "warning: different zlib version\n");
     }
@@ -740,69 +824,16 @@
   myargv = argv;
   umask(077);                /* better safe than sorry --SRB */
 
-  setuid(uid);
   parse_command_line(argc, argv); 
 
-#ifndef CHROOT
-  if (chdir(ConfigFileEntry.dpath))
-    {
-      perror("chdir");
-      exit(-1);
-    }
-#endif
-
-#if !defined(IRC_UID)
-  if ((uid != euid) && !euid)
-    {
-      fprintf(stderr,
-              "ERROR: do not run ircd setuid root. " \
-              "Make it setuid a normal user.\n");
-      exit(-1);
-    }
-#endif
-
-#if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID))
-
-  setuid(euid);
-
-  if (getuid() == 0)
-    {
-# if defined(IRC_UID) && defined(IRC_GID)
-
-      /* run as a specified user */
-      fprintf(stderr,"WARNING: running ircd with uid = %d\n", IRC_UID);
-      fprintf(stderr,"         changing to gid %d.\n",IRC_GID);
-
-      /* setgid/setuid previous usage noted unsafe by ficus@neptho.net
-       */
-
-      if (setgid(IRC_GID) < 0)
-        {
-          fprintf(stderr,"ERROR: can't setgid(%d)\n", IRC_GID);
-          exit(-1);
-        }
-
-      if(setuid(IRC_UID) < 0)
-        {
-          fprintf(stderr,"ERROR: can't setuid(%d)\n", IRC_UID);
-          exit(-1);
-        }
-
-#else
-      /* check for setuid root as usual */
-      fprintf(stderr,
-              "ERROR: do not run ircd setuid root. " \
-              "Make it setuid a normal user.\n");
-      return -1;
-# endif 
-            } 
-#endif /*CHROOTDIR/UID/GID*/
-
+  msg_init("initializing ircd subsystem");
   setup_signals();
 
-  init_sys(bootDaemon);
+  init_sys();
   init_log(logFileName);
+  msg_init_stat(INIT_OK);
 
+  msg_init("initializing internal structures");
   initialize_message_files();
 
   dbuf_init();  /* set up some dbuf stuff to control paging */
@@ -819,8 +850,52 @@
 
   fdlist_init();
   init_netio();
+  msg_init_stat(INIT_OK);
 
-  read_conf_files(YES);         /* cold start init conf files */
+  msg_init("reading config file");
+  if(read_conf_files(YES))      /* cold start init conf files */
+    {
+      log(L_ERROR, "starting under uid %u, but maybe listeners "
+                   "below 1024 or port already bound", uid);
+      msg_init_stat(INIT_FAIL);
+    }
+  else
+    msg_init_stat(INIT_OK);
+
+#ifdef HAVE_SSL
+  msg_init("initializing secure socket layer");
+  if(!(ssl_capable = !ssl_init()))
+    msg_init_stat(INIT_FAIL);
+  else
+    msg_init_stat(INIT_OK);
+#endif
+
+#ifdef CHROOTDIR
+  msg_init("entering chroot environment");
+  if(chroot(DPATH))
+    {
+      log(L_ERROR, "Could not chroot: %s", strerror(errno));
+      msg_init_stat(INIT_FAIL);
+    }
+  msg_init_stat(INIT_OK);
+#endif /* CHROOTDIR */
+  
+  if(cuid == 0)
+    {
+      msg_init("setuid/setgid to %s/%s", pwd->pw_name, grp->gr_name);
+      if(setgid(gid) < 0 || setuid(uid) < 0)
+        {          
+          msg_init_stat(INIT_FAIL);
+          return -1;
+        }      
+      else
+        msg_init_stat(INIT_OK);
+    }
+  else if(cuid != uid)
+    log(L_WARN, "Current UID %u inappropriate", cuid);
+  
+  if(bootDaemon)
+    init_daemon();  
 
   aconf = find_me();
   if (EmptyString(me.name))
@@ -836,6 +911,11 @@
   me.lasttime = me.since = me.firsttime = CurrentTime;
   add_to_client_hash_table(me.name, &me);
 
+#ifdef HAVE_SSL
+  SetSSL(&me);
+  SetSSLServ(&me);
+#endif  
+  
   check_class();
   write_pidfile();
 
diff -uNrd ircd-hybrid-6.0/src/ircd_signal.c ircd-pi1.0a/src/ircd_signal.c
--- ircd-hybrid-6.0/src/ircd_signal.c	Sat Jul 31 04:22:58 1999
+++ ircd-pi1.0a/src/ircd_signal.c	Tue May 21 22:14:29 2002
@@ -17,14 +17,16 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_signal.c,v 1.2 1999/07/31 08:22:58 tomh Exp $
+ * $Id: ircd_signal.c,v 1.5 2002/05/22 02:14:29 smoli Exp $
  */
+#include "config.h"
 #include "ircd_signal.h"
 #include "ircd.h"         /* dorehash */
 #include "restart.h"      /* server_reboot */
 #include "s_log.h"
 #include "send.h"         /* flush_connections */
 
+#include <stdlib.h>
 #include <signal.h>
 
 /*
@@ -95,7 +97,11 @@
   sigaddset(&act.sa_mask, SIGHUP);
   sigaction(SIGHUP, &act, 0);
 
+#ifdef CHROOTDIR
+  act.sa_handler = sigterm_handler;
+#else
   act.sa_handler = sigint_handler;
+#endif
   sigaddset(&act.sa_mask, SIGINT);
   sigaction(SIGINT, &act, 0);
 
diff -uNrd ircd-hybrid-6.0/src/list.c ircd-pi1.0a/src/list.c
--- ircd-hybrid-6.0/src/list.c	Sat Nov 18 14:11:11 2000
+++ ircd-pi1.0a/src/list.c	Fri Nov  2 19:23:30 2001
@@ -19,7 +19,7 @@
  *
  *  (C) 1988 University of Oulu, Computing Center and Jarkko Oikarinen
  *
- * $Id: list.c,v 1.41 2000/11/18 19:11:11 lusky Exp $
+ * $Id: list.c,v 1.1.1.1 2001/11/03 00:23:30 shifty Exp $
  */
 #include "struct.h"
 #include "blalloc.h"
diff -uNrd ircd-hybrid-6.0/src/listener.c ircd-pi1.0a/src/listener.c
--- ircd-hybrid-6.0/src/listener.c	Sat Oct  9 23:43:01 1999
+++ ircd-pi1.0a/src/listener.c	Tue May 21 22:14:29 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: listener.c,v 1.18 1999/10/10 03:43:01 lusky Exp $
+ *  $Id: listener.c,v 1.5 2002/05/22 02:14:29 smoli Exp $
  */
 #include "listener.h"
 #include "client.h"
@@ -29,6 +29,7 @@
 #include "s_stats.h"
 #include "send.h"
 #include "struct.h"
+#include "config.h"
 
 #include <assert.h>
 #include <string.h>
@@ -57,7 +58,10 @@
   listener->fd          = -1;
   listener->port        = port;
   listener->addr.s_addr = addr.s_addr;
-
+#ifdef HAVE_SSL
+  listener->is_ssl      = 0;
+#endif
+  
 #ifdef NULL_POINTER_NOT_ZERO
   listener->next = NULL;
   listener->conf = NULL;
@@ -218,7 +222,12 @@
  * vhost_ip - if non-null must contain a valid IP address string in
  * the format "255.255.255.255"
  */
-void add_listener(int port, const char* vhost_ip) 
+
+#ifdef HAVE_SSL
+int add_listener(int port, const char* vhost_ip, int is_ssl)
+#else
+int add_listener(int port, const char* vhost_ip)
+#endif
 {
   struct Listener* listener;
   struct in_addr   vaddr;
@@ -227,30 +236,37 @@
    * if no port in conf line, don't bother
    */
   if (0 == port)
-    return;
+    return 0;
 
   vaddr.s_addr = INADDR_ANY;
 
   if (vhost_ip) {
     vaddr.s_addr = inet_addr(vhost_ip);
     if (INADDR_NONE == vaddr.s_addr)
-      return;
+      return 0;
   }
 
   if ((listener = find_listener(port, vaddr))) {
     listener->active = 1;
-    return;
+    return 0;
   }
 
   listener = make_listener(port, vaddr);
 
-  if (inetport(listener)) {
+#ifdef HAVE_SSL
+  listener->is_ssl = is_ssl;
+#endif
+  
+  if(inetport(listener)) {
     listener->active = 1;
     listener->next   = ListenerPollList;
-    ListenerPollList = listener; 
+    ListenerPollList = listener;
+    return 0;
   }
   else
     free_listener(listener);
+  
+  return 1;
 }
 
 void mark_listeners_closing(void)
diff -uNrd ircd-hybrid-6.0/src/m_admin.c ircd-pi1.0a/src/m_admin.c
--- ircd-hybrid-6.0/src/m_admin.c	Fri Nov 10 21:30:23 2000
+++ ircd-pi1.0a/src/m_admin.c	Fri Nov  2 19:23:30 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_admin.c,v 1.2 2000/11/11 02:30:23 lusky Exp $
+ *   $Id: m_admin.c,v 1.1.1.1 2001/11/03 00:23:30 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_away.c ircd-pi1.0a/src/m_away.c
--- ircd-hybrid-6.0/src/m_away.c	Fri Jul 30 02:40:13 1999
+++ ircd-pi1.0a/src/m_away.c	Fri May 10 23:49:04 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_away.c,v 1.2 1999/07/30 06:40:13 tomh Exp $
+ *   $Id: m_away.c,v 1.5 2002/05/11 03:49:04 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -30,6 +30,7 @@
 #include "send.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -143,7 +144,7 @@
 
   /* Marking as away */
   
-  if (strlen(awy2) > (size_t) TOPICLEN)
+  if (irclen(awy2) > (size_t) TOPICLEN)
     awy2[TOPICLEN] = '\0';
 /* some lamers scripts continually do a /away, hence making a lot of
    unnecessary traffic. *sigh* so... as comstud has done, I've
@@ -155,7 +156,7 @@
   if (away)
     MyFree(away);
 
-  away = (char *)MyMalloc(strlen(awy2)+1);
+  away = (char *)MyMalloc(irclen(awy2)+1);
   strcpy(away,awy2);
 
   sptr->user->away = away;
diff -uNrd ircd-hybrid-6.0/src/m_broadcast.c ircd-pi1.0a/src/m_broadcast.c
--- ircd-hybrid-6.0/src/m_broadcast.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/m_broadcast.c	Wed May 22 07:07:10 2002
@@ -0,0 +1,66 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, src/m_broadcast.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   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: m_broadcast.c,v 1.1 2002/05/22 11:07:10 smoli Exp $
+ */
+
+#include "client.h"
+#include "numeric.h"
+#include "ircd.h"
+#include "s_user.h"
+#include "send.h"
+
+#include <string.h>
+
+/*
+ * m_broadcast()
+ *
+ * parv[0] = sender prefix
+ * parv[1] = new hostname
+ *
+ */
+int m_broadcast(struct Client *cptr,
+                struct Client *sptr,
+                int parc,
+                char *parv[])
+{
+  if(MyConnect(sptr))
+    { 
+      if(!IsOper(sptr) && !IsServer(cptr))
+        {
+          sendto_one(sptr, form_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+          return 0;
+        }
+  
+      if(parc < 2)
+        {
+          sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+                     me.name, parv[0], "BROADCAST");
+          return 0;
+        }
+    }
+  
+  sendto_serv_butone(cptr, ":%s BROADCAST :%s", parv[0], parv[1]);
+  sendto_myclients(sptr, parv[1]);
+  
+  return 1;
+}
diff -uNrd ircd-hybrid-6.0/src/m_capab.c ircd-pi1.0a/src/m_capab.c
--- ircd-hybrid-6.0/src/m_capab.c	Wed Jul 28 02:57:56 1999
+++ ircd-pi1.0a/src/m_capab.c	Fri May 10 23:49:04 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_capab.c,v 1.1 1999/07/28 06:57:56 tomh Exp $
+ *   $Id: m_capab.c,v 1.5 2002/05/11 03:49:04 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -28,6 +28,7 @@
 #include "s_serv.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -97,19 +98,19 @@
   char* p;
   char* s;
 
-  if ((!IsUnknown(cptr) && !IsHandshake(cptr)) || parc < 2)
+  if((!IsUnknown(cptr) && !IsHandshake(cptr)) || parc < 2)
     return 0;
 
-  if (cptr->caps)
+  if(cptr->caps)
     return exit_client(cptr, cptr, cptr, "CAPAB received twice");
   else
     cptr->caps |= CAP_CAP;
 
-  for (s = strtoken(&p, parv[1], " "); s; s = strtoken(&p, NULL, " "))
+  for(s = strtoken(&p, parv[1], " "); s; s = strtoken(&p, NULL, " "))
     {
-      for (cap = captab; cap->name; cap++)
+      for(cap = captab; cap->name; cap++)
         {
-          if (0 == strcmp(cap->name, s))
+          if(!irccmp(cap->name, s))
             {
               cptr->caps |= cap->cap;
               break;
diff -uNrd ircd-hybrid-6.0/src/m_close.c ircd-pi1.0a/src/m_close.c
--- ircd-hybrid-6.0/src/m_close.c	Fri Jul 30 00:01:32 1999
+++ ircd-pi1.0a/src/m_close.c	Fri Nov  2 19:23:30 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_close.c,v 1.1 1999/07/30 04:01:32 tomh Exp $
+ *   $Id: m_close.c,v 1.1.1.1 2001/11/03 00:23:30 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_connect.c ircd-pi1.0a/src/m_connect.c
--- ircd-hybrid-6.0/src/m_connect.c	Tue Nov 21 01:49:29 2000
+++ ircd-pi1.0a/src/m_connect.c	Fri Nov  2 19:23:30 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_connect.c,v 1.5 2000/11/21 06:49:29 lusky Exp $
+ *   $Id: m_connect.c,v 1.1.1.1 2001/11/03 00:23:30 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_die.c ircd-pi1.0a/src/m_die.c
--- ircd-hybrid-6.0/src/m_die.c	Thu Jun  8 21:59:07 2000
+++ ircd-pi1.0a/src/m_die.c	Sun May  5 00:42:24 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_die.c,v 1.3 2000/06/09 01:59:07 lusky Exp $
+ *   $Id: m_die.c,v 1.4 2002/05/05 04:42:24 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -30,6 +30,8 @@
 #include "s_bsd.h"
 #include "s_log.h"
 #include "send.h"
+
+#include <stdlib.h>
 
 /*
  * m_functions execute protocol messages on this server:
diff -uNrd ircd-hybrid-6.0/src/m_error.c ircd-pi1.0a/src/m_error.c
--- ircd-hybrid-6.0/src/m_error.c	Sat Nov 18 14:11:12 2000
+++ ircd-pi1.0a/src/m_error.c	Fri Nov  2 19:23:30 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_error.c,v 1.3 2000/11/18 19:11:12 lusky Exp $
+ *   $Id: m_error.c,v 1.1.1.1 2001/11/03 00:23:30 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_gline.c ircd-pi1.0a/src/m_gline.c
--- ircd-hybrid-6.0/src/m_gline.c	Fri Dec  1 01:28:48 2000
+++ ircd-pi1.0a/src/m_gline.c	Tue May 14 00:03:35 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: m_gline.c,v 1.41 2000/12/01 06:28:48 lusky Exp $
+ *  $Id: m_gline.c,v 1.4 2002/05/14 04:03:35 smoli Exp $
  */
 #include "m_gline.h"
 #include "channel.h"
@@ -287,16 +287,7 @@
    log_gline_request(oper_name,oper_username,oper_host,oper_server,
                      user,host,reason);
 
-   sendto_realops("%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
-                  oper_name,
-                  oper_username,
-                  oper_host,
-                  oper_server,
-                  user,
-                  host,
-                  reason);
-
-  /* If at least 3 opers agree this user should be G lined then do it */
+  /* If at least 2 opers agree this user should be G lined then do it */
   if(majority_gline(sptr,
                     oper_name,
                     oper_username,
@@ -334,6 +325,16 @@
 
       return 0;
     }
+  else
+    sendto_realops("%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
+                   oper_name,
+                   oper_username,
+                   oper_host,
+                   oper_server,
+                   user,
+                   host,
+                   reason);
+
 #endif  
   return 0;
 }
@@ -376,7 +377,7 @@
            oper_nick,oper_user,oper_host,oper_server,
            timebuffer);
 
-  if (write(out, buffer, strlen(buffer)) <= 0)
+  if (write(out, buffer, irclen(buffer)) <= 0)
     {
       sendto_realops("*** Problem writing to %s",filenamebuf);
     }
@@ -434,7 +435,7 @@
   if (safe_write(sptr,filenamebuf,out,buffer))
     return;
 
-  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
+/*  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
                    gline_pending_ptr->oper_nick2,
                    gline_pending_ptr->oper_user2,
                    gline_pending_ptr->oper_host2,
@@ -443,7 +444,7 @@
                    (gline_pending_ptr->reason2):"No reason");
 
   if (safe_write(sptr, filenamebuf, out, buffer))
-    return;
+    return;*/
 
   ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
                    oper_nick,
@@ -613,7 +614,7 @@
                      gline_pending_ptr->host,
                      gline_pending_ptr->reason1);
 
-          if(gline_pending_ptr->oper_nick2[0])
+/*          if(gline_pending_ptr->oper_nick2[0])
             {
               tmptr = localtime(&gline_pending_ptr->time_request2);
               strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
@@ -628,7 +629,7 @@
                          gline_pending_ptr->user,
                          gline_pending_ptr->host,
                          gline_pending_ptr->reason2);
-            }
+            }*/
           gline_pending_ptr = gline_pending_ptr->next;
         }
       sendto_one(sptr,":%s NOTICE %s :End of Pending G-lines", me.name,
@@ -719,7 +720,7 @@
           tmp_pending_ptr = gline_pending_ptr;
           gline_pending_ptr = gline_pending_ptr->next;
           MyFree(tmp_pending_ptr->reason1);
-          MyFree(tmp_pending_ptr->reason2);
+//          MyFree(tmp_pending_ptr->reason2);
           MyFree(tmp_pending_ptr);
         }
       else
@@ -757,7 +758,7 @@
   strncpy_irc(pending->user, user, USERLEN);
   strncpy_irc(pending->host, host, HOSTLEN);
   DupString(pending->reason1, reason);
-  pending->reason2 = NULL;
+//  pending->reason2 = NULL;
 
   pending->last_gline_time = CurrentTime;
   pending->time_request1 = CurrentTime;
@@ -772,11 +773,11 @@
  * inputs       - oper_nick, oper_user, oper_host, oper_server
  *                user,host reason
  *
- * output       - YES if there are 3 different opers on 3 different servers
+ * output       - YES if there are 2 different opers on 2 different servers
  *                agreeing to this gline, NO if there are not.
  * Side effects -
  *      See if there is a majority agreement on a GLINE on the given user
- *      There must be at least 3 different opers agreeing on this GLINE
+ *      There must be at least 2 different opers agreeing on this GLINE
  *
  *      Expire old entries.
  */
@@ -816,20 +817,20 @@
               /* This oper or server has already "voted" */
               sendto_realops("oper or server has already voted");
               return NO;
-            }
+/*            }
 
           if(gline_pending_ptr->oper_user2[0] != '\0')
             {
-              /* if two other opers on two different servers have voted yes */
+              // if two other opers on two different servers have voted yes 
 
               if(((irccmp(gline_pending_ptr->oper_user2,oper_user)==0) &&
                   (irccmp(gline_pending_ptr->oper_host2,oper_host)==0)) ||
                   (irccmp(gline_pending_ptr->oper_server2,oper_server)==0))
                 {
-                  /* This oper or server has already "voted" */
+                  // This oper or server has already "voted" 
                   sendto_realops("oper or server has already voted");
                   return NO;
-                }
+*/                }
 
               if(find_is_glined(host, user))
                 return NO;
@@ -844,16 +845,16 @@
             }
           else
             {
-              strncpy_irc(gline_pending_ptr->oper_nick2, oper_nick, NICKLEN);
+/*              strncpy_irc(gline_pending_ptr->oper_nick2, oper_nick, NICKLEN);
               strncpy_irc(gline_pending_ptr->oper_user2, oper_user, USERLEN);
               strncpy_irc(gline_pending_ptr->oper_host2, oper_host, HOSTLEN);
               DupString(gline_pending_ptr->reason2, reason);
-              gline_pending_ptr->oper_server2 = find_or_add(oper_server);
+              gline_pending_ptr->oper_server2 = find_or_add(oper_server); */
               gline_pending_ptr->last_gline_time = CurrentTime;
               gline_pending_ptr->time_request1 = CurrentTime;
               return NO;
             }
-        }
+//        }
     }
   /* Didn't find this user@host gline in pending gline list
    * so add it.
@@ -878,6 +879,64 @@
 {
   aconf->next = glines;
   glines = aconf;
+}
+
+/* remove_gline
+ *
+ * inputs       - user, host
+ * output       - YES if gline has been found and removed, else - NO
+ *
+ * Remove gline for given host and user from glines list.
+ *
+ * -decho
+ */
+
+int remove_gline_match(char *host, char *user)
+{
+
+  aConfItem *kill_list_ptr;
+  aConfItem *last_list_ptr;
+  aConfItem *tmp_list_ptr;
+  int iFound;
+
+  iFound = 0;
+
+  if(glines)
+    {
+      kill_list_ptr = last_list_ptr = glines;
+
+      while(kill_list_ptr)
+        {
+
+           if(
+               (strcasecmp(kill_list_ptr->host,host)==0) && (strcasecmp(kill_list_ptr->name,user )==0)
+             ) // match
+            {
+              if(glines == kill_list_ptr)
+                {
+                  glines = last_list_ptr = tmp_list_ptr =
+                    kill_list_ptr->next;
+                }
+              else
+                {
+                  /* its in the middle of the list, so link around it */
+                  tmp_list_ptr = last_list_ptr->next = kill_list_ptr->next;
+                }
+              free_conf(kill_list_ptr);
+              kill_list_ptr = tmp_list_ptr;
+              iFound = 1;
+            }
+           else {
+             last_list_ptr = kill_list_ptr;
+             kill_list_ptr = kill_list_ptr->next;
+           }
+        }
+    }
+
+  if( iFound )
+    return YES;
+  else
+    return NO;
 }
 
 #endif /* GLINES */
diff -uNrd ircd-hybrid-6.0/src/m_help.c ircd-pi1.0a/src/m_help.c
--- ircd-hybrid-6.0/src/m_help.c	Thu Jul 29 03:11:48 1999
+++ ircd-pi1.0a/src/m_help.c	Fri Nov  2 19:23:31 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_help.c,v 1.1 1999/07/29 07:11:48 tomh Exp $
+ *   $Id: m_help.c,v 1.1.1.1 2001/11/03 00:23:31 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_htm.c ircd-pi1.0a/src/m_htm.c
--- ircd-hybrid-6.0/src/m_htm.c	Fri Jul 30 02:40:14 1999
+++ ircd-pi1.0a/src/m_htm.c	Fri Nov  2 19:23:31 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_htm.c,v 1.1 1999/07/30 06:40:14 tomh Exp $
+ *   $Id: m_htm.c,v 1.1.1.1 2001/11/03 00:23:31 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_info.c ircd-pi1.0a/src/m_info.c
--- ircd-hybrid-6.0/src/m_info.c	Tue Nov 21 01:49:29 2000
+++ ircd-pi1.0a/src/m_info.c	Fri Nov  2 19:23:31 2001
@@ -1,7 +1,7 @@
 /*
  * m_info.c 
  *
- * $Id: m_info.c,v 1.38 2000/11/21 06:49:29 lusky Exp $
+ * $Id: m_info.c,v 1.1.1.1 2001/11/03 00:23:31 shifty Exp $
  */
 #define DEFINE_M_INFO_DATA
 #include "m_info.h"
@@ -15,6 +15,7 @@
 #include "s_user.h"
 #include "send.h"
 #include "struct.h"
+#include "s_conf.h"
 
 #include <time.h>
 #include <string.h>
@@ -100,7 +101,7 @@
     sendto_one(sptr, form_str(RPL_INFO), me.name, parv[0], "");
 
     sendto_one(sptr,
-      ":%s %d %s :Birth Date: %s, compile # %s",
+      ":%s %d %s :Birth Date: %s, compile #%s",
       me.name,
       RPL_INFO,
       parv[0],
@@ -114,7 +115,7 @@
       parv[0],
       myctime(me.firsttime));
 
-    sendto_one(sptr, form_str(RPL_ENDOFINFO), me.name, parv[0]);
+  sendto_one(sptr, form_str(RPL_ENDOFINFO), me.name, parv[0]);
   } /* if (hunt_server(cptr,sptr,":%s INFO :%s",1,parc,parv) == HUNTED_ISME) */
 
   return 0;
diff -uNrd ircd-hybrid-6.0/src/m_ison.c ircd-pi1.0a/src/m_ison.c
--- ircd-hybrid-6.0/src/m_ison.c	Thu Oct 14 02:14:43 1999
+++ ircd-pi1.0a/src/m_ison.c	Fri May 10 23:49:04 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_ison.c,v 1.4 1999/10/14 06:14:43 lusky Exp $
+ *   $Id: m_ison.c,v 1.2 2002/05/11 03:49:04 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -122,7 +122,7 @@
     }
 
   ircsprintf(buf, form_str(RPL_ISON), me.name, parv[0]);
-  len = strlen(buf);
+  len = irclen(buf);
   current_insert_point = buf + len;
 
   if (!IsOper(cptr))
@@ -138,7 +138,7 @@
         *end_of_current_nick = '\0';
       if ((acptr = find_person(current_nick, NULL)))
 	{
-	  len = strlen(acptr->name);
+	  len = irclen(acptr->name);
 	  if( (current_insert_point + (len + 5)) < (buf + sizeof(buf)) )
 	    {
 	      memcpy((void *)current_insert_point,
diff -uNrd ircd-hybrid-6.0/src/m_kill.c ircd-pi1.0a/src/m_kill.c
--- ircd-hybrid-6.0/src/m_kill.c	Tue Nov 21 01:49:29 2000
+++ ircd-pi1.0a/src/m_kill.c	Fri May 10 23:49:05 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_kill.c,v 1.7 2000/11/21 06:49:29 lusky Exp $
+ *   $Id: m_kill.c,v 1.2 2002/05/11 03:49:05 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -134,7 +134,7 @@
   if (IsAnOper(cptr))
     {
       if (!BadPtr(path))
-        if (strlen(path) > (size_t) KILLLEN)
+        if (irclen(path) > (size_t) KILLLEN)
           path[KILLLEN] = '\0';
     }
 
diff -uNrd ircd-hybrid-6.0/src/m_kline.c ircd-pi1.0a/src/m_kline.c
--- ircd-hybrid-6.0/src/m_kline.c	Tue Aug 22 01:03:59 2000
+++ ircd-pi1.0a/src/m_kline.c	Fri Nov  2 19:23:32 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_kline.c,v 1.55 2000/08/22 05:03:59 lusky Exp $
+ *   $Id: m_kline.c,v 1.1.1.1 2001/11/03 00:23:32 shifty Exp $
  */
 #include "m_kline.h"
 #include "channel.h"
diff -uNrd ircd-hybrid-6.0/src/m_links.c ircd-pi1.0a/src/m_links.c
--- ircd-hybrid-6.0/src/m_links.c	Sat Nov 25 01:01:01 2000
+++ ircd-pi1.0a/src/m_links.c	Tue May 14 00:03:35 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_links.c,v 1.6 2000/11/25 06:01:01 lusky Exp $
+ *   $Id: m_links.c,v 1.3 2002/05/14 04:03:35 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -29,6 +29,7 @@
 #include "numeric.h"
 #include "s_serv.h"
 #include "send.h"
+#include "config.h"
 
 #include <assert.h>
 #include <string.h>
@@ -182,8 +183,11 @@
         continue;
       if(IsAnOper(sptr))
          sendto_one(sptr, form_str(RPL_LINKS),
-                    me.name, parv[0], acptr->name, acptr->serv->up,
-                    acptr->hopcount, (acptr->info[0] ? acptr->info :
+                    me.name, parv[0], acptr->name, acptr->serv->up, acptr->hopcount,
+#ifdef HAVE_SSL
+                    (IsSSLServ(acptr) ? "S" : ""),
+#endif                   
+                    (acptr->info[0] ? acptr->info :
                                       "(Unknown Location)"));
       else
         {
@@ -201,6 +205,17 @@
           else
             p = "(Unknown Location)";
 
+#ifdef HAVE_SSL
+#ifdef SERVERHIDE
+          sendto_one(sptr, form_str(RPL_LINKS),
+                    me.name, parv[0], acptr->name, NETWORK_DESC,
+                     0, ((IsSSLUmode(sptr) || IsAnOper(sptr)) && IsSSLServ(acptr)) ? "S" : "", p);
+#else
+          sendto_one(sptr, form_str(RPL_LINKS),
+                    me.name, parv[0], acptr->name, acptr->serv->up,
+                     acptr->hopcount, ((IsSSLUmode(sptr) || IsAnOper(sptr)) && IsSSLServ(acptr)) ? "S" : "", p);
+#endif
+#else
 #ifdef SERVERHIDE
           sendto_one(sptr, form_str(RPL_LINKS),
                     me.name, parv[0], acptr->name, NETWORK_DESC,
@@ -209,6 +224,7 @@
           sendto_one(sptr, form_str(RPL_LINKS),
                     me.name, parv[0], acptr->name, acptr->serv->up,
                     acptr->hopcount, p);
+#endif
 #endif
         }
 
diff -uNrd ircd-hybrid-6.0/src/m_list.c ircd-pi1.0a/src/m_list.c
--- ircd-hybrid-6.0/src/m_list.c	Tue Nov 21 01:49:30 2000
+++ ircd-pi1.0a/src/m_list.c	Fri Nov  2 19:23:32 2001
@@ -3,7 +3,7 @@
  *   Copyright (C) 1990 Jarkko Oikarinen and
  *                      University of Oulu, Co Center
  *
- * $Id: m_list.c,v 1.3 2000/11/21 06:49:30 lusky Exp $ 
+ * $Id: m_list.c,v 1.1.1.1 2001/11/03 00:23:32 shifty Exp $ 
  *
  *   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
diff -uNrd ircd-hybrid-6.0/src/m_locops.c ircd-pi1.0a/src/m_locops.c
--- ircd-hybrid-6.0/src/m_locops.c	Mon Aug  9 22:46:24 1999
+++ ircd-pi1.0a/src/m_locops.c	Fri Nov  2 19:23:32 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_locops.c,v 1.2 1999/08/10 02:46:24 lusky Exp $
+ *   $Id: m_locops.c,v 1.1.1.1 2001/11/03 00:23:32 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_ltrace.c ircd-pi1.0a/src/m_ltrace.c
--- ircd-hybrid-6.0/src/m_ltrace.c	Fri Nov 24 13:51:17 2000
+++ ircd-pi1.0a/src/m_ltrace.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_ltrace.c,v 1.5 2000/11/24 18:51:17 lusky Exp $
+ *   $Id: m_ltrace.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "class.h"
diff -uNrd ircd-hybrid-6.0/src/m_lusers.c ircd-pi1.0a/src/m_lusers.c
--- ircd-hybrid-6.0/src/m_lusers.c	Thu Jul 29 03:11:48 1999
+++ ircd-pi1.0a/src/m_lusers.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_lusers.c,v 1.1 1999/07/29 07:11:48 tomh Exp $
+ *   $Id: m_lusers.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_message.c ircd-pi1.0a/src/m_message.c
--- ircd-hybrid-6.0/src/m_message.c	Sun Sep 10 04:42:49 2000
+++ ircd-pi1.0a/src/m_message.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_message.c,v 1.11 2000/09/10 08:42:49 lusky Exp $
+ *   $Id: m_message.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_mode.c ircd-pi1.0a/src/m_mode.c
--- ircd-hybrid-6.0/src/m_mode.c	Fri Jul 30 22:42:56 1999
+++ ircd-pi1.0a/src/m_mode.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_mode.c,v 1.1 1999/07/31 02:42:56 tomh Exp $
+ *   $Id: m_mode.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "channel.h"
diff -uNrd ircd-hybrid-6.0/src/m_oper.c ircd-pi1.0a/src/m_oper.c
--- ircd-hybrid-6.0/src/m_oper.c	Fri Dec  1 01:28:49 2000
+++ ircd-pi1.0a/src/m_oper.c	Tue May 21 22:14:29 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_oper.c,v 1.8 2000/12/01 06:28:49 lusky Exp $
+ *   $Id: m_oper.c,v 1.7 2002/05/22 02:14:29 smoli Exp $
  */
 
 #include "m_commands.h"
@@ -37,7 +37,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
-
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -174,7 +174,7 @@
 #endif  /* CRYPT_OPER_PASSWORD */
 
   if ((aconf->status & CONF_OPS) &&
-      0 == strcmp(encr, aconf->passwd) && !attach_conf(sptr, aconf))
+      !strcmp(encr, aconf->passwd) && !attach_conf(sptr, aconf))
     {
       int old = (sptr->umodes & ALL_UMODES);
       
@@ -200,7 +200,9 @@
               sptr->umodes |= ((int)aconf->hold & ALL_UMODES); 
               if( !IsSetOperN(sptr) )
                 sptr->umodes &= ~FLAGS_NCHANGE;
-              
+#ifdef ENFORCE
+              sptr->umodes &= ~FLAGS_ENFORCE;
+#endif /* ENFORCE */
               sendto_one(sptr, ":%s NOTICE %s :*** Oper flags set from conf",
                          me.name,parv[0]);
             }
@@ -261,14 +263,15 @@
            */
 
           if (IsPerson(sptr) &&
-              (logfile = open(FNAME_OPERLOG, O_WRONLY|O_APPEND)) != -1)
+              ((logfile = open(FNAME_OPERLOG, O_WRONLY|O_APPEND)) != -1 ||
+               (logfile = open(FNAME_OPERLOG, O_WRONLY|O_CREAT)) != -1))
             {
               /* (void)alarm(0); */
               ircsprintf(buf, "%s OPER (%s) by (%s!%s@%s)\n",
                                myctime(CurrentTime), name, 
                                parv[0], sptr->username,
                                sptr->host);
-              write(logfile, buf, strlen(buf));
+              write(logfile, buf, irclen(buf));
               close(logfile);
             }
         }
diff -uNrd ircd-hybrid-6.0/src/m_operwall.c ircd-pi1.0a/src/m_operwall.c
--- ircd-hybrid-6.0/src/m_operwall.c	Mon Aug  9 22:46:24 1999
+++ ircd-pi1.0a/src/m_operwall.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_operwall.c,v 1.2 1999/08/10 02:46:24 lusky Exp $
+ *   $Id: m_operwall.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_pass.c ircd-pi1.0a/src/m_pass.c
--- ircd-hybrid-6.0/src/m_pass.c	Wed Jul 28 03:49:36 1999
+++ ircd-pi1.0a/src/m_pass.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: m_pass.c,v 1.2 1999/07/28 07:49:36 tomh Exp $
+ *  $Id: m_pass.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"  /* m_pass prototype */
 #include "client.h"      /* client struct */
diff -uNrd ircd-hybrid-6.0/src/m_ping.c ircd-pi1.0a/src/m_ping.c
--- ircd-hybrid-6.0/src/m_ping.c	Thu Jul 29 23:25:51 1999
+++ ircd-pi1.0a/src/m_ping.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_ping.c,v 1.1 1999/07/30 03:25:51 db Exp $
+ *   $Id: m_ping.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_pong.c ircd-pi1.0a/src/m_pong.c
--- ircd-hybrid-6.0/src/m_pong.c	Fri Jun  9 22:45:36 2000
+++ ircd-pi1.0a/src/m_pong.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_pong.c,v 1.2 2000/06/10 02:45:36 lusky Exp $
+ *   $Id: m_pong.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_quit.c ircd-pi1.0a/src/m_quit.c
--- ircd-hybrid-6.0/src/m_quit.c	Fri Jul 30 20:23:46 1999
+++ ircd-pi1.0a/src/m_quit.c	Fri May 10 23:49:05 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_quit.c,v 1.1 1999/07/31 00:23:46 db Exp $
+ *   $Id: m_quit.c,v 1.5 2002/05/11 03:49:05 smoli Exp $
  */
 #include "m_commands.h"
 #include "client.h"
@@ -28,6 +28,9 @@
 #include "numeric.h"
 #include "s_serv.h"
 #include "send.h"
+#include "irc_string.h"
+
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -99,7 +102,7 @@
   char *comment = (parc > 1 && parv[1]) ? parv[1] : cptr->name;
 
   sptr->flags |= FLAGS_NORMALEX;
-  if (strlen(comment) > (size_t) TOPICLEN)
+  if (irclen(comment) > (size_t) TOPICLEN)
     comment[TOPICLEN] = '\0';
 
 #ifdef ANTI_SPAM_EXIT_MESSAGE
diff -uNrd ircd-hybrid-6.0/src/m_rehash.c ircd-pi1.0a/src/m_rehash.c
--- ircd-hybrid-6.0/src/m_rehash.c	Thu Dec 21 21:28:11 2000
+++ ircd-pi1.0a/src/m_rehash.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_rehash.c,v 1.7 2000/12/22 02:28:11 lusky Exp $
+ *   $Id: m_rehash.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_restart.c ircd-pi1.0a/src/m_restart.c
--- ircd-hybrid-6.0/src/m_restart.c	Thu Jun  8 21:59:07 2000
+++ ircd-pi1.0a/src/m_restart.c	Fri Nov  2 19:23:33 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_restart.c,v 1.3 2000/06/09 01:59:07 lusky Exp $
+ *   $Id: m_restart.c,v 1.1.1.1 2001/11/03 00:23:33 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_server.c ircd-pi1.0a/src/m_server.c
--- ircd-hybrid-6.0/src/m_server.c	Fri Nov 24 13:24:37 2000
+++ ircd-pi1.0a/src/m_server.c	Fri May 10 23:49:05 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_server.c,v 1.10 2000/11/24 18:24:37 lusky Exp $
+ *   $Id: m_server.c,v 1.7 2002/05/11 03:49:05 smoli Exp $
  */
 #include "m_commands.h"  /* m_server prototype */
 #include "client.h"      /* client struct */
@@ -36,9 +36,11 @@
 #include "scache.h"      /* find_or_add */
 #include "send.h"        /* sendto_one */
 #include "struct.h"      /* bleah */
+#include "config.h"
 
 #include <string.h>
 #include <stdlib.h>
+#include <time.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -114,7 +116,12 @@
   struct Client*   bcptr;
   struct ConfItem* aconf;
   int              hop;
-
+#ifdef HAVE_SSL
+  int              is_ssl = 0;
+#endif
+#ifdef BACKUP
+  int              main_reconn;
+#endif
   info[0] = '\0';
   /*  inpath = get_client_name(cptr,FALSE); */
   if (parc < 2 || *parv[1] == '\0')
@@ -127,6 +134,12 @@
   if (parc > 3 && atoi(parv[2]))
     {
       hop = atoi(parv[2]);
+
+#ifdef HAVE_SSL
+      if(irclen(parv[2]) && parv[2][irclen(parv[2]) - 1] == 'S')
+        is_ssl++;
+#endif      
+      
       strncpy_irc(info, parv[3], REALLEN);
       info[REALLEN] = '\0';
     }
@@ -137,7 +150,7 @@
        */
       strncpy_irc(info, parv[2], REALLEN);
       info[REALLEN] = '\0';
-      if ((parc > 3) && ((i = strlen(info)) < (REALLEN - 2)))
+      if ((parc > 3) && ((i = irclen(info)) < (REALLEN - 2)))
         {
           strcat(info, " ");
           strncat(info, parv[3], REALLEN - i - 2);
@@ -151,12 +164,12 @@
    * cleanup of host name, so a cleaned up hostname
    * can be returned as an error if necessary. - Dianora
    *
-   * yes, the if(strlen) below is really needed!! 
+   * yes, the if(irclen) below is really needed!! 
    */
-  if (strlen(host) > HOSTLEN)
+  if (irclen(host) > HOSTLEN)
     host[HOSTLEN] = '\0';
 
-  if (IsPerson(sptr))
+  if(IsPerson(sptr))
     {
       /*
        * a USER tries something fishy... ;-)
@@ -337,6 +350,14 @@
           return exit_client(cptr, cptr, cptr, "Too many servers");
         }
 
+#ifdef BACKUP
+      if(host && ((main_link = find_conf_main_link()) != NULL) &&
+        irccmp(main_link->host, host) == 0)
+        
+      if((main_reconn = backup_regain_link(cptr)))
+        return main_reconn;
+#endif /* BACKUP */
+
       acptr = make_client(cptr);
       make_server(acptr);
       acptr->hopcount = hop;
@@ -370,10 +391,12 @@
             }
           if (match(my_name_for_link(me.name, aconf), acptr->name))
             continue;
-
-          sendto_one(bcptr, ":%s SERVER %s %d :%s",
-                     parv[0], acptr->name, hop + 1, acptr->info);
-                         
+          
+#ifdef HAVE_SSL
+          sendto_one(bcptr, ":%s SERVER %s %d%s :%s",
+                     parv[0], acptr->name, hop + 1,
+                     (IsSSLServ(bcptr) && IsSSLServ(acptr)) ? "S" : "", acptr->info);
+#endif                         
         }
       
       sendto_realops_flags(FLAGS_EXTERNAL, "Server %s being introduced by %s",
@@ -415,5 +438,3 @@
               get_client_host(cptr));
   return exit_client(cptr, cptr, cptr, "No C/N conf lines");
 }
-
-
diff -uNrd ircd-hybrid-6.0/src/m_set.c ircd-pi1.0a/src/m_set.c
--- ircd-hybrid-6.0/src/m_set.c	Wed Oct 13 22:48:25 1999
+++ ircd-pi1.0a/src/m_set.c	Fri Nov  2 19:23:34 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_set.c,v 1.4 1999/10/14 02:48:25 lusky Exp $
+ *   $Id: m_set.c,v 1.1.1.1 2001/11/03 00:23:34 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_spoof.c ircd-pi1.0a/src/m_spoof.c
--- ircd-hybrid-6.0/src/m_spoof.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/m_spoof.c	Thu May 23 12:06:25 2002
@@ -0,0 +1,87 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, src/m_spoof.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers. 
+ *
+ *   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: m_spoof.c,v 1.4 2002/05/23 16:06:25 shifty Exp $
+ */
+
+#include "client.h"
+#include "numeric.h"
+#include "ircd.h"
+#include "s_user.h"
+#include "send.h"
+
+#include <string.h>
+
+/*
+ * m_spoof()
+ *
+ * parv[0] = sender prefix
+ * parv[1] = new hostname
+ *
+ */
+int     m_spoof(struct Client *cptr,
+                struct Client *sptr,
+                int parc,
+                char *parv[])
+{
+  if(MyConnect(sptr))
+    { 
+      if(!IsOper(sptr) && !IsServer(cptr))
+        {
+          sendto_one(sptr, form_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+          return 0;
+        }
+  
+      if(parc < 2)
+        {
+          sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+                     me.name, parv[0], "SPOOF");
+          return 0;
+        }
+  
+      if(sptr->user->spoofed)
+        {
+          sendto_one(sptr, ":%s NOTICE %s :You already spoofed your hostname.", me.name, parv[0]);
+          return 0;
+        }
+      
+      if(!valid_hostname(parv[1]))
+        {
+          sendto_one(sptr, ":%s NOTICE %s :'%s' is not a valid hostname", me.name, parv[0], parv[1]);
+          return 0;
+        }
+      
+    }
+  
+#ifdef SPOOF_NOTICE    
+  sendto_realops("Spoofing hostname '%s' for user %s [%s@%s]",
+                 parv[1], sptr->name, sptr->username, sptr->host);
+#endif  
+  
+  sendto_serv_butone(cptr, ":%s SPOOF :%s", parv[0], parv[1]);
+  
+  strncpy(sptr->host, parv[1], HOSTLEN);
+  sptr->host[HOSTLEN] = '\0';
+  sptr->user->spoofed++;
+  
+  return 1;
+}
diff -uNrd ircd-hybrid-6.0/src/m_squit.c ircd-pi1.0a/src/m_squit.c
--- ircd-hybrid-6.0/src/m_squit.c	Sat Jul 31 04:23:00 1999
+++ ircd-pi1.0a/src/m_squit.c	Fri Nov  2 19:23:34 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_squit.c,v 1.3 1999/07/31 08:23:00 tomh Exp $
+ *   $Id: m_squit.c,v 1.1.1.1 2001/11/03 00:23:34 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_stats.c ircd-pi1.0a/src/m_stats.c
--- ircd-hybrid-6.0/src/m_stats.c	Sat Dec 30 19:12:00 2000
+++ ircd-pi1.0a/src/m_stats.c	Wed May 22 12:19:42 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: m_stats.c,v 1.9 2000/12/31 00:12:00 lusky Exp $
+ *  $Id: m_stats.c,v 1.2 2002/05/22 16:19:42 smoli Exp $
  */
 #include "m_commands.h"  /* m_pass prototype */
 #include "class.h"       /* report_classes */
@@ -43,6 +43,7 @@
 #include "s_serv.h"      /* hunt_server, show_servers */
 #include "s_stats.h"     /* tstats */
 #include "s_user.h"      /* show_opers */
+#include "ssl.h"
 
 #include <string.h>
 
@@ -329,6 +330,59 @@
       valid_stats++;
       break;
 
+#ifdef HAVE_SSL
+    case 'J' : case 'j' :
+      if(!IsAnOper(sptr))
+        {
+          ignore_request++;
+          valid_stats++;
+          break;
+        }
+      
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_number(server_ctx) +
+                                   SSL_CTX_sess_number(client_ctx),
+                                   "items in the session cache");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_connect(server_ctx) +
+                                   SSL_CTX_sess_connect(client_ctx),
+                                   "client connects");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_connect_good(server_ctx) +
+                                   SSL_CTX_sess_connect_good(client_ctx),
+                                   "client connects that finished");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_connect_renegotiate(server_ctx) +
+                                   SSL_CTX_sess_connect_renegotiate(client_ctx),
+                                   "client renegotiatations requested");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_accept(server_ctx) +
+                                   SSL_CTX_sess_accept(client_ctx),
+                                   "server connects");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_accept_good(server_ctx) +
+                                   SSL_CTX_sess_accept_good(client_ctx),
+                                   "server connects that finished");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_accept_renegotiate(server_ctx) +
+                                   SSL_CTX_sess_accept_renegotiate(client_ctx),
+                                   "server renegotiatations requested");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_hits(server_ctx) +
+                                   SSL_CTX_sess_hits(client_ctx),
+                                   "session cache hits");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_misses(server_ctx) +
+                                   SSL_CTX_sess_misses(client_ctx),
+                                   "session cache misses");
+      sendto_one(sptr, form_str(RPL_STATSSSL),
+                 me.name, parv[0], SSL_CTX_sess_timeouts(server_ctx) +
+                                   SSL_CTX_sess_timeouts(client_ctx),
+                                   "session cache timeouts");      
+      valid_stats++;
+      break;
+#endif
+      
     case 'k' :
 #ifdef K_LINES_OPER_ONLY
       if (!IsAnOper(sptr)) 
diff -uNrd ircd-hybrid-6.0/src/m_svinfo.c ircd-pi1.0a/src/m_svinfo.c
--- ircd-hybrid-6.0/src/m_svinfo.c	Tue Oct 17 02:20:50 2000
+++ ircd-pi1.0a/src/m_svinfo.c	Fri Nov  2 19:23:34 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_svinfo.c,v 1.4 2000/10/17 06:20:50 lusky Exp $
+ *   $Id: m_svinfo.c,v 1.1.1.1 2001/11/03 00:23:34 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_time.c ircd-pi1.0a/src/m_time.c
--- ircd-hybrid-6.0/src/m_time.c	Fri Jul 30 02:40:16 1999
+++ ircd-pi1.0a/src/m_time.c	Fri Nov  2 19:23:34 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_time.c,v 1.1 1999/07/30 06:40:16 tomh Exp $
+ *   $Id: m_time.c,v 1.1.1.1 2001/11/03 00:23:34 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_trace.c ircd-pi1.0a/src/m_trace.c
--- ircd-hybrid-6.0/src/m_trace.c	Tue Nov 21 01:49:30 2000
+++ ircd-pi1.0a/src/m_trace.c	Tue May 21 22:14:29 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_trace.c,v 1.3 2000/11/21 06:49:30 lusky Exp $
+ *   $Id: m_trace.c,v 1.3 2002/05/22 02:14:29 smoli Exp $
  */
 #include "m_commands.h"
 #include "class.h"
@@ -33,6 +33,7 @@
 #include "s_bsd.h"
 #include "s_serv.h"
 #include "send.h"
+#include "config.h"
 
 #include <string.h>
 #include <time.h>
@@ -109,8 +110,7 @@
   int   doall, link_s[MAXCONNECTIONS], link_u[MAXCONNECTIONS];
   int   cnt = 0, wilds, dow;
 #ifdef PACE_TRACE
-  static time_t last_trace=0L;
-  static time_t last_used=0L;
+  static time_t last_used = 0L;
 #endif
   static time_t now;
 
@@ -143,7 +143,7 @@
                      version, debugmode, tname, ac2ptr->from->name);
         else
           sendto_one(sptr, form_str(RPL_TRACELINK), me.name, parv[0],
-                     version, debugmode, tname, "ac2ptr_is_NULL!!");
+                     version, debugmode, tname, 0, 0, "ac2ptr_is_NULL!!");
         return 0;
       }
     case HUNTED_ISME:
@@ -155,18 +155,14 @@
   if(!IsAnOper(sptr))
     {
       /* pacing for /trace is problemmatical */
-#if PACE_TRACE
-      if((last_used + PACE_WAIT) > CurrentTime)
+#ifdef PACE_TRACE
+      if(MyClient(sptr) && (last_used + PACE_WAIT) > CurrentTime)
         {
-          /* safe enough to give this on a local connect only */
-          if(MyClient(sptr))
-            sendto_one(sptr,form_str(RPL_LOAD2HI),me.name,parv[0]);
+          sendto_one(sptr,form_str(RPL_LOAD2HI),me.name,parv[0]);
           return 0;
         }
       else
-        {
-          last_used = CurrentTime;
-        }
+        last_used = CurrentTime;
 #endif
 
       if (parv[1] && !strchr(parv[1],'.') && (strchr(parv[1], '*')
diff -uNrd ircd-hybrid-6.0/src/m_ungline.c ircd-pi1.0a/src/m_ungline.c
--- ircd-hybrid-6.0/src/m_ungline.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/m_ungline.c	Sun May  5 00:42:24 2002
@@ -0,0 +1,140 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, src/m_ungline.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   See file AUTHORS in IRC package for additional names of
+ *   the programmers.
+ *
+ *   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: m_ungline.c,v 1.4 2002/05/05 04:42:24 smoli Exp $
+ */
+#include "m_commands.h"
+#include "channel.h"
+#include "client.h"
+#include "common.h"
+#include "dline_conf.h"
+#include "fileio.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "mtrie_conf.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_misc.h"
+
+#include "send.h"
+#include "struct.h"
+
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef GLINES
+
+extern ConfigFileEntryType ConfigFileEntry;
+extern int    remove_gline_match(char *host,char *user);
+
+/*
+ * m_ungline
+ *
+ *      parv[0] = sender
+ *      parv[1] = address to remove
+ *
+ */
+int m_ungline (aClient *cptr,aClient *sptr,int parc,char *parv[])
+{
+  char  *user,*host;
+
+  if (check_registered(sptr))
+    {
+      return -1;
+    }
+
+  if (!IsAnOper(sptr))
+    {
+      sendto_one(sptr, form_str(ERR_NOPRIVILEGES), me.name,
+                 parv[0]);
+      return 0;
+    }
+
+  if (!IsSetOperUnkline(sptr))
+    {
+      sendto_one(sptr,":%s NOTICE %s :You have no U flag",me.name,parv[0]);
+      return 0;
+    }
+
+  if ( parc < 2 )
+    {
+      sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "UNGLINE");
+      return 0;
+    }
+
+  if ( (host = strchr(parv[1], '@')) || *parv[1] == '*' )
+    {
+      // Explicit user@host mask given
+
+      if(host)
+        {
+          user = parv[1];       // here is user part
+          *(host++) = '\0';     // and now here is host
+        }
+      else
+        {
+          user = "*";           // no @ found, assume its *@somehost
+          host = parv[1];
+        }
+    }
+  else
+    {
+      sendto_one(sptr, ":%s NOTICE %s :Invalid parameters",
+                 me.name, parv[0]);
+      return 0;
+    }
+
+  if( (user[0] == '*') && (user[1] == '\0')
+      && (host[0] == '*') && (host[1] == '\0') )
+    {
+      sendto_one(sptr, ":%s NOTICE %s :Cannot UNG-Line everyone",
+                 me.name, parv[0]);
+      return 0;
+    }
+
+  if(remove_gline_match(host,user))
+    {
+      sendto_one(sptr, ":%s NOTICE %s :Un-glined [%s@%s] from g-lines",
+                 me.name, parv[0],user, host);
+      sendto_ops("%s has removed the G-Line for: [%s@%s]",
+                 parv[0], user, host );
+
+      log(L_NOTICE, "%s removed G-Line for [%s@%s]",
+          parv[0], user, host);
+      return 0;
+    }
+  else
+    {
+     sendto_one(sptr, ":%s NOTICE %s :Can't find gline for [%s@%s]",
+                 me.name, parv[0],user, host);
+    }
+
+ return 0;
+}
+
+#endif /* GLINES */
+
diff -uNrd ircd-hybrid-6.0/src/m_unkline.c ircd-pi1.0a/src/m_unkline.c
--- ircd-hybrid-6.0/src/m_unkline.c	Sat Nov 18 14:11:12 2000
+++ ircd-pi1.0a/src/m_unkline.c	Fri Nov  2 19:23:35 2001
@@ -21,7 +21,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- *   $Id: m_unkline.c,v 1.39 2000/11/18 19:11:12 lusky Exp $
+ *   $Id: m_unkline.c,v 1.1.1.1 2001/11/03 00:23:35 shifty Exp $
  */
 #include "m_commands.h"
 #include "channel.h"
diff -uNrd ircd-hybrid-6.0/src/m_userhost.c ircd-pi1.0a/src/m_userhost.c
--- ircd-hybrid-6.0/src/m_userhost.c	Tue Jan  2 00:48:18 2001
+++ ircd-pi1.0a/src/m_userhost.c	Fri Nov  2 19:23:35 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_userhost.c,v 1.10 2001/01/02 05:48:18 lusky Exp $
+ *   $Id: m_userhost.c,v 1.1.1.1 2001/11/03 00:23:35 shifty Exp $
  */
 
 #include "m_commands.h"
diff -uNrd ircd-hybrid-6.0/src/m_users.c ircd-pi1.0a/src/m_users.c
--- ircd-hybrid-6.0/src/m_users.c	Thu Jul 29 03:11:49 1999
+++ ircd-pi1.0a/src/m_users.c	Fri Nov  2 19:23:35 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_users.c,v 1.1 1999/07/29 07:11:49 tomh Exp $
+ *   $Id: m_users.c,v 1.1.1.1 2001/11/03 00:23:35 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_version.c ircd-pi1.0a/src/m_version.c
--- ircd-hybrid-6.0/src/m_version.c	Sat Jul 31 00:48:04 1999
+++ ircd-pi1.0a/src/m_version.c	Fri Nov  2 19:23:35 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_version.c,v 1.5 1999/07/31 04:48:04 db Exp $
+ *   $Id: m_version.c,v 1.1.1.1 2001/11/03 00:23:35 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_wallops.c ircd-pi1.0a/src/m_wallops.c
--- ircd-hybrid-6.0/src/m_wallops.c	Mon Aug  9 22:46:25 1999
+++ ircd-pi1.0a/src/m_wallops.c	Fri Nov  2 19:23:35 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_wallops.c,v 1.2 1999/08/10 02:46:25 lusky Exp $
+ *   $Id: m_wallops.c,v 1.1.1.1 2001/11/03 00:23:35 shifty Exp $
  */
 #include "m_commands.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/m_who.c ircd-pi1.0a/src/m_who.c
--- ircd-hybrid-6.0/src/m_who.c	Fri Nov 24 12:36:30 2000
+++ ircd-pi1.0a/src/m_who.c	Thu May 23 00:22:22 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_who.c,v 1.3 2000/11/24 17:36:30 lusky Exp $
+ *   $Id: m_who.c,v 1.3 2002/05/23 04:22:22 smoli Exp $
  */
 
 #include "m_commands.h"
@@ -97,14 +97,22 @@
                        struct Channel *repchan,
                        Link *lp)
 {
-  char  status[5];
+  char  status[6];
   /* Using a pointer will compile faster than an index */
   char *p = status;
 
-  if (acptr->user->away)
+#ifdef ENFORCE
+  if(IsEnforce(acptr))
+    *p++ = 'E';
+#endif
+  if(acptr->user->away)
     *p++ = 'G';
   else
     *p++ = 'H';
+#ifdef HAVE_SSL
+  if(IsSSLUmode(acptr))
+    *p++ = 'S';
+#endif
   if (IsAnOper(acptr))
     *p++ = '*';
   if ((repchan != NULL) && (lp == NULL))
@@ -158,6 +166,7 @@
   int   oper = parc > 2 ? (*parv[2] == 'o' ): 0; /* Show OPERS only */
   int   member;
   int   maxmatches = 500;
+  int   enforced = 0;
 
   mychannel = NullChn;
   if (sptr->user)
@@ -200,6 +209,9 @@
       if (chptr)
         {
           member = IsMember(sptr, chptr);
+          if(!member && IsEnforce(sptr))
+            enforced = ++member;
+
           if (member || !SecretChannel(chptr))
             for (lp = chptr->members; lp; lp = lp->next)
               {
@@ -209,7 +221,11 @@
                   continue;
                 do_who(sptr, lp->value.cptr, chptr, lp);
               }
+          if(enforced && MyClient(sptr) && !IsServer(sptr))
+            sendto_realops("Enforced who for %s from %s (%s@%s)",
+                           parv[1], sptr->name, sptr->username, sptr->host);
         }
+      
     }
   else if (mask && 
            ((acptr = find_client(mask, NULL)) != NULL) &&
@@ -223,6 +239,9 @@
         {
           chptr = lp->value.chptr;
           member = IsMember(sptr, chptr);
+          if(!member && IsEnforce(sptr))
+            enforced = ++member;
+
           if (isinvis && !member)
             continue;
           if (member || (!isinvis && PubChannel(chptr)))
@@ -231,6 +250,11 @@
               break;
             }
         }
+      if(parv[1] && *parv[1] != '-')
+        if(enforced && MyClient(sptr) && !IsServer(sptr))
+           sendto_realops("Enforced who for %s from %s (%s@%s)",
+                          parv[1], sptr->name, sptr->username, sptr->host);
+
       do_who(sptr, acptr, ch2ptr, NULL);
     }
   else for (acptr = GlobalClientList; acptr; acptr = acptr->next)
@@ -256,6 +280,9 @@
         {
           chptr = lp->value.chptr;
           member = IsMember(sptr, chptr);
+          if(!member && IsEnforce(sptr))
+            enforced = ++member;
+
           if (isinvis && !member)
             continue;
           if (member || (!isinvis && PubChannel(chptr)))
@@ -268,6 +295,11 @@
               !isinvis)
             showperson = 1;
         }
+      if(parv[1] && *parv[1] != '-')
+        if(enforced && MyClient(sptr) && !IsServer(sptr))
+          sendto_realops("Enforced who for %s from %s (%s@%s)",
+                         parv[1], sptr->name, sptr->username, sptr->host);
+
       if (!acptr->user->channel && !isinvis)
         showperson = 1;
       if (showperson &&
diff -uNrd ircd-hybrid-6.0/src/m_whois.c ircd-pi1.0a/src/m_whois.c
--- ircd-hybrid-6.0/src/m_whois.c	Fri Nov 24 12:36:30 2000
+++ ircd-pi1.0a/src/m_whois.c	Sat May 18 00:05:58 2002
@@ -1,5 +1,5 @@
 /************************************************************************
- *   IRC - Internet Relay Chat, src/m_who.c
+ *   IRC - Internet Relay Chat, src/m_whois.c
  *   Copyright (C) 1990 Jarkko Oikarinen and
  *                      University of Oulu, Computing Center
  *
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: m_whois.c,v 1.6 2000/11/24 17:36:30 lusky Exp $
+ *   $Id: m_whois.c,v 1.7 2002/05/18 04:05:58 smoli Exp $
  */
 
 #include "m_commands.h"
@@ -34,6 +34,8 @@
 #include "send.h"
 #include "list.h"
 #include "irc_string.h"
+#include "s_log.h"
+#include "setup.h"
 
 #include <string.h>
 
@@ -113,6 +115,8 @@
     NULL,       /* invited */
     NULL,       /* away */
     0,          /* last */
+    0,          /* last sent */
+    0,          /* spoofed */
     1,          /* refcount */
     0,          /* joined */
     "<Unknown>"         /* server */
@@ -126,6 +130,7 @@
   char  *p = NULL;
   int   found, len, mlen;
   static time_t last_used=0L;
+  static int use_count = 0;
   int found_mode;
 
   if (parc < 2)
@@ -137,9 +142,10 @@
 
   if(parc > 2)
     {
-      if (hunt_server(cptr,sptr,":%s WHOIS %s :%s", 1,parc,parv) !=
-          HUNTED_ISME)
-        return 0;
+      if(!MyConnect(sptr))
+        if(hunt_server(cptr,sptr,":%s WHOIS %s :%s", 1,parc,parv) !=
+            HUNTED_ISME)
+          return 0;
       parv[1] = parv[2];
     }
 
@@ -151,11 +157,13 @@
            * request =might= increase sendq to be usable in a split hack
            * Sorry gang ;-( - Dianora
            */
-          return 0;
+          if(use_count++ > 5)
+            return 0;
         }
       else
         {
           last_used = CurrentTime;
+          use_count = 0;
         }
     }
 
@@ -217,25 +225,45 @@
             /*      continue; */
 
           user = acptr->user ? acptr->user : &UnknownUser;
-          name = (!*acptr->name) ? "?" : acptr->name;
+          if(!*acptr->name)
+            {
+              static char q[] = "?";
+              sendto_realops_lev(L_DEBUG, "hash_find_client(%s, NULL) returnedd me client %p, with 0-length name",
+                                          nick, (void *)acptr);
+              name = q;
+            }
+          else
+            name = acptr->name;
+          
           invis = IsInvisible(acptr);
           member = (user->channel) ? 1 : 0;
 
           a2cptr = find_server(user->server);
+
+          if(!MyClient(acptr) && IsCapable(a2cptr->from,CAP_RW) && acptr->name)
+            {
+              sendto_one(a2cptr, ":%s WHOIS %s", sptr->name, acptr->name);
+/*              if(acptr->user)   
+                sendto_one(sptr, form_str(RPL_WHOISIDLE),
+                me.name, parv[0], name, CurrentTime - user->last,
+                acptr->firsttime);*/
+              
+              return 0;
+            }
           
           sendto_one(sptr, form_str(RPL_WHOISUSER), me.name,
                      parv[0], name,
                      acptr->username, acptr->host, acptr->info);
 
-          mlen = strlen(me.name) + strlen(parv[0]) + 6 +
-            strlen(name);
+          mlen = irclen(me.name) + irclen(parv[0]) + 6 +
+            irclen(name);
           for (len = 0, *buf = '\0', lp = user->channel; lp;
                lp = lp->next)
             {
               chptr = lp->value.chptr;
               if (ShowChannel(sptr, chptr))
                 {
-                  if (len + strlen(chptr->chname)
+                  if (len + irclen(chptr->chname)
                       > (size_t) BUFSIZE - 4 - mlen)
                     {
                       sendto_one(sptr,
@@ -260,7 +288,7 @@
                   if (len)
                     *(buf + len) = '\0';
                   (void)strcpy(buf + len, chptr->chname);
-                  len += strlen(chptr->chname);
+                  len += irclen(chptr->chname);
                   (void)strcat(buf + len, " ");
                   len++;
                 }
@@ -287,6 +315,16 @@
           if (IsAnOper(acptr))
             sendto_one(sptr, form_str(RPL_WHOISOPERATOR),
                        me.name, parv[0], name);
+#ifdef ENFORCE
+	  if (IsEnforce(acptr))
+	    sendto_one(sptr, form_str(RPL_WHOISENFORCE),
+		       me.name, parv[0], name);
+#endif /* ENFORCE */
+#ifdef HAVE_SSL
+	  if (IsSSLUmode(acptr))
+	    sendto_one(sptr, form_str(RPL_WHOISSSL),
+		       me.name, parv[0], name);
+#endif /* HAVE_SSL */
 #ifdef WHOIS_NOTICE
           if ((MyOper(acptr)) && ((acptr)->umodes & FLAGS_SPY) &&
               (MyConnect(sptr)) && (IsPerson(sptr)) && (acptr != sptr))
@@ -371,15 +409,15 @@
                      parv[0], name,
                      acptr->username, acptr->host, acptr->info);
           found = 1;
-          mlen = strlen(me.name) + strlen(parv[0]) + 6 +
-            strlen(name);
+          mlen = irclen(me.name) + irclen(parv[0]) + 6 +
+            irclen(name);
           for (len = 0, *buf = '\0', lp = user->channel; lp;
                lp = lp->next)
             {
               chptr = lp->value.chptr;
               if (ShowChannel(sptr, chptr))
                 {
-                  if (len + strlen(chptr->chname)
+                  if (len + irclen(chptr->chname)
                       > (size_t) BUFSIZE - 4 - mlen)
                     {
                       sendto_one(sptr,
@@ -403,7 +441,7 @@
                   if (len)
                     *(buf + len) = '\0';
                   (void)strcpy(buf + len, chptr->chname);
-                  len += strlen(chptr->chname);
+                  len += irclen(chptr->chname);
                   (void)strcat(buf + len, " ");
                   len++;
                 }
@@ -430,6 +468,12 @@
           if (IsAnOper(acptr))
             sendto_one(sptr, form_str(RPL_WHOISOPERATOR),
                        me.name, parv[0], name);
+#ifdef ENFORCE
+	  if (IsEnforce(acptr))
+	    sendto_one(sptr, form_str(RPL_WHOISENFORCE),
+		       me.name, parv[0], name);
+#endif /* ENFORCE */
+	   
 #ifdef WHOIS_NOTICE
           if ((MyOper(acptr)) && ((acptr)->umodes & FLAGS_SPY) &&
               (MyConnect(sptr)) && (IsPerson(sptr)) && (acptr != sptr))
diff -uNrd ircd-hybrid-6.0/src/match.c ircd-pi1.0a/src/match.c
--- ircd-hybrid-6.0/src/match.c	Thu Sep 14 01:22:02 2000
+++ ircd-pi1.0a/src/match.c	Fri May 10 11:32:19 2002
@@ -22,12 +22,14 @@
  * Cleanup of collapse and match
  * Moved static calls variable to match
  * Added asserts for null pointers
- * $Id: match.c,v 1.25 2000/09/14 05:22:02 lusky Exp $
+ * $Id: match.c,v 1.10 2002/05/10 15:32:19 smoli Exp $
  *
  */
 #include "irc_string.h"
 #include "config.h"      /* RFC1035_ANAL */
+
 #include <assert.h>
+#include <string.h>
 
 /*
 **  Compare if a given string (name) matches the given
@@ -148,7 +150,8 @@
    * XXX - null pointers ok?
    */
   if (s) {
-    for (; *s; s++) {
+                                                                                                                                                                                                                                    
+for (; *s; s++) {
       if ('*' == *s) {
         t = s1 = s + 1;
         while ('*' == *t)
@@ -163,46 +166,6 @@
   return pattern;
 }
 
-/*
- * irccmp - case insensitive comparison of two 0 terminated strings.
- *
- *      returns  0, if s1 equal to s2
- *              <0, if s1 lexicographically less than s2
- *              >0, if s1 lexicographically greater than s2
- */
-int irccmp(const char *s1, const char *s2)
-{
-  const unsigned char* str1 = (const unsigned char*) s1;
-  const unsigned char* str2 = (const unsigned char*) s2;
-  int   res;
-  assert(0 != s1);
-  assert(0 != s2);
-
-  while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0) {
-    if (*str1 == '\0')
-      return 0;
-    str1++;
-    str2++;
-  }
-  return (res);
-}
-
-int ircncmp(const char* s1, const char *s2, int n)
-{
-  const unsigned char* str1 = (const unsigned char*) s1;
-  const unsigned char* str2 = (const unsigned char*) s2;
-  int res;
-  assert(0 != s1);
-  assert(0 != s2);
-
-  while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0) {
-    str1++; str2++; n--;
-    if (n == 0 || (*str1 == '\0' && *str2 == '\0'))
-      return 0;
-  }
-  return (res);
-}
-
 #ifdef NO_DUPE_MULTI_MESSAGES
 /*
 ** canonize
@@ -276,10 +239,10 @@
   0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
   0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9,
   0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
-  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
-  0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
-  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
-  0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+  0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
+  0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
   0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
   0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
   0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
@@ -315,10 +278,10 @@
   0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
   0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
   0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
-  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
-  0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
-  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
-  0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff 
+  0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
+  0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+  0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
+  0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff
 };
 
 /*
@@ -532,70 +495,70 @@
 /* 0xBD */   CHAN_C|NONEOS_C,
 /* 0xBE */   CHAN_C|NONEOS_C,
 /* 0xBF */   CHAN_C|NONEOS_C,
-/* 0xC0 */   CHAN_C|NONEOS_C,
-/* 0xC1 */   CHAN_C|NONEOS_C,
-/* 0xC2 */   CHAN_C|NONEOS_C,
-/* 0xC3 */   CHAN_C|NONEOS_C,
-/* 0xC4 */   CHAN_C|NONEOS_C,
-/* 0xC5 */   CHAN_C|NONEOS_C,
-/* 0xC6 */   CHAN_C|NONEOS_C,
-/* 0xC7 */   CHAN_C|NONEOS_C,
-/* 0xC8 */   CHAN_C|NONEOS_C,
-/* 0xC9 */   CHAN_C|NONEOS_C,
-/* 0xCA */   CHAN_C|NONEOS_C,
-/* 0xCB */   CHAN_C|NONEOS_C,
-/* 0xCC */   CHAN_C|NONEOS_C,
-/* 0xCD */   CHAN_C|NONEOS_C,
-/* 0xCE */   CHAN_C|NONEOS_C,
-/* 0xCF */   CHAN_C|NONEOS_C,
-/* 0xD0 */   CHAN_C|NONEOS_C,
-/* 0xD1 */   CHAN_C|NONEOS_C,
-/* 0xD2 */   CHAN_C|NONEOS_C,
-/* 0xD3 */   CHAN_C|NONEOS_C,
-/* 0xD4 */   CHAN_C|NONEOS_C,
-/* 0xD5 */   CHAN_C|NONEOS_C,
-/* 0xD6 */   CHAN_C|NONEOS_C,
-/* 0xD7 */   CHAN_C|NONEOS_C,
-/* 0xD8 */   CHAN_C|NONEOS_C,
-/* 0xD9 */   CHAN_C|NONEOS_C,
-/* 0xDA */   CHAN_C|NONEOS_C,
-/* 0xDB */   CHAN_C|NONEOS_C,
-/* 0xDC */   CHAN_C|NONEOS_C,
-/* 0xDD */   CHAN_C|NONEOS_C,
-/* 0xDE */   CHAN_C|NONEOS_C,
-/* 0xDF */   CHAN_C|NONEOS_C,
-/* 0xE0 */   CHAN_C|NONEOS_C,
-/* 0xE1 */   CHAN_C|NONEOS_C,
-/* 0xE2 */   CHAN_C|NONEOS_C,
-/* 0xE3 */   CHAN_C|NONEOS_C,
-/* 0xE4 */   CHAN_C|NONEOS_C,
-/* 0xE5 */   CHAN_C|NONEOS_C,
-/* 0xE6 */   CHAN_C|NONEOS_C,
-/* 0xE7 */   CHAN_C|NONEOS_C,
-/* 0xE8 */   CHAN_C|NONEOS_C,
-/* 0xE9 */   CHAN_C|NONEOS_C,
-/* 0xEA */   CHAN_C|NONEOS_C,
-/* 0xEB */   CHAN_C|NONEOS_C,
-/* 0xEC */   CHAN_C|NONEOS_C,
-/* 0xED */   CHAN_C|NONEOS_C,
-/* 0xEE */   CHAN_C|NONEOS_C,
-/* 0xEF */   CHAN_C|NONEOS_C,
-/* 0xF0 */   CHAN_C|NONEOS_C,
-/* 0xF1 */   CHAN_C|NONEOS_C,
-/* 0xF2 */   CHAN_C|NONEOS_C,
-/* 0xF3 */   CHAN_C|NONEOS_C,
-/* 0xF4 */   CHAN_C|NONEOS_C,
-/* 0xF5 */   CHAN_C|NONEOS_C,
-/* 0xF6 */   CHAN_C|NONEOS_C,
-/* 0xF7 */   CHAN_C|NONEOS_C,
-/* 0xF8 */   CHAN_C|NONEOS_C,
-/* 0xF9 */   CHAN_C|NONEOS_C,
-/* 0xFA */   CHAN_C|NONEOS_C,
-/* 0xFB */   CHAN_C|NONEOS_C,
-/* 0xFC */   CHAN_C|NONEOS_C,
-/* 0xFD */   CHAN_C|NONEOS_C,
-/* 0xFE */   CHAN_C|NONEOS_C,
-/* 0xFF */   CHAN_C|NONEOS_C
+/* 0xC0 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC1 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC2 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC3 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC4 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC5 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC6 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC7 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC8 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xC9 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCA */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCB */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCC */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCD */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCE */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xCF */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD0 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD1 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD2 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD3 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD4 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD5 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD6 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD7 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD8 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xD9 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDA */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDB */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDC */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDD */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDE */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xDF */   CHAN_C|NONEOS_C|ALPHA_C,
+/* 0xE0 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE1 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE2 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE3 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE4 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE5 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE6 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE7 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE8 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xE9 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xEA */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xEB */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xEC */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xED */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xEE */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xEF */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF0 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF1 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF2 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF3 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF4 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF5 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF6 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF7 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF8 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xF9 */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFA */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFB */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFC */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFD */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFE */   CHAN_C|NONEOS_C|ALPHA_C|NICK_C,
+/* 0xFF */   CHAN_C|NONEOS_C|ALPHA_C
 };
 
 
diff -uNrd ircd-hybrid-6.0/src/messages.tab ircd-pi1.0a/src/messages.tab
--- ircd-hybrid-6.0/src/messages.tab	Sat Dec 30 19:12:01 2000
+++ ircd-pi1.0a/src/messages.tab	Thu May 23 14:04:28 2002
@@ -1,5 +1,5 @@
 /************************************************************************
- *   IRC - Internet Relay Chat, src/messages.tab
+ *   IRC - Internet Relay Chat, ircd/messages_cust.tab
  *   Copyright (C) 1992 Darren Reed
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -16,10 +16,11 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
+ * $Id: messages.tab,v 1.7 2002/05/23 18:04:28 smoli Exp $
  *
- *      I kind of modernized this code a bit. -Dianora
- *
- *   $Id: messages.tab,v 1.13 2000/12/31 00:12:01 lusky Exp $
+ */
+/* 
+ * jive replies originally from mr_bill - mrbill@mrbill.net (Bill Bradford) 
  */
 
 static  char *  replies[] = {
@@ -27,7 +28,11 @@
 /* 001  RPL_WELCOME, */ ":%s 001 %s :Welcome to the Internet Relay Network %s",
 /* 002  RPL_YOURHOST,*/ ":%s 002 %s :Your host is %s, running version %s",
 /* 003  RPL_CREATED, */ ":%s 003 %s :This server was created %s",
-/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxb biklmnopstved",
+#ifdef HAVE_SSL
+/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxbe biklmnopstvedxz",
+#else
+/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxbe biklmnopstvedxz",
+#endif
 /* 005 */       (char *)NULL,
 /* 006 */       (char *)NULL,
 /* 007 */       (char *)NULL,
@@ -248,8 +253,8 @@
 /* 222 */       (char *)NULL,
 /* 223 */       (char *)NULL,
 /* 224 */       (char *)NULL,
-/* 225 RPL_STATSDLINE*/         ":%s 225 %s %c %s %s",
-/* 226 */       (char *)NULL,
+/* 225 RPL_STATSDLINE, */       ":%s 225 %s %c %s %s",
+/* 226 RPL_STATSSSL, */         ":%s 226 %s %d :%s",
 /* 227 */       (char *)NULL,
 /* 228 */       (char *)NULL,
 /* 229 */       (char *)NULL,
@@ -265,7 +270,7 @@
 /* 239 */       (char *)NULL,
 /* 240 */       (char *)NULL,
 /* 241 RPL_STATSLLINE, */       ":%s 241 %s %c %s * %s %d %d",
-/* 242 RPL_STATSUPTIME,*/       ":%s 242 %s :Server Up %d days, %d:%02d:%02d",
+/* 242 RPL_STATSUPTIME,*/       ":%s 242 %s :smoli hasn't messed with the server code now in %d days, %d:%02d:%02d",
 /* 243 RPL_STATSOLINE, */       ":%s 243 %s %c %s@%s * %s %s %d %s",
 /* 244 RPL_STATSHLINE, */       ":%s 244 %s %c %s * %s %d %d", 
 /* 245 RPL_STATSSLINE, */       ":%s 245 %s %c %s * %s %d %d", 
@@ -278,7 +283,7 @@
                     ":%s 250 %s :Highest connection count: %d (%d clients) (%d since server was (re)started)",
 /* 251 RPL_LUSERCLIENT, */
                 ":%s 251 %s :There are %d users and %d invisible on %d servers",
-/* 252 RPL_LUSEROP, */          ":%s 252 %s %d :IRC Operators online",
+/* 252 RPL_LUSEROP, */          ":%s 252 %s %d :drug addicts (operators) online",
 /* 253 RPL_LUSERUNKNOWN, */     ":%s 253 %s %d :unknown connection(s)",
 /* 254 RPL_LUSERCHANNELS, */    ":%s 254 %s %d :channels formed",
 /* 255 RPL_LUSERME, */          ":%s 255 %s :I have %d clients and %d servers",
@@ -289,21 +294,20 @@
 /* 260 */       (char *)NULL,
 /* 261 RPL_TRACELOG, */         ":%s 261 %s File %s %d",
 /* 262 RPL_ENDOFTRACE, */       ":%s 262 %s %s :End of TRACE",
-/* 263 RPL_LOAD2HI, */          
-":%s 263 %s :Server load is temporarily too heavy. Please wait a while and try again.",
+/* 263 RPL_LOAD2HI, */          ":%s 263 %s :What a sucking day! Load is too high, try again later.",
 /* 264 */       (char *)NULL,
-/* 265 RPL_LOCALUSERS, */       ":%s 265 %s :Current local  users: %d  Max: %d",
-/* 266 RPL_GLOBALUSERS, */      ":%s 266 %s :Current global users: %d  Max: %d",
-/* 267 */       (char *)NULL,
-/* 268 */       (char *)NULL,
+/* 265 RPL_LOCALUSERS, */       ":%s 265 %s :Current local  users: %d Max: %d",
+/* 266 RPL_GLOBALUSERS, */      ":%s 266 %s :Current global users: %d Max: %d",
+/* 267 RPL_LOCALSSL, */         ":%s 267 %s :Current local  SSL users: %d Max: %d",
+/* 268 RPL_REACHSSL, */         ":%s 268 %s :Current global SSL users: %d Max: %d",
 /* 269 */       (char *)NULL,
 /* 270 */       (char *)NULL,
 /* 271 */       (char *)NULL,
 /* 272 */       (char *)NULL,
 /* 273 */       (char *)NULL,
 /* 274 */       (char *)NULL,
-/* 275 */       (char *)NULL,
-/* 276 */       (char *)NULL,
+/* 275 RPL_WHOISSSL, */         ":%s 275 %s %s :is paranoid (SSL connection)",
+/* 276 RPL_NOTSSL, */           ":%s 276 %s :Client unreachable by SSL",
 /* 277 */       (char *)NULL,
 /* 278 */       (char *)NULL,
 /* 279 */       (char *)NULL,
@@ -327,23 +331,23 @@
 /* 296 */       (char *)NULL,
 /* 298 */       (char *)NULL,
 /* 299 */       (char *)NULL,
-/* 300 RPL_NONE, */      (char *)NULL,
-/* 301 RPL_AWAY, */      ":%s 301 %s %s :%s",
+/* 300 RPL_NONE, */     (char *)NULL,
+/* 301 RPL_AWAY, */     ":%s 301 %s %s :%s",
 /* 302 RPL_USERHOST, */  ":%s 302 %s :%s",
 /* 303 RPL_ISON, */     ":%s 303 %s :",
 /* 304 RPL_TEXT, */      (char *)NULL,
-/* 305 RPL_UNAWAY, */   ":%s 305 %s :You are no longer marked as being away",
-/* 306 RPL_NOWAWAY, */  ":%s 306 %s :You have been marked as being away",
+/* 305 RPL_UNAWAY, */   ":%s 305 %s :Did you have a nice time? (unaway)",
+/* 306 RPL_NOWAWAY, */  ":%s 306 %s :Hurry back! (away)",
 /* 307 */       (char *)NULL,
 /* 308 */       (char *)NULL,
-/* 309 */       (char *)NULL,
-/* 310 */       (char *)NULL,
+/* 309 RPL_WHOISINFO */         ":%s 309 %s %s :%s",
+/* 310 RPL_WHOISENFORCE */      ":%s 310 %s %s :is an absolute fuck-face",
 /* 311 RPL_WHOISUSER, */        ":%s 311 %s %s %s %s * :%s",
 /* 312 RPL_WHOISSERVER, */      ":%s 312 %s %s %s :%s",
-/* 313 RPL_WHOISOPERATOR, */    ":%s 313 %s %s :is an IRC Operator",
+/* 313 RPL_WHOISOPERATOR, */    ":%s 313 %s %s :is a drug addict (IRC operator)",
 /* 314 RPL_WHOWASUSER, */       ":%s 314 %s %s %s %s * :%s",
 /* 315 RPL_ENDOFWHO, */         ":%s 315 %s %s :End of /WHO list.",
-/* 316 RPL_WHOISCHANOP, */      (char *)NULL,
+/* 316 */       (char *)NULL,
 /* 317 RPL_WHOISIDLE, */        ":%s 317 %s %s %d %d :seconds idle, signon time",
 /* 318 RPL_ENDOFWHOIS, */       ":%s 318 %s %s :End of /WHOIS list.",
 /* 319 RPL_WHOISCHANNELS, */    ":%s 319 %s %s :%s",
@@ -399,7 +403,11 @@
 /* 361 RPL_KILLDONE, */ (char *)NULL,
 /* 362 RPL_CLOSING, */          ":%s 362 %s %s :Closed. Status = %d",
 /* 363 RPL_CLOSEEND, */         ":%s 363 %s %d: Connections Closed",
+#ifdef HAVE_SSL
+/* 364 RPL_LINKS, */            ":%s 364 %s %s %s :%d%s %s",
+#else
 /* 364 RPL_LINKS, */            ":%s 364 %s %s %s :%d %s",
+#endif
 /* 365 RPL_ENDOFLINKS, */       ":%s 365 %s %s :End of /LINKS list.",
 /* 366 RPL_ENDOFNAMES, */       ":%s 366 %s %s :End of /NAMES list.",
 #ifdef BAN_INFO
@@ -420,8 +428,8 @@
 /* 378 */       (char *)NULL,
 /* 379 */       (char *)NULL,
 /* 380 */       (char *)NULL,
-/* 381 RPL_YOUREOPER, */        ":%s 381 %s :You have entered... the Twilight Zone!.",
-/* 382 RPL_REHASHING, */        ":%s 382 %s %s :Rehashing",
+/* 381 RPL_YOUREOPER, */        ":%s 381 %s :You are now one bad motherfucker - Go /kill someone.",
+/* 382 RPL_REHASHING, */        ":%s 382 %s %s :it slices, dices, and even reloads config files! Rehashing config file, mang.",
 /* 383 */       (char *)NULL,
 /* 384 RPL_MYPORTIS, */         ":%s 384 %s %d :Port to local server is\r\n",
 /* 385 RPL_NOTOPERANYMORE, */   (char *)NULL,
@@ -474,7 +482,7 @@
 /* 430 */       (char *)NULL,
 /* 431 ERR_NONICKNAMEGIVEN, */  ":%s 431 %s :No nickname given",
 /* 432 ERR_ERRONEUSNICKNAME, */ ":%s 432 %s %s :Erroneus Nickname",
-/* 433 ERR_NICKNAMEINUSE, */    ":%s 433 %s %s :Nickname is already in use.",
+/* 433 ERR_NICKNAMEINUSE, */    ":%s 433 %s %s :Doh! Looks like someone stole your nick, doesn't it?",
 /* 434 */       (char *)NULL,
 /* 435 */       (char *)NULL,
 /* 436 ERR_NICKCOLLISION, */    ":%s 436 %s %s :Nickname collision KILL",
@@ -505,27 +513,27 @@
 /* 461 ERR_NEEDMOREPARAMS, */   ":%s 461 %s %s :Not enough parameters",
 /* 462 ERR_ALREADYREGISTRED, */ ":%s 462 %s :You may not reregister",
 /* 463 ERR_NOPERMFORHOST, */    ":%s 463 %s :Your host isn't among the privileged",
-/* 464 ERR_PASSWDMISMATCH, */   ":%s 464 %s :Password Incorrect",
+/* 464 ERR_PASSWDMISMATCH, */   ":%s 464 %s :Wrong password, dude. Are you sure you know what you're doing??",
 /* 465 ERR_YOUREBANNEDCREEP, */ ":%s 465 %s :You are banned from this server- %s",
 /* 466 ERR_YOUWILLBEBANNED, */  (char *)NULL,
 /* 467 ERR_KEYSET, */           ":%s 467 %s %s :Channel key already set",
 /* 468 */       (char *)NULL,
 /* 469 */       (char *)NULL,
-/* 470 */       (char *)NULL,
-/* 471 ERR_CHANNELISFULL, */    ":%s 471 %s %s :Cannot join channel (+l)",
+/* 470 ERR_NEEDSSL, */          ":%s 470 %s %s :You're not paranoid enough",
+/* 471 ERR_CHANNELISFULL, */    ":%s 471 %s %s :Too much dudes in there.",
 /* 472 ERR_UNKNOWNMODE  , */    ":%s 472 %s %c :is unknown mode char to me",
-/* 473 ERR_INVITEONLYCHAN, */   ":%s 473 %s %s :Cannot join channel (+i)",
-/* 474 ERR_BANNEDFROMCHAN, */   ":%s 474 %s %s :Cannot join channel (+b)",
-/* 475 ERR_BADCHANNELKEY, */    ":%s 475 %s %s :Cannot join channel (+k)",
+/* 473 ERR_INVITEONLYCHAN, */   ":%s 473 %s %s :Private party, your invitation please!?",
+/* 474 ERR_BANNEDFROMCHAN, */   ":%s 474 %s %s :You're banned creep!",
+/* 475 ERR_BADCHANNELKEY, */    ":%s 475 %s %s :Knowing the key would be useful, wouldn't it?",
 /* 476 ERR_BADCHANMASK, */      ":%s 476 %s %s :Bad Channel Mask",
 /* 477 ERR_MODELESS, */         ":%s 477 %s %s :Channel does not support modes",
 /* 478 ERR_BANLISTFULL, */      ":%s 478 %s %s %s :Channel ban list is full",
 /* 479 ERR_BADCHANNAME */       ":%s 479 %s %s :Illegal channel name",
-/* 480 */       (char *)NULL,
+/* 480 */	(char *)NULL,
 /* 481 ERR_NOPRIVILEGES, */
-                ":%s 481 %s :Permission Denied- You're not an IRC operator",
-/* 482 ERR_CHANOPRIVSNEEDED, */ ":%s 482 %s %s :You're not channel operator",
-/* 483 ERR_CANTKILLSERVER, */   ":%s 483 %s :You can't kill a server!",
+                ":%s 481 %s :In your dreams, dude! But not here!",
+/* 482 ERR_CHANOPRIVSNEEDED, */ ":%s 482 %s %s :How about beeing channel operator first?",
+/* 483 ERR_CANTKILLSERVER, */    ":%s 483 %s :Don't be an idiot - you can't kill a SERVER, fool.",
 /* 484 */       (char *)NULL,
 /* 485 */       (char *)NULL,
 /* 486 */       (char *)NULL,
@@ -533,7 +541,7 @@
 /* 488 */       (char *)NULL,
 /* 489 */       (char *)NULL,
 /* 490 */       (char *)NULL,
-/* 491 ERR_NOOPERHOST, */       ":%s 491 %s :Only few of mere mortals may try to enter the twilight zone",
+/* 491 ERR_NOOPERHOST, */       ":%s 491 %s :Do I know you?",
 /* 492 */       (char *)NULL,
 /* 493 */       (char *)NULL,
 /* 494 */       (char *)NULL,
diff -uNrd ircd-hybrid-6.0/src/messages_cust.tab ircd-pi1.0a/src/messages_cust.tab
--- ircd-hybrid-6.0/src/messages_cust.tab	Sat Dec 30 19:12:01 2000
+++ ircd-pi1.0a/src/messages_cust.tab	Wed Dec 31 19:00:00 1969
@@ -1,554 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, ircd/messages_cust.tab
- *   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.
- *
- * $Id: messages_cust.tab,v 1.12 2000/12/31 00:12:01 lusky Exp $
- *
- */
-/* 
- * jive replies originally from mr_bill - mrbill@mrbill.net (Bill Bradford) 
- */
-
-static  char *  replies[] = {
-/* 000 */       (char *)NULL,
-/* 001  RPL_WELCOME, */ ":%s 001 %s :Welcome to the Internet Relay Network %s",
-/* 002  RPL_YOURHOST,*/ ":%s 002 %s :Your host is %s, running version %s",
-/* 003  RPL_CREATED, */ ":%s 003 %s :This server was created %s",
-/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxb biklmnopstved",
-/* 005 */       (char *)NULL,
-/* 006 */       (char *)NULL,
-/* 007 */       (char *)NULL,
-/* 008 */       (char *)NULL,
-/* 009 */       (char *)NULL,
-/* 010 */       (char *)NULL,
-/* 011 */       (char *)NULL,
-/* 012 */       (char *)NULL,
-/* 013 */       (char *)NULL,
-/* 014 */       (char *)NULL,
-/* 015 */       (char *)NULL,
-/* 016 */       (char *)NULL,
-/* 017 */       (char *)NULL,
-/* 018 */       (char *)NULL,
-/* 019 */       (char *)NULL,
-/* 020 */       (char *)NULL,
-/* 021 */       (char *)NULL,
-/* 022 */       (char *)NULL,
-/* 023 */       (char *)NULL,
-/* 024 */       (char *)NULL,
-/* 025 */       (char *)NULL,
-/* 026 */       (char *)NULL,
-/* 027 */       (char *)NULL,
-/* 028 */       (char *)NULL,
-/* 029 */       (char *)NULL,
-/* 030 */       (char *)NULL,
-/* 031 */       (char *)NULL,
-/* 032 */       (char *)NULL,
-/* 033 */       (char *)NULL,
-/* 034 */       (char *)NULL,
-/* 035 */       (char *)NULL,
-/* 036 */       (char *)NULL,
-/* 037 */       (char *)NULL,
-/* 038 */       (char *)NULL,
-/* 039 */       (char *)NULL,
-/* 040 */       (char *)NULL,
-/* 041 */       (char *)NULL,
-/* 042 */       (char *)NULL,
-/* 043 */       (char *)NULL,
-/* 044 */       (char *)NULL,
-/* 045 */       (char *)NULL,
-/* 046 */       (char *)NULL,
-/* 047 */       (char *)NULL,
-/* 048 */       (char *)NULL,
-/* 049 */       (char *)NULL,
-/* 050 */       (char *)NULL,
-/* 051 */       (char *)NULL,
-/* 052 */       (char *)NULL,
-/* 053 */       (char *)NULL,
-/* 054 */       (char *)NULL,
-/* 055 */       (char *)NULL,
-/* 056 */       (char *)NULL,
-/* 057 */       (char *)NULL,
-/* 058 */       (char *)NULL,
-/* 059 */       (char *)NULL,
-/* 060 */       (char *)NULL,
-/* 061 */       (char *)NULL,
-/* 062 */       (char *)NULL,
-/* 063 */       (char *)NULL,
-/* 064 */       (char *)NULL,
-/* 065 */       (char *)NULL,
-/* 066 */       (char *)NULL,
-/* 067 */       (char *)NULL,
-/* 068 */       (char *)NULL,
-/* 069 */       (char *)NULL,
-/* 070 */       (char *)NULL,
-/* 071 */       (char *)NULL,
-/* 072 */       (char *)NULL,
-/* 073 */       (char *)NULL,
-/* 074 */       (char *)NULL,
-/* 075 */       (char *)NULL,
-/* 076 */       (char *)NULL,
-/* 077 */       (char *)NULL,
-/* 078 */       (char *)NULL,
-/* 079 */       (char *)NULL,
-/* 080 */       (char *)NULL,
-/* 081 */       (char *)NULL,
-/* 082 */       (char *)NULL,
-/* 083 */       (char *)NULL,
-/* 084 */       (char *)NULL,
-/* 085 */       (char *)NULL,
-/* 086 */       (char *)NULL,
-/* 087 */       (char *)NULL,
-/* 088 */       (char *)NULL,
-/* 089 */       (char *)NULL,
-/* 090 */       (char *)NULL,
-/* 091 */       (char *)NULL,
-/* 092 */       (char *)NULL,
-/* 093 */       (char *)NULL,
-/* 094 */       (char *)NULL,
-/* 095 */       (char *)NULL,
-/* 096 */       (char *)NULL,
-/* 097 */       (char *)NULL,
-/* 098 */       (char *)NULL,
-/* 099 */       (char *)NULL,
-/* 100 */       (char *)NULL,
-/* 101 */       (char *)NULL,
-/* 102 */       (char *)NULL,
-/* 103 */       (char *)NULL,
-/* 104 */       (char *)NULL,
-/* 105 */       (char *)NULL,
-/* 106 */       (char *)NULL,
-/* 107 */       (char *)NULL,
-/* 108 */       (char *)NULL,
-/* 109 */       (char *)NULL,
-/* 110 */       (char *)NULL,
-/* 111 */       (char *)NULL,
-/* 112 */       (char *)NULL,
-/* 113 */       (char *)NULL,
-/* 114 */       (char *)NULL,
-/* 115 */       (char *)NULL,
-/* 116 */       (char *)NULL,
-/* 117 */       (char *)NULL,
-/* 118 */       (char *)NULL,
-/* 119 */       (char *)NULL,
-/* 120 */       (char *)NULL,
-/* 121 */       (char *)NULL,
-/* 122 */       (char *)NULL,
-/* 123 */       (char *)NULL,
-/* 124 */       (char *)NULL,
-/* 125 */       (char *)NULL,
-/* 126 */       (char *)NULL,
-/* 127 */       (char *)NULL,
-/* 128 */       (char *)NULL,
-/* 129 */       (char *)NULL,
-/* 130 */       (char *)NULL,
-/* 131 */       (char *)NULL,
-/* 132 */       (char *)NULL,
-/* 133 */       (char *)NULL,
-/* 134 */       (char *)NULL,
-/* 135 */       (char *)NULL,
-/* 136 */       (char *)NULL,
-/* 137 */       (char *)NULL,
-/* 138 */       (char *)NULL,
-/* 139 */       (char *)NULL,
-/* 140 */       (char *)NULL,
-/* 141 */       (char *)NULL,
-/* 142 */       (char *)NULL,
-/* 143 */       (char *)NULL,
-/* 144 */       (char *)NULL,
-/* 145 */       (char *)NULL,
-/* 146 */       (char *)NULL,
-/* 147 */       (char *)NULL,
-/* 148 */       (char *)NULL,
-/* 149 */       (char *)NULL,
-/* 150 */       (char *)NULL,
-/* 151 */       (char *)NULL,
-/* 152 */       (char *)NULL,
-/* 153 */       (char *)NULL,
-/* 154 */       (char *)NULL,
-/* 155 */       (char *)NULL,
-/* 156 */       (char *)NULL,
-/* 157 */       (char *)NULL,
-/* 158 */       (char *)NULL,
-/* 159 */       (char *)NULL,
-/* 160 */       (char *)NULL,
-/* 161 */       (char *)NULL,
-/* 162 */       (char *)NULL,
-/* 163 */       (char *)NULL,
-/* 164 */       (char *)NULL,
-/* 165 */       (char *)NULL,
-/* 166 */       (char *)NULL,
-/* 167 */       (char *)NULL,
-/* 168 */       (char *)NULL,
-/* 169 */       (char *)NULL,
-/* 170 */       (char *)NULL,
-/* 171 */       (char *)NULL,
-/* 172 */       (char *)NULL,
-/* 173 */       (char *)NULL,
-/* 174 */       (char *)NULL,
-/* 175 */       (char *)NULL,
-/* 176 */       (char *)NULL,
-/* 177 */       (char *)NULL,
-/* 178 */       (char *)NULL,
-/* 179 */       (char *)NULL,
-/* 180 */       (char *)NULL,
-/* 181 */       (char *)NULL,
-/* 182 */       (char *)NULL,
-/* 183 */       (char *)NULL,
-/* 184 */       (char *)NULL,
-/* 185 */       (char *)NULL,
-/* 186 */       (char *)NULL,
-/* 187 */       (char *)NULL,
-/* 188 */       (char *)NULL,
-/* 189 */       (char *)NULL,
-/* 190 */       (char *)NULL,
-/* 191 */       (char *)NULL,
-/* 192 */       (char *)NULL,
-/* 193 */       (char *)NULL,
-/* 194 */       (char *)NULL,
-/* 195 */       (char *)NULL,
-/* 196 */       (char *)NULL,
-/* 197 */       (char *)NULL,
-/* 198 */       (char *)NULL,
-/* 199 */       (char *)NULL,
-/* 200 RPL_TRACELINK, */        ":%s 200 %s Link %s%s %s %s",
-/* 201 RPL_TRACECONNECTING, */  ":%s 201 %s Try. %d %s",
-/* 202 RPL_TRACEHANDSHAKE, */   ":%s 202 %s H.S. %d %s",
-/* 203 RPL_TRACEUNKNOWN, */     ":%s 203 %s ???? %d %s (%s) %d",
-/* 204 RPL_TRACEOPERATOR, */    ":%s 204 %s Oper %d %s (%s) %lu %lu",
-/* 205 RPL_TRACEUSER, */        ":%s 205 %s User %d %s (%s) %lu %lu",
-/* 206 RPL_TRACESERVER, */      ":%s 206 %s Serv %d %dS %dC %s %s!%s@%s %lu",
-/* 207 */       (char *)NULL,
-/* 208 RPL_TRACENEWTYPE, */     ":%s 208 %s <newtype> 0 %s",
-/* 209 RPL_TRACECLASS, */       ":%s 209 %s Class %d %d",
-/* 210 */       (char *)NULL,
-/* 211 RPL_STATSLINKINFO, */    (char *)NULL,
-/* 212 RPL_STATSCOMMANDS, */    ":%s 212 %s %s %u %u",
-/* 213 RPL_STATSCLINE, */       ":%s 213 %s %c %s * %s %d %d",
-/* 214 RPL_STATSNLINE, */       ":%s 214 %s %c %s * %s %d %d",
-/* 215 RPL_STATSILINE, */       ":%s 215 %s %c %s * %s@%s %d %d",
-/* 216 RPL_STATSKLINE, */       ":%s 216 %s %c %s * %s %s",
-/* 217 RPL_STATSQLINE, */       ":%s 217 %s %s %s %s@%s",
-/* 218 RPL_STATSYLINE, */       ":%s 218 %s %c %d %d %d %d %lu",
-/* 219 RPL_ENDOFSTATS, */       ":%s 219 %s %c :End of /STATS report",
-/* 220 RPL_STATSPLINE, */       ":%s 220 %s %c %d %s %d :%s",
-/* 221 RPL_UMODEIS, */          ":%s 221 %s %s",
-/* 222 */       (char *)NULL,
-/* 223 */       (char *)NULL,
-/* 224 */       (char *)NULL,
-/* 225 RPL_STATSDLINE*/         ":%s 225 %s %c %s %s",
-/* 226 */       (char *)NULL,
-/* 227 */       (char *)NULL,
-/* 228 */       (char *)NULL,
-/* 229 */       (char *)NULL,
-/* 230 */       (char *)NULL,
-/* 231 */       (char *)NULL,
-/* 232 */       (char *)NULL,
-/* 233 */       (char *)NULL,
-/* 234 RPL_SERVLIST, */ (char *)NULL,
-/* 235 RPL_SERVLISTEND, */ (char *)NULL,
-/* 236 */       (char *)NULL,
-/* 237 */       (char *)NULL,
-/* 238 */       (char *)NULL,
-/* 239 */       (char *)NULL,
-/* 240 */       (char *)NULL,
-/* 241 RPL_STATSLLINE, */       ":%s 241 %s %c %s * %s %d %d",
-/* 242 RPL_STATSUPTIME,*/       ":%s 242 %s :Dianora hasn't messed with the server code now in %d days, %d:%02d:%02d",
-/* 243 RPL_STATSOLINE, */       ":%s 243 %s %c %s@%s * %s %s %d %s",
-/* 244 RPL_STATSHLINE, */       ":%s 244 %s %c %s * %s %d %d", 
-/* 245 RPL_STATSSLINE, */       ":%s 245 %s %c %s * %s %d %d", 
-/* 246 */       (char *)NULL,
-/* 247 RPL_STATSXLINE, */       ":%s 247 %s %s %s * * 0 0",
-
-/* 248 RPL_STATSULINE, */       ":%s 248 %s %s %s",
-/* 249 */       (char *)NULL,
-/* 250 RPL_STATSCONN, */
-                    ":%s 250 %s :Highest connection count: %d (%d clients) (%d since server was (re)started)",
-/* 251 RPL_LUSERCLIENT, */
-                ":%s 251 %s :There are %d users and %d invisible on %d servers",
-/* 252 RPL_LUSEROP, */          ":%s 252 %s %d :Smurf Targets (IRC Operators) online",
-/* 253 RPL_LUSERUNKNOWN, */     ":%s 253 %s %d :unknown connection(s)",
-/* 254 RPL_LUSERCHANNELS, */    ":%s 254 %s %d :channels formed",
-/* 255 RPL_LUSERME, */          ":%s 255 %s :I have %d clients and %d servers",
-/* 256 RPL_ADMINME, */          ":%s 256 %s :Administrative info about %s",
-/* 257 RPL_ADMINLOC1, */        ":%s 257 %s :%s",
-/* 258 RPL_ADMINLOC2, */        ":%s 258 %s :%s",
-/* 259 RPL_ADMINEMAIL, */       ":%s 259 %s :%s",
-/* 260 */       (char *)NULL,
-/* 261 RPL_TRACELOG, */         ":%s 261 %s File %s %d",
-/* 262 RPL_ENDOFTRACE, */       ":%s 262 %s %s :End of TRACE",
-/* 263 RPL_LOAD2HI, */
-":%s 263 %s :Hold your horses... the server load is temporarily too heavy. Try again later, ok?",
-/* 264 */       (char *)NULL,
-/* 265 RPL_LOCALUSERS, */       ":%s 265 %s :Current local  users: %d  Max: %d",
-/* 266 RPL_GLOBALUSERS, */      ":%s 266 %s :Current global users: %d  Max: %d",
-/* 267 */       (char *)NULL,
-/* 268 */       (char *)NULL,
-/* 269 */       (char *)NULL,
-/* 270 */       (char *)NULL,
-/* 271 */       (char *)NULL,
-/* 272 */       (char *)NULL,
-/* 273 */       (char *)NULL,
-/* 274 */       (char *)NULL,
-/* 275 */       (char *)NULL,
-/* 276 */       (char *)NULL,
-/* 277 */       (char *)NULL,
-/* 278 */       (char *)NULL,
-/* 279 */       (char *)NULL,
-/* 280 */       (char *)NULL,
-/* 281 */       (char *)NULL,
-/* 281 */       (char *)NULL,
-/* 282 */       (char *)NULL,
-/* 283 */       (char *)NULL,
-/* 284 */       (char *)NULL,
-/* 285 */       (char *)NULL,
-/* 286 */       (char *)NULL,
-/* 287 */       (char *)NULL,
-/* 288 */       (char *)NULL,
-/* 289 */       (char *)NULL,
-/* 290 */       (char *)NULL,
-/* 291 */       (char *)NULL,
-/* 292 */       (char *)NULL,
-/* 293 */       (char *)NULL,
-/* 294 */       (char *)NULL,
-/* 295 */       (char *)NULL,
-/* 296 */       (char *)NULL,
-/* 298 */       (char *)NULL,
-/* 299 */       (char *)NULL,
-/* 300 RPL_NONE, */     (char *)NULL,
-/* 301 RPL_AWAY, */     ":%s 301 %s %s :%s",
-/* 302 RPL_USERHOST, */  ":%s 302 %s :%s",
-/* 303 RPL_ISON, */     ":%s 303 %s :",
-/* 304 RPL_TEXT, */      (char *)NULL,
-/* 305 RPL_UNAWAY, */   ":%s 305 %s :OK, you're not /away anymore. Did you have fun?",
-/* 306 RPL_NOWAWAY, */  ":%s 306 %s :OK, you're /away now. Hurry back!",
-/* 307 */       (char *)NULL,
-/* 308 */       (char *)NULL,
-/* 309 */       (char *)NULL,
-/* 310 */       (char *)NULL,
-/* 311 RPL_WHOISUSER, */        ":%s 311 %s %s %s %s * :%s",
-/* 312 RPL_WHOISSERVER, */      ":%s 312 %s %s %s :%s",
-/* 313 RPL_WHOISOPERATOR, */    ":%s 313 %s %s :is a Smurf Target (IRC Operator)",
-/* 314 RPL_WHOWASUSER, */       ":%s 314 %s %s %s %s * :%s",
-/* 315 RPL_ENDOFWHO, */         ":%s 315 %s %s :End of /WHO list.",
-/* 316 RPL_WHOISCHANOP, */      (char *)NULL,
-/* 317 RPL_WHOISIDLE, */        ":%s 317 %s %s %d %d :seconds idle, signon time",
-/* 318 RPL_ENDOFWHOIS, */       ":%s 318 %s %s :End of /WHOIS list.",
-/* 319 RPL_WHOISCHANNELS, */    ":%s 319 %s %s :%s",
-/* 320 */       (char *)NULL,
-/* 321 RPL_LISTSTART, */        ":%s 321 %s Channel :Users  Name",
-/* 322 RPL_LIST, */             ":%s 322 %s %s %d :%s",
-/* 323 RPL_LISTEND, */          ":%s 323 %s :End of /LIST",
-/* 324 RPL_CHANNELMODEIS, */    ":%s 324 %s %s %s %s",
-/* 325 */       (char *)NULL,
-/* 326 */       (char *)NULL,
-/* 327 */       (char *)NULL,
-/* 328 */       (char *)NULL,
-/* 329 RPL_CREATIONTIME, */      ":%s 329 %s %s %lu", 
-/* 330 */       (char *)NULL,
-/* 331 RPL_NOTOPIC, */          ":%s 331 %s %s :No topic is set.",
-/* 332 RPL_TOPIC, */            ":%s 332 %s %s :%s",
-#ifdef TOPIC_INFO
-/* 333 RPL_TOPICWHOTIME, */     ":%s 333 %s %s %s %lu",
-#else
-/* 333 */       (char *)NULL,
-#endif
-/* 334 */       (char *)NULL,
-/* 335 */       (char *)NULL,
-/* 336 */       (char *)NULL,
-/* 337 */       (char *)NULL,
-/* 338 */       (char *)NULL,
-/* 339 */       (char *)NULL,
-/* 340 */       (char *)NULL,
-/* 341 RPL_INVITING, */         ":%s 341 %s %s %s",
-/* 342 RPL_SUMMONING, */ (char *)NULL,
-/* 343 */       (char *)NULL,
-/* 344 */       (char *)NULL,
-/* 345 */       (char *)NULL,
-/* 346 */       (char *)NULL,
-/* 347 */       (char *)NULL,
-#ifdef BAN_INFO
-/* 348 RPL_EXCEPTLIST */        ":%s 348 %s %s %s %s %lu",
-#else
-/* 348 RPL_EXCEPTLIST */        ":%s 348 %s %s %s",
-#endif
-/* 349 RPL_ENDOFEXCEPTLIST */   ":%s 349 %s %s :End of Channel Exception List",
-/* 350 */       (char *)NULL,
-/* 351 RPL_VERSION, */          ":%s 351 %s %s(%s).%s %s :%s",
-/* 352 RPL_WHOREPLY, */         ":%s 352 %s %s %s %s %s %s %s :%d %s",
-/* 353 RPL_NAMREPLY, */         ":%s 353 %s %s",
-/* 354 */       (char *)NULL,
-/* 355 */       (char *)NULL,
-/* 356 */       (char *)NULL,
-/* 357 */       (char *)NULL,
-/* 358 */       (char *)NULL,
-/* 359 */       (char *)NULL,
-/* 360 */       (char *)NULL,
-/* 361 RPL_KILLDONE, */ (char *)NULL,
-/* 362 RPL_CLOSING, */          ":%s 362 %s %s :Closed. Status = %d",
-/* 363 RPL_CLOSEEND, */         ":%s 363 %s %d: Connections Closed",
-/* 364 RPL_LINKS, */            ":%s 364 %s %s %s :%d %s",
-/* 365 RPL_ENDOFLINKS, */       ":%s 365 %s %s :End of /LINKS list.",
-/* 366 RPL_ENDOFNAMES, */       ":%s 366 %s %s :End of /NAMES list.",
-#ifdef BAN_INFO
-/* 367 RPL_BANLIST, */          ":%s 367 %s %s %s %s %lu",
-#else
-/* 367 RPL_BANLIST, */          ":%s 367 %s %s %s",
-#endif
-/* 368 RPL_ENDOFBANLIST, */     ":%s 368 %s %s :End of Channel Ban List",
-/* 369 RPL_ENDOFWHOWAS, */      ":%s 369 %s %s :End of WHOWAS",
-/* 370 */       (char *)NULL,
-/* 371 RPL_INFO, */             ":%s 371 %s :%s",
-/* 372 RPL_MOTD, */             ":%s 372 %s :- %s",
-/* 373 RPL_INFOSTART, */        ":%s 373 %s :Server INFO",
-/* 374 RPL_ENDOFINFO, */        ":%s 374 %s :End of /INFO list.",
-/* 375 RPL_MOTDSTART, */        ":%s 375 %s :- %s Message of the Day - ",
-/* 376 RPL_ENDOFMOTD, */        ":%s 376 %s :End of /MOTD command.",
-/* 377 */       (char *)NULL,
-/* 378 */       (char *)NULL,
-/* 379 */       (char *)NULL,
-/* 380 */       (char *)NULL,
-/* 381 RPL_YOUREOPER, */        ":%s 381 %s :You are now one bad motherfucker - Go /kill someone.",
-/* 382 RPL_REHASHING, */        ":%s 382 %s %s :it slices, dices, and even reloads config files! Rehashing config file, mang.",
-/* 383 */       (char *)NULL,
-/* 384 RPL_MYPORTIS, */         ":%s 384 %s %d :Port to local server is\r\n",
-/* 385 RPL_NOTOPERANYMORE, */   (char *)NULL,
-/* 386 */       (char *)NULL,
-/* 387 */       (char *)NULL,
-/* 388 */       (char *)NULL,
-/* 389 */       (char *)NULL,
-/* 390 */       (char *)NULL,
-/* 391 RPL_TIME, */             ":%s 391 %s %s :%s",
-/* 392 */       (char *)NULL,
-/* 393 */       (char *)NULL,
-/* 394 */       (char *)NULL,
-/* 395 */       (char *)NULL,
-/* 396 */       (char *)NULL,
-/* 397 */       (char *)NULL,
-/* 398 */       (char *)NULL,
-/* 399 */       (char *)NULL,
-/* 400 */       (char *)NULL,
-/* 401 ERR_NOSUCHNICK, */       ":%s 401 %s %s :No such nick/channel",
-/* 402 ERR_NOSUCHSERVER, */     ":%s 402 %s %s :No such server",
-/* 403 ERR_NOSUCHCHANNEL, */    ":%s 403 %s %s :No such channel",
-/* 404 ERR_CANNOTSENDTOCHAN, */ ":%s 404 %s %s :Cannot send to channel",
-/* 405 ERR_TOOMANYCHANNELS, */  ":%s 405 %s %s :You have joined too many channels",
-/* 406 ERR_WASNOSUCHNICK, */    ":%s 406 %s %s :There was no such nickname",
-/* 407 ERR_TOOMANYTARGETS, */
-                ":%s 407 %s %s :Too many recipients. Only %d processed",
-/* 408 */       (char *)NULL,
-/* 409 ERR_NOORIGIN, */         ":%s 409 %s :No origin specified",
-/* 410 */       (char *)NULL,
-/* 411 ERR_NORECIPIENT, */      ":%s 411 %s :No recipient given (%s)",
-/* 412 ERR_NOTEXTTOSEND, */     ":%s 412 %s :No text to send",
-/* 413 ERR_NOTOPLEVEL, */       ":%s 413 %s %s :No toplevel domain specified",
-/* 414 ERR_WILDTOPLEVEL, */     ":%s 414 %s %s :Wildcard in toplevel Domain",
-/* 415 */       (char *)NULL,
-/* 416 */       (char *)NULL,
-/* 417 */       (char *)NULL,
-/* 418 */       (char *)NULL,
-/* 419 */       (char *)NULL,
-/* 420 */       (char *)NULL,
-/* 421 ERR_UNKNOWNCOMMAND, */   ":%s 421 %s %s :Unknown command",
-/* 422 ERR_NOMOTD, */           ":%s 422 %s :MOTD File is missing",
-/* 423 ERR_NOADMININFO, */
-                ":%s 423 %s %s :No administrative info available",
-/* 424 ERR_FILEERROR, */        ":%s 424 %s :File error doing %s on %s",
-/* 425 */       (char *)NULL,
-/* 426 */       (char *)NULL,
-/* 427 */       (char *)NULL,
-/* 428 */       (char *)NULL,
-/* 429 */       (char *)NULL,
-/* 430 */       (char *)NULL,
-/* 431 ERR_NONICKNAMEGIVEN, */  ":%s 431 %s :No nickname given",
-/* 432 ERR_ERRONEUSNICKNAME, */ ":%s 432 %s %s :Erroneus Nickname",
-/* 433 ERR_NICKNAMEINUSE, */    ":%s 433 %s %s :Nickname is already in use.",
-/* 434 */       (char *)NULL,
-/* 435 */       (char *)NULL,
-/* 436 ERR_NICKCOLLISION, */    ":%s 436 %s %s :Nickname collision KILL",
-/* 437 ERR_NOTAVAILABLE, */     ":%s 437 %s %s :Nick/channel is temporarily unavailable",
-/* 438 */       (char *)NULL,
-/* 439 */       (char *)NULL,
-/* 440 */       (char *)NULL,
-/* 441 ERR_USERNOTINCHANNEL, */ ":%s 441 %s %s %s :They aren't on that channel",
-/* 442 ERR_NOTONCHANNEL, */     ":%s 442 %s %s :You're not on that channel",
-/* 443 ERR_USERONCHANNEL, */    ":%s 443 %s %s %s :is already on channel",
-/* 444 ERR_NOLOGIN, */          ":%s 444 %s %s :User not logged in",
-/* 445 ERR_SUMMONDISABLED, */   ":%s 445 %s :SUMMON has been removed",
-/* 446 ERR_USERSDISABLED, */    ":%s 446 %s :USERS has been removed",
-/* 447 */       (char *)NULL,
-/* 448 */       (char *)NULL,
-/* 449 */       (char *)NULL,
-/* 450 */       (char *)NULL,
-/* 451 ERR_NOTREGISTERED, */    ":%s 451 %s :You have not registered",
-/* 452 */       (char *)NULL,
-/* 453 */       (char *)NULL,
-/* 454 */       (char *)NULL,
-/* 455 */       (char *)NULL,
-/* 456 */       (char *)NULL,
-/* 457 */       (char *)NULL,
-/* 458 */       (char *)NULL,
-/* 459 */       (char *)NULL,
-/* 460 */       (char *)NULL,
-/* 461 ERR_NEEDMOREPARAMS, */   ":%s 461 %s %s :Not enough parameters",
-/* 462 ERR_ALREADYREGISTRED, */ ":%s 462 %s :You may not reregister",
-/* 463 ERR_NOPERMFORHOST, */    ":%s 463 %s :Your host isn't among the privileged",
-/* 464 ERR_PASSWDMISMATCH, */   ":%s 464 %s :BZZT!! Wrong password, homez. Are you sure you know what you're doing??",
-/* 465 ERR_YOUREBANNEDCREEP, */ ":%s 465 %s :You are banned from this server- %s",
-/* 466 ERR_YOUWILLBEBANNED, */  (char *)NULL,
-/* 467 ERR_KEYSET, */           ":%s 467 %s %s :Channel key already set",
-/* 468 */       (char *)NULL,
-/* 469 */       (char *)NULL,
-/* 470 */       (char *)NULL,
-/* 471 ERR_CHANNELISFULL, */    ":%s 471 %s %s :Cannot join channel (+l)",
-/* 472 ERR_UNKNOWNMODE  , */    ":%s 472 %s %c :is unknown mode char to me",
-/* 473 ERR_INVITEONLYCHAN, */   ":%s 473 %s %s :Cannot join channel (+i)",
-/* 474 ERR_BANNEDFROMCHAN, */   ":%s 474 %s %s :Cannot join channel (+b)",
-/* 475 ERR_BADCHANNELKEY, */    ":%s 475 %s %s :Cannot join channel (+k)",
-/* 476 ERR_BADCHANMASK, */      ":%s 476 %s %s :Bad Channel Mask",
-/* 477 ERR_MODELESS, */         ":%s 477 %s %s :Channel does not support modes",
-/* 478 ERR_BANLISTFULL, */      ":%s 478 %s %s %s :Channel ban list is full",
-/* 479 ERR_BADCHANNAME */       ":%s 479 %s %s :Illegal channel name",
-/* 480 */	(char *)NULL,
-/* 481 ERR_NOPRIVILEGES, */
-                ":%s 481 %s :I don't THINK so, homez... you ain't got what it takes. (IRC operator)",
-/* 482 ERR_CHANOPRIVSNEEDED, */ ":%s 482 %s %s :You can't do that thing, when you don't have that swing (You're not channel operator)",
-/* 483 ERR_CANTKILLSERVER, */    ":%s 483 %s :Don't be an idiot - you can't kill a SERVER, fool.",
-/* 484 */       (char *)NULL,
-/* 485 */       (char *)NULL,
-/* 486 */       (char *)NULL,
-/* 487 */       (char *)NULL,
-/* 488 */       (char *)NULL,
-/* 489 */       (char *)NULL,
-/* 490 */       (char *)NULL,
-/* 491 ERR_NOOPERHOST, */       ":%s 491 %s :Sorry, you just don't have what it takes to be an IRC Operator here.",
-/* 492 */       (char *)NULL,
-/* 493 */       (char *)NULL,
-/* 494 */       (char *)NULL,
-/* 495 */       (char *)NULL,
-/* 496 */       (char *)NULL,
-/* 497 */       (char *)NULL,
-/* 498 */       (char *)NULL,
-/* 499 */       (char *)NULL,
-/* 500 */       (char *)NULL,
-/* 501 ERR_UMODEUNKNOWNFLAG, */ ":%s 501 %s :Unknown MODE flag",
-/* 502 ERR_USERSDONTMATCH, */   ":%s 502 %s :Can't change mode for other users",
-/* 503 ERR_GHOSTEDCLIENT, */    ":%s 503 %s :Message could not be delivered to %s",
-/* 504 LAST ERR_LAST_ERR_MSG, */        ":%s 504 %s :Last Error Message",
-                (char *)NULL
-};
-
-
diff -uNrd ircd-hybrid-6.0/src/motd.c ircd-pi1.0a/src/motd.c
--- ircd-hybrid-6.0/src/motd.c	Wed Aug 25 18:58:22 1999
+++ ircd-pi1.0a/src/motd.c	Fri Nov  2 19:23:36 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: motd.c,v 1.22 1999/08/25 22:58:22 lusky Exp $
+ *   $Id: motd.c,v 1.1.1.1 2001/11/03 00:23:36 shifty Exp $
  */
 #include "motd.h"
 #include "ircd.h"
diff -uNrd ircd-hybrid-6.0/src/mtrie_conf.c ircd-pi1.0a/src/mtrie_conf.c
--- ircd-hybrid-6.0/src/mtrie_conf.c	Fri Dec  1 01:28:49 2000
+++ ircd-pi1.0a/src/mtrie_conf.c	Fri May 10 23:49:05 2002
@@ -43,7 +43,7 @@
  *
  * Diane Bruce -db (db@db.net)
  *
- * $Id: mtrie_conf.c,v 1.71 2000/12/01 06:28:49 lusky Exp $
+ * $Id: mtrie_conf.c,v 1.2 2002/05/11 03:49:05 smoli Exp $
  */
 #include "mtrie_conf.h"
 #include "class.h"
@@ -1151,7 +1151,7 @@
   int two_letter_tld = 0;
   char tokenized_host[HOSTLEN+1];
 
-  if (strlen(host) > (size_t) HOSTLEN)
+  if (irclen(host) > (size_t) HOSTLEN)
     return;
 
   if(is_address(host,&ip_host,&ip_mask))
diff -uNrd ircd-hybrid-6.0/src/noarch/Makefile.in ircd-pi1.0a/src/noarch/Makefile.in
--- ircd-hybrid-6.0/src/noarch/Makefile.in	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/noarch/Makefile.in	Fri May 10 21:30:44 2002
@@ -0,0 +1,245 @@
+# Makefile.in generated by automake 1.6.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+ASM = @ASM@
+AWK = @AWK@
+CC = @CC@
+HUB = @HUB@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IRCDDIR = @IRCDDIR@
+NASM = @NASM@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SSL = @SSL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+lib_LIBRARIES = libircasm.a
+bin_PROGRAMS = asmtest
+libircasm_a_SOURCES = irccmp.c irclen.c ircncmp.c
+asmtest_SOURCES = asmtest.c
+subdir = src/noarch
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/setup.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
+PROGRAMS = $(bin_PROGRAMS)
+
+libircasm_a_AR = $(AR) cru
+libircasm_a_LIBADD =
+libircasm_a_OBJECTS = irccmp.$(OBJEXT) irclen.$(OBJEXT) ircncmp.$(OBJEXT)
+asmtest_LIBADD = libircasm.a
+asmtest_OBJECTS = asmtest.o
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I$(top_builddir)/include
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+COMPILE = $(CC) $(DEFAULT_INCLUDES) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(libircasm_a_SOURCES) $(asmtest_SOURCES)
+DIST_COMMON = Makefile.in
+SOURCES = $(libircasm_a_SOURCES) $(asmtest_SOURCES)
+
+all: Makefile $(LIBRARIES) $(PROGRAMS)
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+AR = ar
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+libircasm.a: $(libircasm_a_OBJECTS)
+	-rm -f libircasm.a
+	$(libircasm_a_AR) libircasm.a $(libircasm_a_OBJECTS)
+	$(RANLIB) libircasm.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core *~
+
+distclean-compile:
+	-rm -f *.tab.c
+
+asmtest: asmtest.c $(LIBRARIES)
+	$(COMPILE) -o $@ $^ $(asmtest_LIBADD)
+
+.c.o:
+	$(COMPILE) -funroll-loops -c $< 
+
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check: all
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+
+install:
+install-exec:
+install-data:
+uninstall:
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-generic clean-libLIBRARIES clean-binPROGRAMS mostlyclean
+
+distclean: clean distclean-compile \
+	distclean-generic distclean-tags
+
+dvi:
+
+info:
+
+install-man:
+
+maintainer-clean: distclean maintainer-clean-generic
+
+mostlyclean: mostlyclean-compile mostlyclean-generic
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/src/noarch/asmtest.c ircd-pi1.0a/src/noarch/asmtest.c
--- ircd-hybrid-6.0/src/noarch/asmtest.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/noarch/asmtest.c	Fri May 10 23:49:09 2002
@@ -0,0 +1,57 @@
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include "irc_string.h"
+
+struct timezone tz = { 0, 0 };
+unsigned long stamp = 0;
+struct timeval tv;
+
+void profile_start()
+{
+  gettimeofday(&tv, &tz);
+  stamp = tv.tv_usec + tv.tv_sec * 1000000;
+}
+
+void profile_end(const char *function, const void *buf, unsigned long size, unsigned long bytes)
+{
+  unsigned long current;
+  unsigned long delta;
+  
+  gettimeofday(&tv, &tz);
+  current = tv.tv_usec + tv.tv_sec * 1000000;
+  delta = current - stamp;
+  
+  fprintf(stderr, "function: %s buf: %p size: %lu retval: %lu time: %lu usecs\n",
+          function, buf, size, bytes, delta);
+}
+
+int main()
+{
+  FILE *f;
+  char buf[131072];
+  char buf2[131072];
+  int l1, l2;
+  
+  f = fopen("/etc/services", "r");
+  
+  l1 = fread(buf, 100000, 1, f);
+  rewind(f);
+  fread(buf2, 100000, 1, f);
+  
+  profile_start();
+  l2 = irclen(&buf[1]);
+  profile_end("irclen()", buf, l1, l2);
+
+  profile_start();
+  l2 = irccmp(&buf[1], &buf2[1]);
+  profile_end("irccmp()", buf2, l1, l2);
+
+  profile_start();
+  l2 = ircncmp(&buf[1], &buf2[1], 1000000);
+  profile_end("ircncmp()", buf2, l1, l2);
+
+  printf("%d %d\n", !irccmp("TESTLINE", ""), strcmp("TESTLINE", ""));
+  return 0;
+}
diff -uNrd ircd-hybrid-6.0/src/noarch/irccmp.c ircd-pi1.0a/src/noarch/irccmp.c
--- ircd-hybrid-6.0/src/noarch/irccmp.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/noarch/irccmp.c	Sun May 19 00:27:48 2002
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <assert.h>
+
+#include "irc_string.h"
+
+int irccmp(const char *s1, const char *s2)
+{
+  const unsigned char* str1 = (const unsigned char*) s1;
+  const unsigned char* str2 = (const unsigned char*) s2;
+  int res;
+  
+  while((res = (to_upper(*str1)) - (to_upper(*str2))) == 0)
+    {
+      if (*str1 == '\0')
+        return 0;
+      str1++;
+      str2++;
+    }
+  
+  return (res);
+}
+
diff -uNrd ircd-hybrid-6.0/src/noarch/irclen.c ircd-pi1.0a/src/noarch/irclen.c
--- ircd-hybrid-6.0/src/noarch/irclen.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/noarch/irclen.c	Fri May 10 21:30:44 2002
@@ -0,0 +1,13 @@
+#include "irc_string.h"
+
+size_t irclen(const char *s)
+{
+  register const char *x = s;
+  register size_t len = 0;
+  
+  while(*x++ != '\0')
+    len++;
+  
+  return len;
+}
+
diff -uNrd ircd-hybrid-6.0/src/noarch/ircncmp.c ircd-pi1.0a/src/noarch/ircncmp.c
--- ircd-hybrid-6.0/src/noarch/ircncmp.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/noarch/ircncmp.c	Fri May 10 21:30:44 2002
@@ -0,0 +1,22 @@
+#include <assert.h>
+#include "irc_string.h"
+
+int ircncmp(const char* s1, const char *s2, int n)
+{
+  const unsigned char* str1 = (const unsigned char*) s1;
+  const unsigned char* str2 = (const unsigned char*) s2;
+  int res;
+/*  assert(0 != s1);
+  assert(0 != s2);*/
+
+  while((res = to_upper(*str1) - to_upper(*str2)) == 0)
+    {
+      str1++; str2++; n--;
+    
+      if(n == 0 || (*str1 == '\0' && *str2 == '\0'))
+        return 0;
+    }
+  
+  return (res);
+}
+
diff -uNrd ircd-hybrid-6.0/src/numeric.c ircd-pi1.0a/src/numeric.c
--- ircd-hybrid-6.0/src/numeric.c	Wed Jul 28 18:27:46 1999
+++ ircd-pi1.0a/src/numeric.c	Fri May 10 01:32:24 2002
@@ -19,19 +19,16 @@
  *
  *      I kind of modernized this code a bit. -Dianora
  *
- *   $Id: numeric.c,v 1.3 1999/07/28 22:27:46 tomh Exp $
+ *   $Id: numeric.c,v 1.2 2002/05/10 05:32:24 smoli Exp $
  */
 #include "numeric.h"
 #include "irc_string.h"
 #include "common.h"     /* NULL cripes */
+#include "config.h"
 
 #include <assert.h>
 
-#ifdef CUSTOM_ERR            /* ZZZZ ick */
-#include "messages_cust.tab"
-#else
 #include "messages.tab"
-#endif
 
 
 /*
diff -uNrd ircd-hybrid-6.0/src/oratime.c ircd-pi1.0a/src/oratime.c
--- ircd-hybrid-6.0/src/oratime.c	Sat Nov 18 14:11:13 2000
+++ ircd-pi1.0a/src/oratime.c	Wed Dec 31 19:00:00 1969
@@ -1,68 +0,0 @@
-/************************************************************************
- *   IRC - Internet Relay Chat, src/oratime.c
- *   Copyright (C) 1990 Jarkko Oikarinen and
- *                      University of Oulu, Computing Center
- *
- *   See file AUTHORS in IRC package for additional names of
- *   the programmers. 
- *
- *   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: oratime.c,v 1.3 2000/11/18 19:11:13 lusky Exp $
- */
-#include "oratime.h"
-#ifdef ORATIMING
-
-#include "client.h"
-#include "send.h"
-
-#include <sys/time.h>
-
-static struct timeval tsdnow;
-static struct timeval tsdthen;
-static unsigned int   tsdms;
-
-/*
- * Timing stuff (for performance measurements): compile with -DORATIMING
- *   and put a TMRESET where you want the counter of time spent set to 0,
- *  a TMPRINT where you want the accumulated results, and TMYES/TMNO pairs
- *  around the parts you want timed -orabidoo
- */
-void orat_reset(void)
-{
-  tsdms = 0;
-}
-
-void orat_yes(void)
-{
-  gettimeofday(&tsdthen, 0);
-}
-
-void orat_no(void)
-{
-  gettimeofday(&tsdnow, 0); 
-  if (tsdnow.tv_sec != tsdthen.tv_sec) 
-    tsdms += 1000000 * (tsdnow.tv_sec - tsdthen.tv_sec); 
-  tsdms += tsdnow.tv_usec;
-  tsdms -= tsdthen.tv_usec;
-}
-
-void orat_report(void)
-{
-  sendto_realops("Time spent: %ld ms", tsdms);
-}
-
-#endif /* ORATIMING */
-
diff -uNrd ircd-hybrid-6.0/src/packet.c ircd-pi1.0a/src/packet.c
--- ircd-hybrid-6.0/src/packet.c	Fri Sep 10 00:54:19 1999
+++ ircd-pi1.0a/src/packet.c	Fri May 10 23:49:05 2002
@@ -18,7 +18,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- *   $Id: packet.c,v 1.23 1999/09/10 04:54:19 lusky Exp $
+ *   $Id: packet.c,v 1.5 2002/05/11 03:49:05 smoli Exp $
  */ 
 #include "packet.h"
 #include "client.h"
@@ -31,6 +31,7 @@
 #include "irc_string.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
 ** dopacket
@@ -253,7 +254,7 @@
   assert(0 != buffer);
 
   strncpy_irc(cptr->buffer, buffer, BUFSIZE);
-  length = strlen(cptr->buffer); 
+  length = irclen(cptr->buffer); 
 
   /* 
    * Update messages received
diff -uNrd ircd-hybrid-6.0/src/parse.c ircd-pi1.0a/src/parse.c
--- ircd-hybrid-6.0/src/parse.c	Fri Nov 24 13:24:37 2000
+++ ircd-pi1.0a/src/parse.c	Fri May 10 23:49:05 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: parse.c,v 1.42 2000/11/24 18:24:37 lusky Exp $
+ *   $Id: parse.c,v 1.4 2002/05/11 03:49:05 smoli Exp $
  */
 #include "parse.h"
 #include "channel.h"
@@ -395,10 +395,10 @@
   int c, c2, lp;
   MESSAGE_TREE *mtree1;
 
-  lp = strlen(prefix);
+  lp = irclen(prefix);
   if (!lp || !strncmp(mptr->cmd, prefix, lp))
     {
-      if (!mptr[1].cmd || (lp && strncmp(mptr[1].cmd, prefix, lp)))
+      if(!mptr[1].cmd || (lp && strncmp(mptr[1].cmd, prefix, lp)))
         {
           /* non ambiguous -> make a final case */
           mtree->final = mptr->cmd + lp;
@@ -410,7 +410,7 @@
       else
         {
           /* ambigous -> make new entries for each of the letters that match */
-          if (!irccmp(mptr->cmd, prefix))
+          if(!strcmp(mptr->cmd, prefix))
             {
               /* fucking OPERWALL blows me */
               mtree->final = (void *)1;
@@ -649,14 +649,23 @@
   aChannel *chptr;
   char  *nick, *p;
   int   i;
-
+#ifdef HAVE_SSL
+  int num = atoi(numeric);
+#endif
+  
   if (parc < 1 || !IsServer(sptr))
     return 0;
-
+  
   /* Remap low number numerics. */
   if(numeric[0] == '0')
     numeric[0] = '1';
 
+#ifdef HAVE_SSL
+  if(!IsSSL(cptr) && num == RPL_WHOISSSL)
+    return 0;                     /* ignore RPL_WHOISSSL which comes from
+                                   * unencrypted link */
+#endif
+  
   /*
   ** Prepare the parameter portion of the message into 'buffer'.
   ** (Because the buffer is twice as large as the message buffer
@@ -690,6 +699,11 @@
           ** with numerics which can happen with nick collisions.
           ** - Avalon
           */
+#ifdef HAVE_SSL
+          if(num == RPL_WHOISSSL && MyClient(acptr) && !IsSSL(acptr))
+            return 0;       /* ignore RPL_WHOISSSL which goes to unencrypted client */
+#endif          
+          
           if (!IsMe(acptr) && IsPerson(acptr))
             sendto_prefix_one(acptr, sptr,":%s %s %s%s",
                               parv[0], numeric, nick, buffer);
diff -uNrd ircd-hybrid-6.0/src/res.c ircd-pi1.0a/src/res.c
--- ircd-hybrid-6.0/src/res.c	Fri Nov 24 13:24:37 2000
+++ ircd-pi1.0a/src/res.c	Fri May 10 23:49:05 2002
@@ -4,7 +4,7 @@
  * shape or form. The author takes no responsibility for any damage or loss
  * of property which results from the use of this software.
  *
- * $Id: res.c,v 1.54 2000/11/24 18:24:37 lusky Exp $
+ * $Id: res.c,v 1.2 2002/05/11 03:49:05 smoli Exp $
  *
  * July 1999 - Rewrote a bunch of stuff here. Change hostent builder code,
  *     added callbacks and reference counting of returned hostents.
@@ -382,8 +382,8 @@
       init_resolver();
 #endif 
     if (_res.defdname[0]) {
-      size_t len = strlen(hname);
-      if ((strlen(_res.defdname) + len + 2) < size) {
+      size_t len = irclen(hname);
+      if ((irclen(_res.defdname) + len + 2) < size) {
         hname[len++] = '.';
         strcpy(hname + len, _res.defdname);
       }
@@ -669,7 +669,7 @@
   if (!request) {
     request       = make_request(query);
     request->type = T_A;
-    request->name = (char*) MyMalloc(strlen(hname) + 1);
+    request->name = (char*) MyMalloc(irclen(hname) + 1);
     strcpy(request->name, hname);
   }
   query_name(hname, C_IN, T_A, request);
@@ -841,10 +841,10 @@
    */
   if (alias_count > 0) {
     name = hp->h_aliases[alias_count - 1];
-    name += (strlen(name) + 1);
+    name += (irclen(name) + 1);
   }
   else if (hp->h_name)
-    name = hp->h_name + strlen(hp->h_name) + 1;
+    name = hp->h_name + irclen(hp->h_name) + 1;
   else
     name = request->he.buf + ADDRS_OFFSET + ADDRS_DLEN;
  
@@ -920,7 +920,7 @@
         if (!hp->h_name) {
           strcpy(name, hostbuf);
           hp->h_name = name;
-          name += strlen(name) + 1;
+          name += irclen(name) + 1;
         }
         Debug((DEBUG_INFO,"got ip # %s for %s", 
               inetntoa((char*) hp->h_addr_list[addr_count - 1]), hostbuf));
@@ -962,7 +962,7 @@
       if (!hp->h_name) {
         strcpy(name, hostbuf);
         hp->h_name = name;
-        name += strlen(name) + 1;
+        name += irclen(name) + 1;
       }
       ++answer_count;
       break;
@@ -972,7 +972,7 @@
         strncpy_irc(name, hostbuf, endp - name);
         *alias++ = name;
         *alias   = 0;
-        name += strlen(name) + 1;
+        name += irclen(name) + 1;
       }
       current += rd_length;
       ++answer_count;
@@ -1148,11 +1148,11 @@
   assert(0 != hp);
 
   /* how much buffer do we need? */
-  bytes_needed += (strlen(hp->h_name) + 1);
+  bytes_needed += (irclen(hp->h_name) + 1);
 
   pp = hp->h_aliases;
   while (*pp) {
-    bytes_needed += (strlen(*pp++) + 1 + sizeof(void*));
+    bytes_needed += (irclen(*pp++) + 1 + sizeof(void*));
     ++alias_count;
   }
   pp = hp->h_addr_list;
@@ -1184,7 +1184,7 @@
   /* next write the name */
   new_hp->h.h_name = p;
   strcpy(p, hp->h_name);
-  p += (strlen(p) + 1);
+  p += (irclen(p) + 1);
 
   /* last write the alias list */
   pp = hp->h_aliases;
@@ -1192,7 +1192,7 @@
   while (*pp) {
     *ap++ = p;
     strcpy(p, *pp++);
-    p += (strlen(p) + 1);
+    p += (irclen(p) + 1);
   }
   *ap = 0;
 }
@@ -1214,16 +1214,16 @@
     return -1;
 
   /* how much buffer do we need? */
-  bytes_needed = strlen(hp->h.h_name) + 1;
+  bytes_needed = irclen(hp->h.h_name) + 1;
   pp = hp->h.h_aliases;
   while (*pp) {
-    bytes_needed += (strlen(*pp++) + 1 + sizeof(void*));
+    bytes_needed += (irclen(*pp++) + 1 + sizeof(void*));
     ++alias_count;
   }
   if (alias) {
     pp = alias;
     while (*pp) {
-      bytes_needed += (strlen(*pp++) + 1 + sizeof(void*));
+      bytes_needed += (irclen(*pp++) + 1 + sizeof(void*));
       ++alias_count;
     }
   }
@@ -1267,7 +1267,7 @@
   /* next write the name */
   strcpy(p, hp->h.h_name);
   hp->h.h_name = p;
-  p += (strlen(p) + 1);
+  p += (irclen(p) + 1);
 
   /* last write the alias list */
   pp = hp->h.h_aliases;
@@ -1275,13 +1275,13 @@
   while (*pp) {
     strcpy(p, *pp++);
     *ap++ = p;
-    p += (strlen(p) + 1);
+    p += (irclen(p) + 1);
   }
   if (alias) {
     while (*alias) {
       strcpy(p, *alias++);
       *ap++ = p;
-      p += (strlen(p) + 1);
+      p += (irclen(p) + 1);
     }
   }
   *ap = 0;
@@ -1740,12 +1740,12 @@
     im += sizeof(char *);
     for (i = 0; h->h_aliases[i]; i++) {
       nm += sizeof(char *);
-      nm += strlen(h->h_aliases[i]);
+      nm += irclen(h->h_aliases[i]);
     }
     nm += i - 1;
     nm += sizeof(char *);
     if (h->h_name)
-      nm += strlen(h->h_name);
+      nm += irclen(h->h_name);
   }
   ts = ARES_CACSIZE * sizeof(CacheTable);
   sendto_one(sptr, ":%s %d %s :RES table %d",
diff -uNrd ircd-hybrid-6.0/src/restart.c ircd-pi1.0a/src/restart.c
--- ircd-hybrid-6.0/src/restart.c	Sat Jul 31 04:23:00 1999
+++ ircd-pi1.0a/src/restart.c	Tue May 21 22:14:29 2002
@@ -1,7 +1,7 @@
 /*
  * restart.c
  *
- * $Id: restart.c,v 1.10 1999/07/31 08:23:00 tomh Exp $
+ * $Id: restart.c,v 1.5 2002/05/22 02:14:29 smoli Exp $
  */
 #include "restart.h"
 #include "common.h"
@@ -10,7 +10,9 @@
 #include "struct.h"
 #include "s_debug.h"
 #include "s_log.h"
+#include "config.h"
 
+#include <stdlib.h>
 #include <unistd.h>
 
 /* external var */
@@ -36,7 +38,7 @@
   
   sendto_ops("Aieeeee!!!  Restarting server... memory: %d", get_maxrss());
 
-  log(L_NOTICE, "Restarting server...");
+  log(L_NOTICE, "Restarting server... (SPATH = "SPATH")");
   flush_connections(0);
 
   for (i = 0; i < MAXCONNECTIONS; ++i)
diff -uNrd ircd-hybrid-6.0/src/s_auth.c ircd-pi1.0a/src/s_auth.c
--- ircd-hybrid-6.0/src/s_auth.c	Tue Oct 17 02:20:51 2000
+++ ircd-pi1.0a/src/s_auth.c	Fri May 10 23:49:05 2002
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_auth.c,v 1.46 2000/10/17 06:20:51 lusky Exp $
+ *   $Id: s_auth.c,v 1.6 2002/05/11 03:49:05 smoli Exp $
  *
  * Changes:
  *   July 6, 1999 - Rewrote most of the code here. When a client connects
@@ -40,6 +40,9 @@
 #include "s_stats.h"
 #include "send.h"
 #include "struct.h"
+#ifdef HAVE_SSL
+#include "ssl.h"
+#endif
 
 #include <netdb.h>               /* struct hostent */
 #include <string.h>
@@ -56,6 +59,8 @@
  * a bit different approach
  * this replaces the original sendheader macros
  */
+
+#ifndef HUB
 static struct {
   const char* message;
   size_t      length;
@@ -71,6 +76,7 @@
   { "NOTICE AUTH :*** Your forward and reverse DNS do not match, " \
     "ignoring hostname.\r\n",                              80 }
 };
+#endif
 
 typedef enum {
   REPORT_DO_DNS,
@@ -83,8 +89,25 @@
   REPORT_IP_MISMATCH
 } ReportType;
 
-#define sendheader(c, r) \
-   send((c)->fd, HeaderMessages[(r)].message, HeaderMessages[(r)].length, 0)
+#ifdef HAVE_SSL
+
+#ifndef HUB
+#define sendheader(c, r) if(!IsSSL((c))) \
+                           send((c)->fd, HeaderMessages[(r)].message, \
+                                         HeaderMessages[(r)].length, 0);
+#else
+#define sendheader(c, r);
+#endif
+
+#else
+
+#ifndef HUB
+#define sendheader(c, r) send((c)->fd, HeaderMessages[(r)].message, HeaderMessages[(r)].length, 0)
+#else
+#define sendheader(c, r);
+#endif
+
+#endif
 
 struct AuthRequest* AuthPollList = 0; /* GLOBAL - auth queries pending io */
 
@@ -175,40 +198,52 @@
   struct AuthRequest* auth = (struct AuthRequest*) vptr;
 
   ClearDNSPending(auth);
-  if (reply) {
-    struct hostent* hp = reply->hp;
-    int i;
-    /*
-     * Verify that the host to ip mapping is correct both ways and that
-     * the ip#(s) for the socket is listed for the host.
-     */
-    for (i = 0; hp->h_addr_list[i]; ++i) {
-      if (memcmp(hp->h_addr_list[i], (char*) &auth->client->ip,
-                      sizeof(struct in_addr)) == 0)
-         break;
-    }
-    if (!hp->h_addr_list[i])
-      sendheader(auth->client, REPORT_IP_MISMATCH);
-    else {
-      ++reply->ref_count;
-      auth->client->dns_reply = reply;
-      strncpy_irc(auth->client->host, hp->h_name, HOSTLEN);
-      sendheader(auth->client, REPORT_FIN_DNS);
+  
+  if(reply)
+    {
+      struct hostent* hp = reply->hp;
+      int i;
+      /*
+       * Verify that the host to ip mapping is correct both ways and that
+       * the ip#(s) for the socket is listed for the host.
+       */
+      
+      for(i = 0; hp->h_addr_list[i]; ++i)
+      {
+        if(memcmp(hp->h_addr_list[i], (char*) &auth->client->ip,
+                  sizeof(struct in_addr)) == 0)
+        break;
+      }
+    
+      if(!hp->h_addr_list[i])
+        {
+          sendheader(auth->client, REPORT_IP_MISMATCH); 
+        }
+      else
+        {
+          ++reply->ref_count;
+          auth->client->dns_reply = reply;
+          strncpy_irc(auth->client->host, hp->h_name, HOSTLEN);
+          sendheader(auth->client, REPORT_FIN_DNS);
+        }
     }
-  }
-  else {
+  else
+    {
     /*
      * this should have already been done by s_bsd.c in add_connection
      */
-    strcpy(auth->client->host, auth->client->sockhost);
-    sendheader(auth->client, REPORT_FAIL_DNS);
-  }
+      strcpy(auth->client->host, auth->client->sockhost);
+      sendheader(auth->client, REPORT_FAIL_DNS);
+    }
+  
   auth->client->host[HOSTLEN] = '\0';
-  if (!IsDoingAuth(auth)) {
-    release_auth_client(auth->client);
-    unlink_auth_request(auth, &AuthIncompleteList);
-    free_auth_request(auth);
-  }
+  
+  if(!IsDoingAuth(auth))
+    {
+      release_auth_client(auth->client);
+      unlink_auth_request(auth, &AuthIncompleteList);
+      free_auth_request(auth);
+    }
 }
 
 /*
@@ -481,7 +516,7 @@
              (unsigned int) ntohs(them.sin_port),
              (unsigned int) ntohs(us.sin_port));
 
-  if (send(auth->fd, authbuf, strlen(authbuf), 0) == -1) {
+  if (send(auth->fd, authbuf, irclen(authbuf), 0) == -1) {
     if (EAGAIN == errno)
       return;
     auth_error(auth);
diff -uNrd ircd-hybrid-6.0/src/s_bsd.c ircd-pi1.0a/src/s_bsd.c
--- ircd-hybrid-6.0/src/s_bsd.c	Sat Dec 30 19:12:01 2000
+++ ircd-pi1.0a/src/s_bsd.c	Thu May 23 00:22:22 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: s_bsd.c,v 1.129 2000/12/31 00:12:01 lusky Exp $
+ *  $Id: s_bsd.c,v 1.11 2002/05/23 04:22:22 smoli Exp $
  */
 #include "s_bsd.h"
 #include "class.h"
@@ -41,6 +41,10 @@
 #include "s_zip.h"
 #include "send.h"
 #include "struct.h"
+#include "config.h"
+#ifdef HAVE_SSL
+#include "ssl.h"
+#endif
 
 #ifdef DEBUGMODE
 #include "s_debug.h"
@@ -108,10 +112,19 @@
 void close_all_connections(void)
 {
   int i;
-  for (i = 0; i < MAXCONNECTIONS; ++i) {
-    close(i);
-    local[i] = 0;
-  }
+  struct Listener *l;
+  int is_listen;
+  
+  for(i = 0; i < MAXCONNECTIONS; ++i)
+    {
+      local[i] = NULL;
+      for(is_listen = 0, l = ListenerPollList; l; l = l->next)
+        if(l->fd == i)
+          is_listen++;
+      
+      if(!is_listen)
+        close(i);
+    }
 }
 
 void init_netio(void)
@@ -256,6 +269,32 @@
   return 1;
 }
 
+#ifdef HAVE_SSL
+int set_blocking(int fd)
+{
+#ifdef NBLOCK_SYSV
+  int res = 0;
+  if(ioctl(fd, FIONBIO, &res) == -1)
+    return 0;
+#else
+  int nonb = 0;
+  int res;
+#ifdef NBLOCK_POSIX
+  nonb |= O_NONBLOCK;
+#endif
+#ifdef NBLOCK_BSD
+  nonb |= O_NDELAY;
+#endif
+  res = fcntl(fd, F_GETFL, 0);
+  if(!(res & nonb))
+    return 0;
+  if(res == -1 || fcntl(fd, F_SETFL, res ^ nonb) == -1)
+    return 0;
+#endif
+  return 1;
+}
+#endif
+
 /*
  * deliver_it
  *      Attempt to send a sequence of bytes to the connection.
@@ -278,8 +317,13 @@
 int deliver_it(aClient* cptr, const char* str, int len)
 {
   int   retval;
-
-  retval = send(cptr->fd, str, len, 0);
+  
+  #ifdef HAVE_SSL
+  if(IsSSL(cptr))
+    retval = ssl_write(cptr, str, len);
+  else
+  #endif
+    retval = send(cptr->fd, str, len, 0);
   /*
   ** Convert WOULDBLOCK to a return of "0 bytes moved". This
   ** should occur only if socket was non-blocking. Note, that
@@ -287,28 +331,26 @@
   ** error and errno=EWOULDBLOCK.
   **
   */
-  if (retval < 0 && (errno == EWOULDBLOCK || errno == EAGAIN ||
+  if(retval < 0 && (errno == EWOULDBLOCK || errno == EAGAIN ||
                      errno == ENOBUFS))
     {
       retval = 0;
       cptr->flags |= FLAGS_BLOCKED;
       return(retval);  /* Just get out now... */
     }
-  else if (retval > 0)
-    {
-      cptr->flags &= ~FLAGS_BLOCKED;
-    }
+  else if(retval > 0)
+    cptr->flags &= ~FLAGS_BLOCKED;
 
-  if (retval > 0)
+  if(retval > 0)
     {
       cptr->sendB += retval;
       me.sendB += retval;
-      if (cptr->sendB > 1023)
+      if(cptr->sendB > 1023)
         {
           cptr->sendK += (cptr->sendB >> 10);
           cptr->sendB &= 0x03ff;        /* 2^10 = 1024, 3ff = 1023 */
         }
-      else if (me.sendB > 1023)
+      else if(me.sendB > 1023)
         {
           me.sendK += (me.sendB >> 10);
           me.sendB &= 0x03ff;
@@ -338,7 +380,7 @@
  
   ClearAccess(cptr);
 
-  if ((i = attach_Iline(cptr, username, reason)))
+  if((i = attach_Iline(cptr, username, reason)))
     {
       log(L_INFO, "Access denied: %s[%s]", cptr->name, sockname);
       return i;
@@ -354,19 +396,20 @@
  * Return         TRUE, if successfully completed
  *                FALSE, if failed and ClientExit
  */
-static int completed_connection(struct Client* cptr)
+static int completed_connection(struct Client *cptr)
 {
-  struct ConfItem* c_conf;
-  struct ConfItem* n_conf;
+  struct ConfItem *c_conf;
+  struct ConfItem *n_conf;
 
   c_conf = find_conf_name(cptr->confs, cptr->name, CONF_CONNECT_SERVER);
-  if (!c_conf)
+  if(!c_conf)
     {
       sendto_realops("Lost C-Line for %s", get_client_name(cptr,FALSE));
       return 0;
     }
+  
   n_conf = find_conf_name(cptr->confs, cptr->name, CONF_NOCONNECT_SERVER);
-  if (!n_conf)
+  if(!n_conf)
     {
       sendto_realops("Lost N-Line for %s", get_client_name(cptr,FALSE));
       return 0;
@@ -374,7 +417,37 @@
   
   SetHandshake(cptr);
 
-  if (!EmptyString(c_conf->passwd))
+#ifdef HAVE_SSL
+  if(IsSSL(cptr))
+    {
+      /* 
+       * Now initiate the SSL handshaking sequence.
+       * When it completes immediately, then continue
+       * function (sending pass, etc.)
+       * else set cptr->ssl_isconnecting
+       * Handshake will then be completed on next read event.
+       */
+       
+       sendto_realops_lev(L_DEBUG, "Initiating SSL handshake sequence for %s",
+                          cptr->name);
+      
+       if(ssl_connect(cptr))
+         {  
+           if(errno == EAGAIN)
+             {
+               sendto_realops_lev(L_DEBUG, "Pending SSL handshake for %s",
+                                  cptr->name);
+               errno = 0;
+             }
+           else
+             exit_client(cptr, cptr, &me, "SSL handshake failed.");
+           
+           return 0;
+         }              
+    }
+#endif
+  
+  if(!EmptyString(c_conf->passwd))
     sendto_one(cptr, "PASS %s :TS", c_conf->passwd);
   
   send_capabilities(cptr, (c_conf->flags & CONF_FLAGS_ZIP_LINK));
@@ -400,13 +473,13 @@
    */
   cptr->fd = socket(AF_INET, SOCK_STREAM, 0);
 
-  if (cptr->fd == -1)
+  if(cptr->fd == -1)
     {
       report_error("opening stream socket to server %s:%s", cptr->name, errno);
       return 0;
     }
 
-  if (cptr->fd >= (HARD_FDLIMIT - 10))
+  if(cptr->fd >= (HARD_FDLIMIT - 10))
     {
       sendto_realops("No more connections allowed (%s)", cptr->name);
       return 0;
@@ -427,7 +500,7 @@
    * an already bound socket, different ip# might occur anyway
    * leading to a freezing select() on this side for some time.
    */
-  if (specific_virtual_host)
+  if(specific_virtual_host)
     {
       mysk.sin_addr = vserv.sin_addr;
 
@@ -436,7 +509,7 @@
        * explicitly bind it, it will default to IN_ADDR_ANY and we lose
        * due to the other server not allowing our base IP --smg
        */        
-      if (bind(cptr->fd, (struct sockaddr*) &mysk, sizeof(mysk)))
+      if(bind(cptr->fd, (struct sockaddr*) &mysk, sizeof(mysk)))
         {
           report_error("error binding to local port for %s:%s", 
                        cptr->name, errno);
@@ -453,14 +526,14 @@
   strncpy_irc(cptr->sockhost, inetntoa((const char*) &cptr->ip.s_addr), 
               HOSTIPLEN);
 
-  if (!set_non_blocking(cptr->fd))
+  if(!set_non_blocking(cptr->fd))
     report_error(NONB_ERROR_MSG, get_client_name(cptr, TRUE), errno);
 
-  if (!set_sock_buffers(cptr->fd, READBUF_SIZE))
+  if(!set_sock_buffers(cptr->fd, READBUF_SIZE))
     report_error(SETBUF_ERROR_MSG, get_client_name(cptr, TRUE), errno);
 
-  if (connect(cptr->fd, (struct sockaddr*) &sin, sizeof(sin)) && 
-      errno != EINPROGRESS)
+  if(connect(cptr->fd, (struct sockaddr*) &sin, sizeof(sin)) && 
+     errno != EINPROGRESS)
     {
       int errtmp = errno; /* other system calls may eat errno */
       report_error("Connect to host %s failed: %s",
@@ -500,10 +573,10 @@
    * if this is coming from m_connect, we have just checked this
    * NOTE: aconf should ALWAYS be a valid C:line
    */
-  if ((cptr = find_server(aconf->name)))
+  if((cptr = find_server(aconf->name)))
     {
       sendto_realops("Server %s already present from %s",
-                 aconf->name, get_client_name(cptr, TRUE));
+                     aconf->name, get_client_name(cptr, TRUE));
       if (by && IsPerson(by) && !MyClient(by))
         sendto_one(by, ":%s NOTICE %s :Server %s already present from %s",
                    me.name, by->name, aconf->name,
@@ -536,7 +609,7 @@
     }
   }
   cptr = make_client(NULL);
-  if (reply) 
+  if(reply) 
     ++reply->ref_count;
   cptr->dns_reply = reply;
   
@@ -561,11 +634,11 @@
    * Attach config entries to client here rather than in
    * completed_connection. This to avoid null pointer references
    */
-  if (!attach_cn_lines(cptr, aconf->host))
+   if(!attach_cn_lines(cptr, aconf->host))
     {
       sendto_realops("Host %s is not enabled for connecting:no C/N-line",
                  aconf->host);
-      if (by && IsPerson(by) && !MyClient(by))
+      if(by && IsPerson(by) && !MyClient(by))
         sendto_one(by, ":%s NOTICE %s :Connect to host %s failed.",
                    me.name, by->name, cptr);
       det_confs_butmask(cptr, 0);
@@ -687,8 +760,23 @@
     cptr->dns_reply = 0;
   }
   if (-1 < cptr->fd) {
-    flush_connections(cptr);
+#ifdef HAVE_SSL
+    if(!IsSSL(cptr))
+#endif
+      flush_connections(cptr);
+    
     local[cptr->fd] = NULL;
+
+#ifdef HAVE_SSL
+    if(IsSSL(cptr) && cptr->ssl) 
+      {
+        SSL_set_shutdown(cptr->ssl, SSL_RECEIVED_SHUTDOWN);
+        ssl_shutdown(cptr->ssl);
+        SSL_free(cptr->ssl);
+        cptr->ssl = NULL;
+      }    
+#endif
+    
     fdlist_delete(cptr->fd, FDL_ALL);
     close(cptr->fd);
     cptr->fd = -1;
@@ -766,10 +854,48 @@
   new_client->listener  = listener;
   ++listener->ref_count;
 
-  if (!set_non_blocking(new_client->fd))
-    report_error(NONB_ERROR_MSG, get_client_name(new_client, TRUE), errno);
-  if (!disable_sock_options(new_client->fd))
-    report_error(OPT_ERROR_MSG, get_client_name(new_client, TRUE), errno);
+#ifdef HAVE_SSL
+  if(listener->is_ssl)
+    {
+      extern SSL_CTX *server_ctx;
+       
+      if((new_client->ssl = SSL_new(server_ctx)) == NULL)
+        {
+          sendto_realops_lev(L_DEBUG, "Creation of new SSL object for %s failed",
+                             new_client->host);
+          new_client->fd = -2;
+          free_client(new_client);
+          close(fd);
+          return;
+        }
+      
+      SetSSL(new_client);
+      set_non_blocking(fd);
+      disable_sock_options(fd);
+      SSL_set_fd(new_client->ssl, fd);
+      if(ssl_accept(new_client, fd) && errno != EAGAIN)
+        {
+          SSL_set_shutdown(new_client->ssl, SSL_RECEIVED_SHUTDOWN);
+          ssl_shutdown(new_client->ssl);
+          SSL_free(new_client->ssl);
+          new_client->fd = -2;
+          free_client(new_client);
+          close(fd);
+          return;
+        }        
+    }
+#endif
+
+#ifdef HAVE_SSL
+   if(!IsSSL(new_client))
+#endif 
+    {      
+      if(!set_non_blocking(new_client->fd))
+        report_error(NONB_ERROR_MSG, get_client_name(new_client, TRUE), errno);
+      if(!disable_sock_options(new_client->fd))
+        report_error(OPT_ERROR_MSG, get_client_name(new_client, TRUE), errno);
+    }
+  
   start_auth(new_client);
 }
 
@@ -834,7 +960,12 @@
 
   if (!(IsPerson(cptr) && DBufLength(&cptr->recvQ) > SBSD_MAX_CLIENT)) {
     errno = 0;
-    length = recv(cptr->fd, readBuf, READBUF_SIZE, 0);
+#ifdef HAVE_SSL
+    if(IsSSL(cptr))
+      length = ssl_read(cptr, readBuf, READBUF_SIZE);
+    else
+#endif
+      length = recv(cptr->fd, readBuf, READBUF_SIZE, 0);
     /*
      * If not ready, fake it so it isnt closed
      */
@@ -928,12 +1059,18 @@
                  (connected % 86400) / 3600, (connected % 3600) / 60,
                  connected % 60);
     }
+
   if (0 == error)
     strcpy(errmsg, "Remote closed the connection");
   else
     ircsprintf(errmsg, "Read error: %d (%s)", 
                current_error, strerror(current_error));
+
+  
   exit_client(cptr, cptr, &me, errmsg);
+/*  if(retry) {
+    nextconnect = try_connections(CurrentTime);
+  }*/
 }
 
 /*
@@ -964,25 +1101,29 @@
 
   now = CurrentTime;
 
-  for (res = 0;;)
+  for(res = 0;;)
     {
       FD_ZERO(read_set);
       FD_ZERO(write_set);
 
-      for (auth = AuthPollList; auth; auth = auth->next) {
-        assert(-1 < auth->fd);
-        if (IsAuthConnect(auth))
-          FD_SET(auth->fd, write_set);
-        else /* if(IsAuthPending(auth)) */
-          FD_SET(auth->fd, read_set);
-      }
-      for (listener = ListenerPollList; listener; listener = listener->next) {
-        assert(-1 < listener->fd);
-        FD_SET(listener->fd, read_set);
-      }
-      for (i = 0; i <= highest_fd; i++)
+      for(auth = AuthPollList; auth; auth = auth->next)
         {
-          if (!(GlobalFDList[i] & mask) || !(cptr = local[i]))
+          assert(-1 < auth->fd);
+          if(IsAuthConnect(auth))
+            FD_SET(auth->fd, write_set);
+          else /* if(IsAuthPending(auth)) */
+            FD_SET(auth->fd, read_set);
+        }
+      
+      for(listener = ListenerPollList; listener; listener = listener->next)
+        {
+          assert(-1 < listener->fd);
+          FD_SET(listener->fd, read_set);
+        }
+      
+      for(i = 0; i <= highest_fd; i++)
+        {
+          if(!(GlobalFDList[i] & mask) || !(cptr = local[i]))
             continue;
 
           /*
@@ -990,48 +1131,43 @@
            */
           assert(!IsMe(cptr));
 
-          if (DBufLength(&cptr->recvQ) && delay2 > 2)
+          if(DBufLength(&cptr->recvQ) && delay2 > 2)
             delay2 = 1;
-          if (DBufLength(&cptr->recvQ) < 4088)        
-            {
-               FD_SET(i, read_set);
-            }
+          
+          if(DBufLength(&cptr->recvQ) < 4088)        
+            FD_SET(i, read_set);
 
-          if (DBufLength(&cptr->sendQ) || IsConnecting(cptr)
+          if(DBufLength(&cptr->sendQ) || IsConnecting(cptr)
 #ifdef ZIP_LINKS
               || ((cptr->flags2 & FLAGS2_ZIP) && (cptr->zip->outcount > 0))
 #endif
               )
-            {
                FD_SET(i, write_set);
-            }
         }
       
-      if (ResolverFileDescriptor >= 0)
-        {
-          FD_SET(ResolverFileDescriptor, read_set);
-        }
+      if(ResolverFileDescriptor >= 0)
+        FD_SET(ResolverFileDescriptor, read_set);
+
       wait.tv_sec = IRCD_MIN(delay2, delay);
       wait.tv_usec = usec;
 
       nfds = select(MAXCONNECTIONS, read_set, write_set, 0, &wait);
 
-      if ((CurrentTime = time(NULL)) == -1)
+      if((CurrentTime = time(NULL)) == -1)
         {
           log(L_CRIT, "Clock Failure");
           restart("Clock failure");
         }   
 
-      if (nfds == -1 && errno == EINTR)
-        {
-          return -1;
-        }
-      else if( nfds >= 0)
+      if(nfds == -1 && errno == EINTR)
+        return -1;
+      else if(nfds >= 0)
         break;
 
       res++;
-      if (res > 5)
+      if(res > 5)
         restart("too many select errors");
+      
       sleep(10);
     }
 
@@ -1039,84 +1175,137 @@
    * Check the name resolver
    */
 
-  if (-1 < ResolverFileDescriptor && 
-      FD_ISSET(ResolverFileDescriptor, read_set)) {
-    get_res();
-    --nfds;
-  }
+  if(ResolverFileDescriptor > -1 &&
+     FD_ISSET(ResolverFileDescriptor, read_set))
+    {
+      get_res();
+      --nfds;
+    }
+  
   /*
    * Check the auth fd's
    */
-  for (auth = AuthPollList; auth; auth = auth_next) {
-    auth_next = auth->next;
-    assert(-1 < auth->fd);
-    if (IsAuthConnect(auth) && FD_ISSET(auth->fd, write_set)) {
-      send_auth_query(auth);
-      if (0 == --nfds)
-        break;
+  
+  for(auth = AuthPollList; auth; auth = auth_next)
+    {
+      auth_next = auth->next;
+      assert(-1 < auth->fd);
+      
+      if(IsAuthConnect(auth) && FD_ISSET(auth->fd, write_set))
+        {
+          send_auth_query(auth);
+          if(0 == --nfds)
+          break;
+        }      
+      else if(FD_ISSET(auth->fd, read_set))
+        {
+          read_auth_reply(auth);
+          if (0 == --nfds)
+            break;
+        }
     }
-    else if (FD_ISSET(auth->fd, read_set)) {
-      read_auth_reply(auth);
-      if (0 == --nfds)
-        break;
+  
+  for(listener = ListenerPollList; listener; listener = listener->next)
+    {
+      assert(-1 < listener->fd);
+      if(FD_ISSET(listener->fd, read_set))
+        accept_connection(listener);
     }
-  }
-  for (listener = ListenerPollList; listener; listener = listener->next) {
-    assert(-1 < listener->fd);
-    if (FD_ISSET(listener->fd, read_set))
-      accept_connection(listener);
-  }
 
-  for (i = 0; i <= highest_fd; i++) {
-    if (!(GlobalFDList[i] & mask) || !(cptr = local[i]))
-      continue;
+  for(i = 0; i <= highest_fd; i++)
+    {
+      if(!(GlobalFDList[i] & mask) || !(cptr = local[i]))
+        continue;
 
-    /*
-     * See if we can write...
-     */
-    if (FD_ISSET(i, write_set)) {
-      --nfds;
-      if (IsConnecting(cptr)) {
-        if (!completed_connection(cptr)) {
-          exit_client(cptr, cptr, &me, "Lost C/N Line");
+      /*
+       * See if we can write...
+       */
+#ifdef HAVE_SSL
+      if((!IsSSL(cptr) && FD_ISSET(i, write_set)) ||
+         (IsSSL(cptr) && ((cptr->write_blocked_on_read && FD_ISSET(i, read_set)) ||
+                          (!cptr->read_blocked_on_write && FD_ISSET(i, write_set)))))         
+#else      
+      if(FD_ISSET(i, write_set))
+#endif        
+        {
+          --nfds;
+          
+          if(IsConnecting(cptr))
+            {
+              if(!completed_connection(cptr))
+                {
+                  exit_client(cptr, cptr, &me, "Lost C/N Line");
+                  continue;
+                }
+#ifdef HAVE_SSL
+              if(!IsSSL(cptr)); 
+#endif
+                send_queued(cptr); /* this causes segfault in SSL_write() */
+              
+              if(!IsDead(cptr))
+                continue;
+            }
+          else
+            {
+              /* ...room for writing, empty some queue then... */
+              send_queued(cptr);
+              if(!IsDead(cptr))
+                continue;
+            }
+        
+          exit_client(cptr, cptr, &me, 
+                     (cptr->flags & FLAGS_SENDQEX) ? 
+                      "SendQ Exceeded" : strerror(get_sockerr(cptr->fd)));
           continue;
         }
-        send_queued(cptr);
-          if (!IsDead(cptr))
-            continue;
-      }
-      else {
-        /*
-         * ...room for writing, empty some queue then...
-         */
-        send_queued(cptr);
-        if (!IsDead(cptr))
-          continue;
-      }
-      exit_client(cptr, cptr, &me, 
-                 (cptr->flags & FLAGS_SENDQEX) ? 
-                 "SendQ Exceeded" : strerror(get_sockerr(cptr->fd)));
-      continue;
-    }
-    length = 1;     /* for fall through case */
+      length = 1;     /* for fall through case */
 
-    if (FD_ISSET(i, read_set)) {
-      --nfds;
-      length = read_packet(cptr);
-    }
-    else if (PARSE_AS_CLIENT(cptr) && !NoNewLine(cptr))
-      length = parse_client_queued(cptr);
+#ifdef HAVE_SSL
+      if((!IsSSL(cptr) && FD_ISSET(i, read_set)) ||
+         (IsSSL(cptr) && ((!cptr->write_blocked_on_read && FD_ISSET(i, read_set)) ||
+                          (cptr->read_blocked_on_write && FD_ISSET(i, write_set)))))
+#else        
+      if(FD_ISSET(i, read_set))
+#endif
+        {
+          --nfds;
+          
+#ifdef HAVE_SSL
+          if(cptr->ssl && IsSSL(cptr) && cptr->ssl_isconnecting)
+            {
+              sendto_realops_flags(FLAGS_DEBUG, "Doing 2nd ssl_connect attempt [select()]");
+              if(IsDead(cptr) || !ssl_connect(cptr))
+                exit_client(cptr, cptr, &me, "Handshake failed");
+              continue;
+            }
+          if(cptr->ssl && IsSSL(cptr) &&
+             !SSL_is_init_finished(cptr->ssl))
+            {
+              sendto_realops_flags(FLAGS_DEBUG, "Doing 2nd ssl_accept attempt [select()] for %p", cptr);
+              if(IsDead(cptr) || ssl_accept(cptr, cptr->fd))
+                close_connection(cptr);
+              continue;
+            }
+#endif
+          length = read_packet(cptr);
+        }
+      else if(PARSE_AS_CLIENT(cptr) && !NoNewLine(cptr))
+        length = parse_client_queued(cptr);
 
-    if (length > 0 || length == CLIENT_EXITED)
-      continue;
-    if (IsDead(cptr)) {
-       exit_client(cptr, cptr, &me,
-                    strerror(get_sockerr(cptr->fd)));
-       continue;
+      if(length > 0 || length == CLIENT_EXITED)
+        continue;
+    
+      if(IsDead(cptr))
+        {
+          exit_client(cptr, cptr, &me,
+                      strerror(get_sockerr(cptr->fd)));
+          continue;
+        }
+    
+      error_exit_client(cptr, length);
+      errno = 0;
     }
-    error_exit_client(cptr, length);
-    errno = 0;
-  }
+  
   return 0;
 }
   
@@ -1171,7 +1360,7 @@
 #define PFD_SETW(thisfd) do { CHECK_PFD(thisfd) \
                            pfd->events |= POLLWRITEFLAGS; } while (0)
 #define CHECK_PFD(thisfd)                     \
-        if (pfd->fd != thisfd) {              \
+        if(pfd->fd != thisfd) {              \
                 pfd = &poll_fdarray[nbr_pfds++];\
                 poll_fdarray[nbr_pfds].fd = -1; \
                 pfd->fd     = thisfd;           \
@@ -1200,136 +1389,167 @@
   int                  rw;
   int                  i;
 
-  for ( ; ; ) {
-    nbr_pfds = 0;
-    pfd      = poll_fdarray;
-    pfd->fd  = -1;
-    res_pfd  = NULL;
-    auth = 0;
+  for(;;)
+    {
+      nbr_pfds = 0;
+      pfd      = poll_fdarray;
+      pfd->fd  = -1;
+      res_pfd  = NULL;
+      auth = 0;
 
-    /*
-     * set resolver descriptor
-     */
-    if (ResolverFileDescriptor >= 0) {
-      PFD_SETR(ResolverFileDescriptor);
-      res_pfd = pfd;
-    }
-    /*
-     * set auth descriptors
-     */
-    for (auth = AuthPollList; auth; auth = auth->next) {
-      assert(-1 < auth->fd);
-      auth->index = nbr_pfds;
-      if (IsAuthConnect(auth))
-        PFD_SETW(auth->fd);
-      else
-        PFD_SETR(auth->fd);
-    }
-    /*
-     * set listener descriptors
-     */
-    for (listener = ListenerPollList; listener; listener = listener->next) {
-      assert(-1 < listener->fd);
+      /*
+       * set resolver descriptor
+       */
+      if(ResolverFileDescriptor >= 0)
+        {
+          PFD_SETR(ResolverFileDescriptor);
+          res_pfd = pfd;
+        }
+      
+      /*
+       * set auth descriptors
+       */      
+      for(auth = AuthPollList; auth; auth = auth->next)
+        {
+          assert(-1 < auth->fd);
+          auth->index = nbr_pfds;
+          
+          if(IsAuthConnect(auth))
+            PFD_SETW(auth->fd);
+          else
+            PFD_SETR(auth->fd);
+        }
+      
+      /*
+       * set listener descriptors
+       */
+      for(listener = ListenerPollList; listener; listener = listener->next)
+        {
+          assert(-1 < listener->fd);
 #ifdef CONNECTFAST
-      listener->index = nbr_pfds;
-      PFD_SETR(listener->fd);
+          listener->index = nbr_pfds;
+          PFD_SETR(listener->fd);
 #else
-     /* 
-      * It is VERY bad if someone tries to send a lot
-      * of clones to the server though, as mbuf's can't
-      * be allocated quickly enough... - Comstud
-      */
-      listener->index = -1;
-      if (CurrentTime > (listener->last_accept + 2)) {
-        listener->index = nbr_pfds;
-        PFD_SETR(listener->fd);
-      }
-      else if (delay2 > 2)
-        delay2 = 2;
+          /* 
+           * It is VERY bad if someone tries to send a lot
+           * of clones to the server though, as mbuf's can't
+           * be allocated quickly enough... - Comstud
+           */
+          listener->index = -1;
+          
+          if(CurrentTime > (listener->last_accept + 2))
+            {
+              listener->index = nbr_pfds;
+              PFD_SETR(listener->fd);
+            }
+          else if(delay2 > 2)
+            delay2 = 2;
 #endif
-    }
-    /*
-     * set client descriptors
-     */
-    for (i = 0; i <= highest_fd; ++i) {
-      if (!(GlobalFDList[i] & mask) || !(cptr = local[i]))
-        continue;
+        }
+      
+      /*
+       * set client descriptors
+       */
+      for(i = 0; i <= highest_fd; ++i)
+        {
+          if(!(GlobalFDList[i] & mask) || !(cptr = local[i]))
+            continue;
 
-     /*
-      * anything that IsMe should NEVER be in the local client array
-      */
-      assert(!IsMe(cptr));
-      if (DBufLength(&cptr->recvQ) && delay2 > 2)
-        delay2 = 1;
+          /*
+           * anything that IsMe should NEVER be in the local client array
+           */
+          assert(!IsMe(cptr));
+          
+          if(DBufLength(&cptr->recvQ) && delay2 > 2)
+            delay2 = 1;
 
-      if (DBufLength(&cptr->recvQ) < 4088)
-        PFD_SETR(i);
+          if(DBufLength(&cptr->recvQ) < 4088)
+            PFD_SETR(i);
       
-      if (DBufLength(&cptr->sendQ) || IsConnecting(cptr)
+          if(DBufLength(&cptr->sendQ) || IsConnecting(cptr)
 #ifdef ZIP_LINKS
-          || ((cptr->flags2 & FLAGS2_ZIP) && (cptr->zip->outcount > 0))
+             || ((cptr->flags2 & FLAGS2_ZIP) && (cptr->zip->outcount > 0))
 #endif
-          )
-        PFD_SETW(i);
-    }
+            )
+            
+          PFD_SETW(i);
+        }
 
-    wait.tv_sec = IRCD_MIN(delay2, delay);
-    wait.tv_usec = usec;
-    nfds = poll(poll_fdarray, nbr_pfds,
-                wait.tv_sec * 1000 + wait.tv_usec / 1000);
-    if ((CurrentTime = time(0)) == -1)
-      {
-        log(L_CRIT, "Clock Failure");
-        restart("Clock failed");
-      }   
-    if (nfds == -1 && ((errno == EINTR) || (errno == EAGAIN)))
-      return -1;
-    else if (nfds >= 0)
-      break;
-    report_error("poll %s:%s", me.name, errno);
-    res++;
-    if (res > 5)
-      restart("too many poll errors");
-    sleep(10);
-  }
+      wait.tv_sec = IRCD_MIN(delay2, delay);
+      wait.tv_usec = usec;
+      
+      nfds = poll(poll_fdarray, nbr_pfds,
+                  wait.tv_sec * 1000 + wait.tv_usec / 1000);
+      
+      if((CurrentTime = time(0)) == -1)
+        {
+          log(L_CRIT, "Clock Failure");
+          restart("Clock failed");
+        }
+      
+      if(nfds == -1 && ((errno == EINTR) || (errno == EAGAIN)))
+        return -1;
+      else if(nfds >= 0)
+        break;
+      
+      report_error("poll %s:%s", me.name, errno);
+      res++;
+      
+      if(res > 5)
+        restart("too many poll errors");
+      
+      sleep(10);
+    }
+  
   /*
    * check resolver descriptor
    */
-  if (res_pfd && (res_pfd->revents & (POLLREADFLAGS | POLLERRORS))) {
-    get_res();
-    --nfds;
-  }
+  if(res_pfd && (res_pfd->revents & (POLLREADFLAGS | POLLERRORS)))
+    {
+      get_res();
+      nfds--;
+    }
   /*
    * check auth descriptors
    */
-  for (auth = AuthPollList; auth; auth = auth_next) {
-    auth_next = auth->next;
-    i = auth->index;
-    /*
-     * check for any event, we only ask for one at a time
-     */
-    if (poll_fdarray[i].revents) { 
-      if (IsAuthConnect(auth))
-        send_auth_query(auth);
-      else
-        read_auth_reply(auth);
-      if (0 == --nfds)
-        break;
+  for(auth = AuthPollList; auth; auth = auth_next)
+    {
+      auth_next = auth->next;
+      i = auth->index;
+      
+      /*
+       * check for any event, we only ask for one at a time
+       */      
+      if(poll_fdarray[i].revents)
+        {
+          if(IsAuthConnect(auth))
+            send_auth_query(auth);
+          else
+            read_auth_reply(auth);
+        
+          if(0 == --nfds)
+            break;
+        }
     }
-  }
+  
   /*
    * check listeners
    */
-  for (listener = ListenerPollList; listener; listener = listener->next) {
-    if (-1 == listener->index)
-      continue;
-    i = listener->index;
-    if (poll_fdarray[i].revents) {
-      accept_connection(listener);
-      if (0 == --nfds)
-        break;
+  for(listener = ListenerPollList; listener; listener = listener->next)
+    {
+      if(-1 == listener->index)
+        continue;
+      
+      i = listener->index;
+      
+      if(poll_fdarray[i].revents)
+        {
+          accept_connection(listener);
+          if(0 == --nfds)
+            break;
+        }
     }
-  }
+  
   /*
    * i contains the next non-auth/non-listener index, since we put the 
    * resolver, auth and listener, file descriptors in poll_fdarray first, 
@@ -1337,61 +1557,104 @@
    */
   pfd = &poll_fdarray[++i];
     
-  for ( ; (i < nbr_pfds); i++, pfd++)
+  for(; (i < nbr_pfds); i++, pfd++)
     {
       fd = pfd->fd;                   
       rr = pfd->revents & POLLREADFLAGS;
       rw = pfd->revents & POLLWRITEFLAGS;
-      if (pfd->revents & POLLERRORS)
+      
+      if(pfd->revents & POLLERRORS)
         {
           if (pfd->events & POLLREADFLAGS)
             rr++;
           if (pfd->events & POLLWRITEFLAGS)
             rw++;
         }
-      if (!(cptr = local[fd]))
+      if(!(cptr = local[fd]))
         continue;
 
-      if (rw)
+#ifdef HAVE_SSL
+      if(cptr->ssl && IsSSL(cptr) && cptr->ssl_isconnecting)
         {
-          if (IsConnecting(cptr)) {
-            if (!completed_connection(cptr)) {
-              exit_client(cptr, cptr, &me, "Lost C/N Line");
-              continue;
+          sendto_realops_flags(FLAGS_DEBUG, "Doing 2nd ssl_connect attempt [poll()]");
+          if(IsDead(cptr) || !ssl_connect(cptr))
+            exit_client(cptr, cptr, &me, "Handshake failed");
+          continue;
+        }
+      if(cptr->ssl && IsSSL(cptr) &&
+         !SSL_is_init_finished(cptr->ssl))
+        {
+          sendto_realops_flags(FLAGS_DEBUG, "Doing 2nd ssl_accept attempt [poll()] for %p", cptr);
+          if(IsDead(cptr) || ssl_accept(cptr, cptr->fd))
+            close_connection(cptr);
+          continue;
+        }
+#endif
+      
+#ifdef HAVE_SSL
+      if((!IsSSL(cptr) && rw) ||
+         (IsSSL(cptr) && ((cptr->write_blocked_on_read && rr) || rw)))
+#else
+      if(rw)
+#endif
+        {
+          if(IsConnecting(cptr))
+            {
+              if(!completed_connection(cptr))
+                {
+                  exit_client(cptr, cptr, &me, "Lost C/N Line");
+                  continue;
+                }
+              
+              send_queued(cptr);
+              
+              if(!IsDead(cptr))
+                continue;
             }
-            send_queued(cptr);
-            if (!IsDead(cptr))
-              continue;
-          }
-          else {
-            /*
-             * ...room for writing, empty some queue then...
-             */
-            send_queued(cptr);
-            if (!IsDead(cptr))
-              continue;
-          }
+          else
+            {
+              /*
+               * ...room for writing, empty some queue then...
+               */
+              send_queued(cptr);
+              
+              if(!IsDead(cptr))
+                continue;
+            }
+          
           exit_client(cptr, cptr, &me, 
                      (cptr->flags & FLAGS_SENDQEX) ? 
                      "SendQ Exceeded" : strerror(get_sockerr(cptr->fd)));
-          continue;
+/*          continue;    i hope this doesn't hurt */
         }
+      
       length = 1;     /* for fall through case */
-      if (rr)
+      
+#ifdef HAVE_SSL
+      if((!IsSSL(cptr) && rr) || (IsSSL(cptr) &&
+        ((rr && !cptr->write_blocked_on_read) ||
+         (rw && cptr->read_blocked_on_write))))
+#else
+      if(rr)
+#endif        
         length = read_packet(cptr);
-      else if (PARSE_AS_CLIENT(cptr) && !NoNewLine(cptr))
+      else if(PARSE_AS_CLIENT(cptr) && !NoNewLine(cptr))
         length = parse_client_queued(cptr);
 
-      if (length > 0 || length == CLIENT_EXITED)
+      if(length > 0 || length == CLIENT_EXITED)
         continue;
-      if (IsDead(cptr)) {
-         exit_client(cptr, cptr, &me,
+      
+      if(IsDead(cptr))
+        {
+          exit_client(cptr, cptr, &me,
                       strerror(get_sockerr(cptr->fd)));
-         continue;
-      }
+          continue;
+        }
+      
       error_exit_client(cptr, length);
       errno = 0;
     }
+  
   return 0;
 }
 
diff -uNrd ircd-hybrid-6.0/src/s_conf.c ircd-pi1.0a/src/s_conf.c
--- ircd-hybrid-6.0/src/s_conf.c	Fri Dec  1 01:28:50 2000
+++ ircd-pi1.0a/src/s_conf.c	Thu May 23 00:22:22 2002
@@ -19,7 +19,7 @@
  *
  *  (C) 1988 University of Oulu,Computing Center and Jarkko Oikarinen"
  *
- *  $Id: s_conf.c,v 1.192 2000/12/01 06:28:50 lusky Exp $
+ *  $Id: s_conf.c,v 1.14 2002/05/23 04:22:22 smoli Exp $
  */
 #include "s_conf.h"
 #include "channel.h"
@@ -40,6 +40,10 @@
 #include "send.h"
 #include "struct.h"
 #include "s_debug.h"
+#ifdef HAVE_SSL
+#include "ssl.h"
+#endif
+#include "config.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -70,7 +74,7 @@
 static char *getfield(char *newline);
 
 static FBFILE*  openconf(const char* filename);
-static void     initconf(FBFILE*, int);
+static int      initconf(FBFILE*, int);
 static void     clear_out_old_conf(void);
 static void     flush_deleted_I_P(void);
 
@@ -146,6 +150,11 @@
 /* keep track of .include files to hash in */
 struct ConfItem        *include_list = ((struct ConfItem *)NULL);
 
+#ifdef BACKUP
+struct ConfItem *main_link = ((struct ConfItem *)NULL);
+struct ConfItem *backup_link = ((struct ConfItem *)NULL);
+#endif /* BACKUP */
+
 /*
  * conf_dns_callback - called when resolver query finishes
  * if the query resulted in a successful search, hp will contain
@@ -224,7 +233,7 @@
     delete_resolver_queries(aconf);
   MyFree(aconf->host);
   if (aconf->passwd)
-    memset(aconf->passwd, 0, strlen(aconf->passwd));
+    memset(aconf->passwd, 0, irclen(aconf->passwd));
   MyFree(aconf->passwd);
   MyFree(aconf->user);
   MyFree(aconf->name);
@@ -884,7 +893,7 @@
   else
     {
       (void)sprintf(result_buf,"*** hash stats for iphash\n");
-      (void)write(out,result_buf,strlen(result_buf));
+      (void)write(out,result_buf,irclen(result_buf));
     }
 
   for(i = 0; i < IP_HASH_SIZE ;i++)
@@ -908,7 +917,7 @@
             {
               (void)sprintf(result_buf,"Entry %d (0x%X) Collisions %d\n",
                             i,i,collision_count);
-              (void)write(out,result_buf,strlen(result_buf));
+              (void)write(out,result_buf,irclen(result_buf));
             }
         }
     }
@@ -1042,9 +1051,12 @@
             }
           else
             {
-              send(cptr->fd,
-                   "NOTICE FLINE :I: line is full, but you have an >I: line!\n",
-                   56, 0);
+#ifdef HAVE_SSL
+              if(!IsSSL(cptr))
+#endif              
+                send(cptr->fd,
+                     "NOTICE FLINE :I: line is full, but you have an F: line!\n",
+                     55, 0);
               SetFlined(cptr);
             }
 
@@ -1134,36 +1146,67 @@
  */
 int attach_cn_lines(aClient *cptr, const char* host)
 {
-  struct ConfItem* tmp;
+  struct ConfItem *tmp;
+  char            *name = NULL;
   int              found_cline = 0;
-  int              found_nline = 0; 
+  int              found_nline = 0;
+  
   assert(0 != cptr);
   assert(0 != host);
 
-  for (tmp = ConfigItemList; tmp; tmp = tmp->next) {
-    if (!IsIllegal(tmp)) {
-      /*
-       * look for matching C:line
-       */
-      if (!found_cline && CONF_CONNECT_SERVER == tmp->status && 
-          tmp->host && 0 == irccmp(tmp->host, host)) {
-        attach_conf(cptr, tmp);
-        if (found_nline)
-          return 1;
-        found_cline = 1;
-      }
-      /*
-       * look for matching N:line
-       */
-      else if (!found_nline && CONF_NOCONNECT_SERVER == tmp->status &&
-               tmp->host && 0 == irccmp(tmp->host, host)) {
-        attach_conf(cptr, tmp);
-        if (found_cline)
-          return 1;
-        found_nline = 1;
-      }
+  /* search the config entry by name first, then if it fails by host.
+   * with this we achieve that C/N lines match by name, not host
+   * (hosts may be different, e.g. a mask in N-line) */
+  for(tmp = ConfigItemList; tmp && cptr->name; tmp = tmp->next)
+    if(!IsIllegal(tmp) && CONF_CONNECT_SERVER == tmp->status &&
+       irccmp(tmp->name, cptr->name) == 0)
+      name = tmp->name;
+  
+  for(tmp = ConfigItemList; tmp && !name; tmp = tmp->next)
+    if(!IsIllegal(tmp) && CONF_CONNECT_SERVER == tmp->status &&
+       irccmp(tmp->host, host))
+      name = tmp->name;
+  
+  if(name == NULL)
+    return 0;
+  
+  for(tmp = ConfigItemList; tmp; tmp = tmp->next)
+    {
+      if(!IsIllegal(tmp))
+        {
+          /*
+           * look for matching C:line
+           */
+          if(!found_cline && CONF_CONNECT_SERVER == tmp->status && 
+             tmp->host && 0 == irccmp(tmp->name, name))
+            {
+              attach_conf(cptr, tmp);
+        
+              if(found_nline)
+              return 1;
+        
+              found_cline = 1;
+            }
+        
+          /*
+           * look for matching N:line
+           */
+          else if(!found_nline && CONF_NOCONNECT_SERVER == tmp->status &&
+                tmp->host && 0 == irccmp(tmp->name, name))
+            {
+#ifdef HAVE_SSL
+              if(tmp->connect_ssl)
+                SetSSL(cptr);
+#endif
+              attach_conf(cptr, tmp);
+        
+              if(found_cline)
+                return 1;
+        
+              found_nline = 1;
+            }
+        }
     }
-  }
   return 0;
 }
 
@@ -1207,7 +1250,7 @@
   struct ConfItem* tmp;
   
   for (; lp; lp = lp->next)
-    {
+    {      
       tmp = lp->value.aconf;
       if ((tmp->status & statmask) && tmp->name && 
           (!irccmp(tmp->name, name) || match(tmp->name, name)))
@@ -1216,6 +1259,7 @@
   return NULL;
 }
 
+
 /* 
  * NOTES
  *
@@ -1289,6 +1333,52 @@
   return NULL;
 }
 
+#ifdef BACKUP
+struct ConfItem* find_conf_main_link()
+{
+  struct ConfItem* conf;
+  struct ConfItem* mainlink = NULL;
+
+  for (conf = ConfigItemList; conf; conf = conf->next)
+    {
+      if(!(conf->status & CONF_CONNECT_SERVER) || conf->port <= 0) continue;
+      if(mainlink == NULL) {
+        mainlink = conf;
+        continue;
+      }
+      if((conf->c_class != NULL) && (mainlink->c_class != NULL))
+        if(ClassType(conf->c_class) > ClassType(mainlink->c_class))
+          mainlink = conf;
+    }
+  return(mainlink);
+}
+struct ConfItem* find_conf_link_but(struct ConfItem* but)
+{
+  struct ConfItem* conf;
+
+  if(but != NULL)
+    for(conf = ConfigItemList; conf; conf = conf->next)
+      {
+        if(!(conf->status & CONF_CONNECT_SERVER) || conf->port <= 0) continue;
+        if(conf != but) return(conf);
+      }
+  return(NULL);
+}
+int count_conf_links()
+{
+  struct ConfItem* conf;
+  int i = 0;  
+
+  for(conf = ConfigItemList; conf; conf = conf->next)
+    {
+       if(!(conf->status & CONF_CONNECT_SERVER) || conf->port <= 0) continue;
+       i++;
+    }
+
+  return(i);
+}
+#endif /* BACKUP */
+
 /*
  * find_conf_by_name - return a conf item that matches host and type
  */
@@ -1649,7 +1739,7 @@
 
   tmptr = localtime(&CurrentTime);
   strftime(timebuffer, MAX_DATE_STRING, "%Y%m%d%H%M", tmptr);
-  if (DPATH[strlen(DPATH)-1] == '/')
+  if (DPATH[irclen(DPATH)-1] == '/')
      (void)sprintf(ircd_dump_file,"%sircd.conf.%s",
                    DPATH,timebuffer);
   else
@@ -1812,7 +1902,7 @@
 
 #define MAXCONFLINKS 150
 
-static void initconf(FBFILE* file, int use_include)
+static int initconf(FBFILE* file, int use_include)
 {
   static char  quotes[] = {
     0,    /*  */
@@ -1857,6 +1947,9 @@
   unsigned long    ip_mask;
   int              sendq = 0;
   aClass*          class0;
+  char*            listenaddr;
+  unsigned long    vaddr;
+  int              ret = 0;
 
   class0 = find_class(0);        /* which one is class 0 ? */
 
@@ -1938,7 +2031,7 @@
       if (!tmp)
         continue;
       dontadd = 0;
-      switch (*tmp)
+      switch(*tmp)
         {
         case 'A': /* Name, e-mail address of administrator */
         case 'a': /* of this server. */
@@ -2050,6 +2143,13 @@
           sendq = 0;
           break;
 
+#ifdef HAVE_SSL
+        case 'S':
+        case 's':
+          aconf->status = CONF_SSL;
+          break;
+#endif
+          
         default:
           log(L_ERROR, "Error in config file: %s", line);
           break;
@@ -2101,9 +2201,22 @@
             }
           else
             {
-              if ((tmp = getfield(NULL)) == NULL)
+              if((tmp = getfield(NULL)) == NULL)
                 break;
-              aconf->port = atoi(tmp);
+#ifdef HAVE_SSL              
+              if(aconf->status & CONF_NOCONNECT_SERVER)
+                {                  
+                  aconf->port = 0;
+                  
+                  if(irccmp(tmp, "SSL") == 0)
+                    aconf->connect_ssl = 1;
+                  else
+                    aconf->connect_ssl = 0;
+                }              
+              else
+#endif
+              
+                aconf->port = atoi(tmp);
             }
 
           Debug((DEBUG_DEBUG,"aconf->port %x",aconf->port));
@@ -2199,10 +2312,20 @@
       if ( aconf->status & CONF_LISTEN_PORT)
         {
           dontadd = 1;
+          
           if((aconf->passwd[0] == '\0') || (aconf->passwd[0] == '*'))
-            add_listener(aconf->port, NULL );
+            listenaddr = NULL;
           else
-            add_listener(aconf->port, (const char *)aconf->passwd);
+            listenaddr = aconf->passwd;
+          
+#ifdef HAVE_SSL          
+          if(aconf->user && irccmp(aconf->user, "SSL") == 0)
+            ret += add_listener(aconf->port, listenaddr, 1); /* SSL listener */
+          else
+            ret += add_listener(aconf->port, listenaddr, 0); /* plain listener */
+#else
+          ret += add_listener(aconf->port, listenaddr);
+#endif
         }
       else if(aconf->status & CONF_CLIENT_MASK)
         {
@@ -2299,7 +2422,8 @@
             {
                 memset(&vserv,0, sizeof(vserv));
                 vserv.sin_family = AF_INET;
-                vserv.sin_addr.s_addr = inet_addr(aconf->passwd);
+                inet_pton(AF_INET, aconf->passwd, &vaddr);
+                memcpy(&vserv.sin_addr, &vaddr, sizeof(struct in_addr));
                 specific_virtual_host = 1;
             }
           }
@@ -2429,6 +2553,21 @@
           aconf->next = u_conf;
           u_conf = aconf;
         }
+#ifdef HAVE_SSL
+      else if(aconf->status & CONF_SSL)
+        {
+          if(aconf->passwd)
+            DupString(ssl_pem_passphrase, aconf->passwd);
+
+          if(aconf->user)
+            ssl_svl = atoi(aconf->user);
+
+          ssl_cvl = aconf->port;
+          
+          if(aconf->host)
+            DupString(ssl_cipher_list, aconf->host);
+        }      
+#endif     
       else if (aconf->status & CONF_QUARANTINED_NICK)
         {
           dontadd = 1;
@@ -2449,7 +2588,7 @@
                    * which just place holds the channel down.
                    */
 
-                  len = strlen(aconf->name);
+                  len = irclen(aconf->name);
                   chptr = (aChannel*) MyMalloc(sizeof(aChannel) + len + 1);
                   memset(chptr, 0, sizeof(aChannel));
                   /*
@@ -2508,6 +2647,8 @@
       log(L_CRIT, "Server has no M: line");
       exit(-1);
     }
+  
+  return ret;
 }
 
 /*
@@ -2642,8 +2783,8 @@
 
   host = cptr->host;
   name = cptr->username;
-  if (strlen(host)  > (size_t) HOSTLEN ||
-      (name ? strlen(name) : 0) > (size_t) HOSTLEN)
+  if (irclen(host)  > (size_t) HOSTLEN ||
+      (name ? irclen(name) : 0) > (size_t) HOSTLEN)
     return (0);
 #endif
   /* If client is e-lined, then its not k-linable */
@@ -3104,6 +3245,10 @@
         int_flags |= FLAGS_DEBUG;
       else if(*flags == 'n')
         int_flags |= FLAGS_NCHANGE;
+#ifdef ENFORCE
+      else if(*flags == 'e')
+        int_flags |= FLAGS_ENFORCE;
+#endif /* -shifty  rel. pi-0.1 */
       flags++;
     }
 
@@ -3463,10 +3608,11 @@
  * side effects - read all conf files needed, ircd.conf kline.conf etc.
  */
 
-void read_conf_files(int cold)
+int read_conf_files(int cold)
 {
   FBFILE* file = 0;     /* initconf */
   const char *filename,*kfilename,*dfilename; /* conf filenames */
+  int ret = 0;
 
   filename = get_conf_name(CONF_TYPE);
 
@@ -3480,14 +3626,14 @@
       else
         {
           sendto_realops("Can't open %s file aborting rehash!", filename );
-          return;
+          return ret;
         }
     }
 
   if(!cold)
     clear_out_old_conf();
 
-  initconf(file, YES);
+  ret = initconf(file, YES);
 
   do_include_conf();
 
@@ -3534,6 +3680,7 @@
         initconf(file, NO);
     }
 
+  return ret;
 }
 
 /*
@@ -3754,7 +3901,7 @@
        
 int safe_write(aClient *sptr, const char *filename, int out, char *buffer)
 {
-  if (write(out, buffer, strlen(buffer)) <= 0)
+  if (write(out, buffer, irclen(buffer)) <= 0)
     {
       sendto_realops("*** Problem writing to %s",filename);
       close(out);
@@ -3817,10 +3964,29 @@
     {
       line = (char *)NULL;
       if ((end = strchr(field,'\n')) == (char *)NULL)
-        end = field + strlen(field);
+        end = field + irclen(field);
     }
   else
     line = end + 1;
   *end = '\0';
   return(field);
 }
+
+#ifdef BACKUP
+      
+struct ConfItem *find_link_by_class(int class_type)
+{
+  struct ConfItem *aconf;
+  struct Class    *cltmp;
+ 
+  for(aconf = ConfigItemList; aconf; aconf = aconf->next) {
+    if (!(aconf->status & CONF_CONNECT_SERVER) || aconf->port <= 0)
+      continue;
+    cltmp = ClassPtr(aconf);
+    if(cltmp->type == class_type) return(aconf);
+  }
+  return((struct ConfItem *)NULL);
+}
+
+#endif /* BACKUP */
+
diff -uNrd ircd-hybrid-6.0/src/s_debug.c ircd-pi1.0a/src/s_debug.c
--- ircd-hybrid-6.0/src/s_debug.c	Fri Nov 24 13:51:18 2000
+++ ircd-pi1.0a/src/s_debug.c	Fri May 10 23:49:05 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_debug.c,v 1.48 2000/11/24 18:51:18 lusky Exp $
+ *   $Id: s_debug.c,v 1.6 2002/05/11 03:49:05 smoli Exp $
  */
 #include "s_debug.h"
 #include "channel.h"
@@ -35,6 +35,7 @@
 #include "scache.h"
 #include "send.h"
 #include "struct.h"
+#include "irc_string.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -128,6 +129,15 @@
 /* th+hybrid servers ALWAYS do TS_WARNINGS */
   'o',
   'w',
+#ifdef ENFORCE
+  'e',
+#endif
+#ifdef HAVE_SSL
+  '-',
+  'S',
+  'S',
+  'L',
+#endif
   '\0'
 };
 
@@ -299,7 +309,7 @@
           if (acptr->user->away)
             {
               aw++;
-              awm += (strlen(acptr->user->away)+1);
+              awm += (irclen(acptr->user->away)+1);
             }
         }
     }
@@ -309,7 +319,7 @@
   for (chptr = channel; chptr; chptr = chptr->nextch)
     {
       ch++;
-      chm += (strlen(chptr->chname) + sizeof(aChannel));
+      chm += (irclen(chptr->chname) + sizeof(aChannel));
       for (link = chptr->members; link; link = link->next)
         chu++;
       for (link = chptr->invites; link; link = link->next)
@@ -317,12 +327,12 @@
       for (link = chptr->banlist; link; link = link->next)
         {
           chb++;
-          chbm += (strlen(link->value.cp)+1+sizeof(Link));
+          chbm += (irclen(link->value.cp)+1+sizeof(Link));
         #ifdef BAN_INFO
         	if (link->value.banptr->banstr)
-        		chbm += strlen(link->value.banptr->banstr);
+        		chbm += irclen(link->value.banptr->banstr);
         	if (link->value.banptr->who)
-        		chbm += strlen(link->value.banptr->who);
+        		chbm += irclen(link->value.banptr->who);
         #endif /* BAN_INFO */
         }
     }
@@ -330,9 +340,9 @@
   for (aconf = ConfigItemList; aconf; aconf = aconf->next)
     {
       co++;
-      com += aconf->host ? strlen(aconf->host)+1 : 0;
-      com += aconf->passwd ? strlen(aconf->passwd)+1 : 0;
-      com += aconf->name ? strlen(aconf->name)+1 : 0;
+      com += aconf->host ? irclen(aconf->host)+1 : 0;
+      com += aconf->passwd ? irclen(aconf->passwd)+1 : 0;
+      com += aconf->name ? irclen(aconf->name)+1 : 0;
       com += sizeof(aConfItem);
     }
 
diff -uNrd ircd-hybrid-6.0/src/s_log.c ircd-pi1.0a/src/s_log.c
--- ircd-hybrid-6.0/src/s_log.c	Wed Aug  9 18:50:25 2000
+++ ircd-pi1.0a/src/s_log.c	Sat May 18 00:05:58 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_log.c,v 1.10 2000/08/09 22:50:25 lusky Exp $
+ *   $Id: s_log.c,v 1.3 2002/05/18 04:05:58 smoli Exp $
  */
 #include "s_log.h"
 #include "irc_string.h"
@@ -103,11 +103,11 @@
 {
   char buf[LOG_BUFSIZE];
   sprintf(buf, "[%s] %s\n", smalldate(CurrentTime), message);
-  write(logFile, buf, strlen(buf));
+  write(logFile, buf, irclen(buf));
 }
 #endif
    
-void log(int priority, const char* fmt, ...)
+void *log(int priority, const char* fmt, ...)
 {
   char    buf[LOG_BUFSIZE];
   va_list args;
@@ -115,7 +115,7 @@
   assert(0 != fmt);
 
   if (priority > logLevel)
-    return;
+    return NULL;
 
   va_start(args, fmt);
   vsprintf(buf, fmt, args);
@@ -128,6 +128,8 @@
 #if defined(USE_LOGFILE) 
   write_log(buf);
 #endif
+  
+  return NULL;
 }
   
 void init_log(const char* filename)
diff -uNrd ircd-hybrid-6.0/src/s_misc.c ircd-pi1.0a/src/s_misc.c
--- ircd-hybrid-6.0/src/s_misc.c	Tue Nov 21 01:49:32 2000
+++ ircd-pi1.0a/src/s_misc.c	Sun May  5 00:42:24 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: s_misc.c,v 1.69 2000/11/21 06:49:32 lusky Exp $
+ *  $Id: s_misc.c,v 1.4 2002/05/05 04:42:24 smoli Exp $
  */
 #include "s_misc.h"
 #include "client.h"
@@ -184,9 +184,11 @@
         }
       j++;
     }
-
+  
+  j--;
+  
   sendto_one(cptr, ":%s %d %s :%u total server%s",
-             me.name, RPL_STATSDEBUG, name, --j, (j==1)?"":"s");
+             me.name, RPL_STATSDEBUG, name, j, (j==1)?"":"s");
 
   sendto_one(cptr, ":%s %d %s :Sent total : %7.2f %s",
              me.name, RPL_STATSDEBUG, name, _GMKv(sendK), _GMKs(sendK));
diff -uNrd ircd-hybrid-6.0/src/s_serv.c ircd-pi1.0a/src/s_serv.c
--- ircd-hybrid-6.0/src/s_serv.c	Tue Nov 21 01:49:32 2000
+++ ircd-pi1.0a/src/s_serv.c	Thu May 23 00:22:22 2002
@@ -19,12 +19,13 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_serv.c,v 1.214 2000/11/21 06:49:32 lusky Exp $
+ *   $Id: s_serv.c,v 1.9 2002/05/23 04:22:22 smoli Exp $
  */
 #include "s_serv.h"
 #include "channel.h"
 #include "class.h"
 #include "client.h"
+#include "config.h"
 #include "common.h"
 #include "fdlist.h"
 #include "hash.h"
@@ -51,7 +52,7 @@
 #include <time.h>
 #include <netdb.h>
 
-#define MIN_CONN_FREQ 300
+#define MIN_CONN_FREQ 60
 
 #ifndef INADDR_NONE
 #define INADDR_NONE ((unsigned int) 0xffffffff)
@@ -59,6 +60,9 @@
 
 int MaxConnectionCount = 1;
 int MaxClientCount     = 1;
+#ifdef BACKUP
+struct Client* backup_drop = NULL;
+#endif /* BACKUP */
 
 /*
  * list of recognized server capabilities.  "TS" is not on the list
@@ -74,6 +78,10 @@
   { "EX",       CAP_EX },
   { "CHW",      CAP_CHW },
   { "DE",       CAP_DE },
+  { "RW",       CAP_RW },
+#ifdef HAVE_SSL  
+  { "SSL",      CAP_SSL },
+#endif
   { 0,   0 }
 };
 
@@ -232,14 +240,33 @@
 
   Debug((DEBUG_NOTICE,"Connection check at: %s", myctime(currenttime)));
 
+#ifdef BACKUP
+  if((main_link = find_conf_main_link()) == NULL) 
+     {
+       sendto_realops("WARNING: No main link!!! I'm not connecting to anywhere...");
+       return((time_t) 0);
+     }   
+  if(backup_drop != NULL) 
+     {
+       confrq = 10;
+       sendto_realops("Dropping backup link. Retrying main link in %d seconds.",
+		      confrq);
+       exit_client(backup_drop, backup_drop, backup_drop, "Dropping backup link");
+       backup_drop = NULL;
+       
+       return (main_link->hold = currenttime + (time_t)confrq);
+     }
+#endif /* BACKUP */
+
   for (aconf = ConfigItemList; aconf; aconf = aconf->next )
     {
       /*
-       * Also when already connecting! (update holdtimes) --SRB 
+         * Also when already connecting! (update holdtimes) --SRB 
        */
       if (!(aconf->status & CONF_CONNECT_SERVER) || aconf->port <= 0)
         continue;
       cltmp = ClassPtr(aconf);
+
       /*
        * Skip this entry if the use of it is still on hold until
        * future. Otherwise handle this entry (and set it on hold
@@ -254,7 +281,7 @@
           continue;
         }
 
-      if ((confrq = get_con_freq(cltmp)) < MIN_CONN_FREQ )
+      if ((confrq = get_con_freq(cltmp)) < MIN_CONN_FREQ)
         confrq = MIN_CONN_FREQ;
 
       aconf->hold = currenttime + confrq;
@@ -263,9 +290,14 @@
        * and see if this server is already connected?
        */
       cptr = find_server(aconf->name);
-      
+
+#ifndef BACKUP
       if (!cptr && (Links(cltmp) < MaxLinks(cltmp)) &&
           (!connecting || (ClassType(cltmp) > con_class)))
+#else
+      if (!cptr && (Links(cltmp) < MaxLinks(cltmp)) && !connecting &&
+          ((backup_mode && (aconf != main_link)) || (!backup_mode && (aconf == main_link))))
+#endif /* BACKUP */
         {
           con_class = ClassType(cltmp);
           con_conf = aconf;
@@ -281,9 +313,22 @@
       /*
        * auto connects disabled, send message to ops and bail
        */
-      if (connecting)
-        sendto_ops("Connection to %s[%s] not activated.",
-                 con_conf->name, con_conf->host);
+      if(connecting)
+        {
+#ifndef BACKUP
+          sendto_ops("Connection to %s[%s] not activated.",
+                     con_conf->name, con_conf->host);
+#else
+          if(backup_mode) {
+            sendto_ops("Connection to backup link %s[%s] not activated.",
+                       con_conf->name, con_conf->host);
+          } else {
+            sendto_ops("Connection to main link %s[%s] not activated.",
+                       con_conf->name, con_conf->host);
+          }
+#endif /* BACKUP */
+        }
+      
       sendto_ops("WARNING AUTOCONN is 0, autoconns are disabled");
       Debug((DEBUG_NOTICE,"Next connection check : %s", myctime(next)));
       return next;
@@ -306,18 +351,51 @@
         }
       if (!(con_conf->flags & CONF_FLAGS_ALLOW_AUTO_CONN))
         {
+#ifndef BACKUP
           sendto_realops("Connection to %s[%s] not activated, autoconn is off.",
                      con_conf->name, con_conf->host);
-          sendto_realops("WARNING AUTOCONN on %s[%s] is disabled",
+#else
+          if(backup_mode) {
+            sendto_ops("Connection to backup link %s[%s] not activated, autoconn is off.",
+                     con_conf->name, con_conf->host);
+          } else {
+            sendto_ops("Connection to main link %s[%s] not activated, autoconn is off.",
+                     con_conf->name, con_conf->host);
+          }
+#endif /* BACKUP */
+            sendto_realops("WARNING AUTOCONN on %s[%s] is disabled",
                      con_conf->name, con_conf->host);
         }
       else
         {
-          if (connect_server(con_conf, 0, 0))
+          if(connect_server(con_conf, 0, 0))
+#ifndef BACKUP
             sendto_realops("Connection to %s[%s] activated.",
                        con_conf->name, con_conf->host);
+          else
+            sendto_realops("Couldn't activate connection to %s[%s].", 
+                       con_conf->name, con_conf->host);
+#else
+          {
+            if(backup_mode)
+              sendto_realops("Connection to backup link %s[%s] activated.",
+                         con_conf->name, con_conf->host);
+            else
+              sendto_realops("Connection to main link %s[%s] activated.",
+                         con_conf->name, con_conf->host);
+           } else {
+            if(backup_mode)
+              sendto_realops("Couldn't activate connection to backup link %s[%s].",
+                         con_conf->name, con_conf->host);
+            else
+              sendto_realops("Couldn't activate connection to main link %s[%s].",
+                         con_conf->name, con_conf->host); 
+           }
+
+#endif
         }
     }
+
   Debug((DEBUG_NOTICE,"Next connection check : %s", myctime(next)));
   return next;
 }
@@ -445,7 +523,12 @@
     {
       /* kludge to rhyme with sludge */
 
-      if (use_zip)
+#ifdef HAVE_SSL
+      if(!IsSSL(cptr) && cap->cap == CAP_SSL)
+        continue;        
+#endif
+      
+      if(use_zip)
         {
           strcat(msgbuf, cap->name);
           strcat(msgbuf, " ");
@@ -459,6 +542,7 @@
             }
         }
     }
+   
   sendto_one(cptr, "CAPAB :%s", msgbuf);
 }
 
@@ -469,7 +553,13 @@
 
   if (IsPerson(acptr))
     {
-      send_umode(NULL, acptr, 0, SEND_UMODES, ubuf);
+#ifdef HAVE_SSL
+      if(!IsSSL(cptr))
+        send_umode(NULL, acptr, 0, SEND_UMODES & ~FLAGS_SSLU, ubuf);
+      else
+#endif        
+        send_umode(NULL, acptr, 0, SEND_UMODES, ubuf);
+      
       if (!*ubuf)
         { /* trivial optimization - Dianora */
           
@@ -500,10 +590,10 @@
   struct Capability* cap;
 
   strcpy(msgbuf,"TS ");
-  if (!acptr->caps)        /* short circuit if no caps */
+  if(!acptr->caps)        /* short circuit if no caps */
     return msgbuf;
 
-  for (cap = captab; cap->cap; ++cap)
+  for(cap = captab; cap->cap; ++cap)
     {
       if(cap->cap & acptr->caps)
         {
@@ -511,6 +601,8 @@
           strcat(msgbuf, " ");
         }
     }
+   
+  msgbuf[irclen(msgbuf) - 1] = '\0';   
   return msgbuf;
 }
 
@@ -532,7 +624,7 @@
   strcpy(inpath_ip, get_client_name(cptr, SHOW_IP));
   inpath = get_client_name(cptr, MASK_IP); /* "refresh" inpath with host */
 
-  split = irccmp(cptr->name, cptr->host);
+  split = strcmp(cptr->name, cptr->host);
   host = cptr->name;
 
   if (!(n_conf = find_conf_name(cptr->confs, host, CONF_NOCONNECT_SERVER)))
@@ -567,7 +659,7 @@
 #else
   encr = cptr->passwd;
 #endif  /* CRYPT_LINK_PASSWORD */
-  if (*n_conf->passwd && 0 != strcmp(n_conf->passwd, encr))
+  if (*n_conf->passwd && strcmp(n_conf->passwd, encr))
     {
       ServerStats->is_ref++;
       sendto_one(cptr, "ERROR :No Access (passwd mismatch) %s",
@@ -603,8 +695,14 @@
       */
 
       send_capabilities(cptr,(c_conf->flags & CONF_FLAGS_ZIP_LINK));
+#ifdef HAVE_SSL
+      sendto_one(cptr, "SERVER %s 1%s :%s",
+                 my_name_for_link(me.name, n_conf),
+                 IsSSL(cptr) ? "S" : "",
+#else
       sendto_one(cptr, "SERVER %s 1 :%s",
-                 my_name_for_link(me.name, n_conf), 
+                 my_name_for_link(me.name, n_conf),                 
+#endif                 
                  (me.info[0]) ? (me.info) : "IRCers United");
     }
   else
@@ -692,6 +790,11 @@
   cptr->serv->nline = n_conf;
   cptr->flags2 |= FLAGS2_CBURST;
 
+#ifdef HAVE_SSL
+  if(IsSSL(cptr))
+     SetSSLServ(cptr);
+#endif
+      
   /*
   ** Old sendto_serv_but_one() call removed because we now
   ** need to send different names to different servers
@@ -706,8 +809,13 @@
           match(my_name_for_link(me.name, n_conf), cptr->name))
         continue;
 
+#ifdef HAVE_SSL
+      sendto_one(acptr,":%s SERVER %s 2%s :%s",
+                 me.name, cptr->name, (IsSSL(cptr) && IsSSLServ(acptr)) ? "S" : "", cptr->info);
+#else
       sendto_one(acptr,":%s SERVER %s 2 :%s",
                  me.name, cptr->name, cptr->info);
+#endif
     }
 
   /*
@@ -744,23 +852,28 @@
 
           /* DON'T give away the IP of the server here
            * if its a hub especially.
-           */
-
-          if (split)
-            sendto_one(cptr, ":%s SERVER %s %d :%s",
+           */                          
+          if(split)
+#ifdef HAVE_SSL
+          /* super paranoya, don't send +S server flag out over unencrypted connections */
+            sendto_one(cptr, ":%s SERVER %s %d%s :%s",
                        acptr->serv->up, acptr->name,
-                       acptr->hopcount+1,
+                       acptr->hopcount+1, (IsSSL(cptr) && IsSSLServ(acptr)) ? "S" : "",
                        acptr->info);
-            /*
-            sendto_one(cptr, ":%s SERVER %s %d :[%s] %s",
+          else
+            sendto_one(cptr, ":%s SERVER %s %d%s :%s",
                        acptr->serv->up, acptr->name,
-                       acptr->hopcount+1,
-                       acptr->host, acptr->info);
-                       */
+                       acptr->hopcount+1, (IsSSL(cptr) && acptr->serv->is_ssl) ? "S" : "",
+                       acptr->info);
+#else
+            sendto_one(cptr, ":%s SERVER %s %d :%s",
+                       acptr->serv->up, acptr->name,
+                       acptr->hopcount+1, acptr->info);
           else
             sendto_one(cptr, ":%s SERVER %s %d :%s",
                        acptr->serv->up, acptr->name,
                        acptr->hopcount+1, acptr->info);
+#endif          
         }
     }
   
@@ -914,3 +1027,95 @@
              cptr->name, j, (j==1) ? "" : "s");
 }
 
+#ifdef BACKUP
+
+void backup_lost_link(struct Client* cptr)
+{
+  time_t now = time(NULL);  
+  int reconn;
+  int confrq;
+  struct ConfItem* nextserv;
+
+  if(((main_link = find_conf_main_link()) == NULL) ||
+      (main_link->c_class == NULL) ||
+      (cptr == NULL) || (cptr->name == NULL)) return;
+
+  if((confrq = main_link->c_class->conFreq) < MIN_CONN_FREQ)
+    confrq = MIN_CONN_FREQ;
+
+  reconn = (rand() % (confrq - 10)) + 10;
+  nextserv = NULL;
+
+  if(strcmp(cptr->name, main_link->name))
+    {
+      if(backup_mode)
+        {
+          if(backup_retry >= (count_conf_links() << 1))
+            {
+              sendto_realops("Tried every backup server twice, leaving backup mode...");
+              backup_mode = 0;
+              backup_retry = 0;
+              nextserv = main_link;                                                                                                                                
+              sendto_realops("Next connection attempt in %d seconds to %s[%s].",
+               	             reconn, nextserv->name, nextserv->host);
+            }
+          else
+            backup_retry++;
+        }
+    }
+  else
+    {
+      if(main_retry)
+        {
+          backup_mode++;
+          main_retry = 0;
+          nextserv = main_link;
+          sendto_realops("Main link unreachable, entering backup mode...");
+          sendto_realops("Next connection attempt in %d seconds to %s[%s]",
+ 		         reconn, nextserv->name, nextserv->host);
+        }
+      else
+        {
+          main_retry++;
+          backup_mode = 0;
+          nextserv = main_link;
+          sendto_realops("Lost main link, trying to reconnect in %d seconds.", reconn);
+        }
+    }
+  
+  if(nextserv != NULL)
+    {
+      nextserv->hold = now + (time_t)reconn;
+      if(nextserv->hold < nextconnect)
+        nextconnect = nextserv->hold;
+    }
+}
+
+int backup_regain_link(struct Client* cptr)
+{
+  time_t now = time(NULL);
+  int reconn;
+  int confrq;
+ 
+  if(!backup_mode)
+    return 0;
+   
+  sendto_realops("Main link went back, leaving backup mode...");
+  backup_mode = 0;
+  backup_retry = 0;
+   
+  if((confrq = main_link->c_class->conFreq) < MIN_CONN_FREQ)
+    confrq = MIN_CONN_FREQ;
+   
+  reconn = (rand() % (confrq - 10)) + 10;
+   
+  if((main_link->hold = now + (time_t) reconn) < nextconnect)
+    nextconnect = main_link->hold;
+    
+  sendto_realops("Dropping backup link in %d seconds.",
+                 reconn);
+  
+  backup_drop = cptr;
+  return 0;
+}
+#endif /* BACKUP */
diff -uNrd ircd-hybrid-6.0/src/s_stats.c ircd-pi1.0a/src/s_stats.c
--- ircd-hybrid-6.0/src/s_stats.c	Fri Jul 30 16:10:54 1999
+++ ircd-pi1.0a/src/s_stats.c	Fri Nov  2 19:23:43 2001
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: s_stats.c,v 1.1 1999/07/30 20:10:54 tomh Exp $
+ *  $Id: s_stats.c,v 1.1.1.1 2001/11/03 00:23:43 shifty Exp $
  */
 #include "s_stats.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/src/s_user.c ircd-pi1.0a/src/s_user.c
--- ircd-hybrid-6.0/src/s_user.c	Sat Dec 30 19:12:02 2000
+++ ircd-pi1.0a/src/s_user.c	Thu May 23 00:22:22 2002
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: s_user.c,v 1.230 2000/12/31 00:12:02 lusky Exp $
+ *  $Id: s_user.c,v 1.11 2002/05/23 04:22:22 smoli Exp $
  */
 #include "s_user.h"
 #include "channel.h"
@@ -47,6 +47,7 @@
 #include "struct.h"
 #include "whowas.h"
 #include "flud.h"
+#include "config.h"
 
 #ifdef ANTI_DRONE_FLOOD
 #include "dbuf.h"
@@ -68,8 +69,8 @@
 static int do_user (char *, aClient *, aClient*, char *, char *, char *,
                      char *);
 
+int valid_hostname(const char* hostname);
 static int nickkilldone(aClient *, aClient *, int, char **, time_t, char *);
-static int valid_hostname(const char* hostname);
 static int valid_username(const char* username);
 static void report_and_set_user_flags( aClient *, aConfItem * );
 static int tell_user_off(aClient *,char **);
@@ -81,6 +82,9 @@
   {FLAGS_BOTS,  'b'},
   {FLAGS_CCONN, 'c'},
   {FLAGS_DEBUG, 'd'},
+#ifdef ENFORCE
+  {FLAGS_ENFORCE, 'e'},
+#endif /* ENFORCE */
   {FLAGS_FULL,  'f'},
   {FLAGS_INVISIBLE, 'i'},
   {FLAGS_SKILL, 'k'},
@@ -89,6 +93,9 @@
   {FLAGS_LOCOP, 'O'},
   {FLAGS_REJ, 'r'},
   {FLAGS_SERVNOTICE, 's'},
+#ifdef HAVE_SSL
+  {FLAGS_SSLU, 'S'},
+#endif
   {FLAGS_WALLOP, 'w'},
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
@@ -123,7 +130,11 @@
   0,            /* P */
   0,            /* Q */
   0,            /* R */
+#ifdef HAVE_SSL
+  FLAGS_SSLU,   /* S */
+#else
   0,            /* S */
+#endif
   0,            /* T */
   0,            /* U */
   0,            /* V */
@@ -137,7 +148,11 @@
   FLAGS_BOTS,   /* b */
   FLAGS_CCONN,  /* c */
   FLAGS_DEBUG,  /* d */
+#ifdef ENFORCE
+  FLAGS_ENFORCE,/* e */
+#else
   0,            /* e */
+#endif /* ENFORCE */
   FLAGS_FULL,   /* f */
   0,            /* g */
   0,            /* h */
@@ -239,6 +254,9 @@
   static long last_time=0;
   static int    s_count = 0, c_count = 0, u_count = 0, i_count = 0;
   static int    o_count = 0, m_client = 0, m_server = 0;
+#ifdef HAVE_SSL
+  static int    ls_count, rs_count;
+#endif
   int forced;
   struct Client *acptr;
 
@@ -255,6 +273,11 @@
   c_count  = Count.total-Count.invisi;
   s_count  = Count.server;
   o_count  = Count.oper;
+#ifdef HAVE_SSL
+  ls_count = Count.local_ssl;
+  rs_count = Count.reach_ssl;
+#endif
+  
   if (forced || (CurrentTime > last_time+LUSERS_CACHE_TIME))
     {
       last_time = CurrentTime;
@@ -262,7 +285,10 @@
       /* use LUSERS_CACHE_TIME instead... */
       s_count = 0; c_count = 0; u_count = 0; i_count = 0;
       o_count = 0; m_client = 0; m_server = 0;
-
+#ifdef HAVE_SSL
+      ls_count = 0; rs_count = 0;
+#endif
+      
       for (acptr = GlobalClientList; acptr; acptr = acptr->next)
         {
           switch (acptr->status)
@@ -276,6 +302,15 @@
             case STAT_CLIENT:
               if (IsAnOper(acptr))
                 o_count++;
+#ifdef HAVE_SSL
+              if(IsSSLUmode(acptr))
+                {
+                  ls_count++;
+                  
+                  if(MyConnect(acptr))
+                    rs_count++;
+                }
+#endif
 #ifdef  SHOW_INVISIBLE_LUSERS
               if (MyConnect(acptr))
                 m_client++;
@@ -353,6 +388,22 @@
                                  "Oper count off by %d", Count.oper - o_count);
               Count.oper = o_count;
             }
+#ifdef HAVE_SSL
+          if(ls_count != Count.local_ssl)
+            {
+              sendto_realops_flags(FLAGS_DEBUG,
+                                   "Local SSL client count off by %d",
+                                   Count.local - ls_count);
+              Count.local = ls_count;
+            }
+          if(rs_count != Count.reach_ssl)
+            {
+              sendto_realops_flags(FLAGS_DEBUG,
+                                   "Reachable SSL client count off by %d",
+                                   Count.reach_ssl - rs_count);
+              Count.local = rs_count;
+            }
+#endif          
           Count.unknown = u_count;
         } /* Complain & reset loop */
     } /* Recount loop */
@@ -385,7 +436,15 @@
              Count.local, Count.max_loc);
   sendto_one(sptr, form_str(RPL_GLOBALUSERS), me.name, parv[0],
              Count.total, Count.max_tot);
-
+#ifdef HAVE_SSL
+  if(MyConnect(sptr) && IsSSL(sptr))
+    {
+      sendto_one(sptr, form_str(RPL_LOCALSSL), me.name, parv[0],
+                 Count.local_ssl, Count.max_loc_ssl);
+      sendto_one(sptr, form_str(RPL_REACHSSL), me.name, parv[0],
+                 Count.reach_ssl, Count.max_rch_ssl);
+    }
+#endif
   sendto_one(sptr, form_str(RPL_STATSCONN), me.name, parv[0],
              MaxConnectionCount, MaxClientCount,
              Count.totalrestartcount);
@@ -538,7 +597,7 @@
   parv[1] = parv[2] = NULL;
 
   /* pointed out by Mortiis, never be too careful */
-  if(strlen(username) > USERLEN)
+  if(irclen(username) > USERLEN)
     username[USERLEN] = '\0';
 
   reason = NULL;
@@ -671,7 +730,7 @@
         }
 
       /* password check */
-      if (!BadPtr(aconf->passwd) && 0 != strcmp(sptr->passwd, aconf->passwd))
+      if (!BadPtr(aconf->passwd) && !strcmp(sptr->passwd, aconf->passwd))
         {
           ServerStats->is_ref++;
           sendto_one(sptr, form_str(ERR_PASSWDMISMATCH),
@@ -775,11 +834,16 @@
          }
 
       sendto_realops_flags(FLAGS_CCONN,
+ #ifdef HAVE_SSL
+                         "%s client connecting: %s (%s@%s) [%s] {%d}",
+                         IsSSL(sptr) ? "SSL" : "Plaintext",
+ #else
                          "Client connecting: %s (%s@%s) [%s] {%d}",
+ #endif
                          nick, sptr->username, sptr->host,
                          inetntoa((char *)&sptr->ip),
                          get_client_class(sptr));
-
+     
       if ((++Count.local) > Count.max_loc)
         {
           Count.max_loc = Count.local;
@@ -787,6 +851,12 @@
             sendto_ops("New Max Local Clients: %d",
                        Count.max_loc);
         }
+      
+#ifdef HAVE_SSL      
+      if(IsSSL(sptr))
+        if(++Count.local_ssl > Count.max_loc_ssl)
+          Count.max_loc_ssl = Count.local;
+#endif
     }
   else
     strncpy_irc(sptr->username, username, USERLEN);
@@ -808,6 +878,13 @@
 /* Increment our total user count here */
   if (++Count.total > Count.max_tot)
     Count.max_tot = Count.total;
+  
+#ifdef HAVE_SSL
+  if((IsServer(cptr) && IsSSLUmode(sptr)) ||
+     (!IsServer(cptr) && IsSSL(cptr)))
+    if(++Count.reach_ssl > Count.max_rch_ssl)
+      Count.max_rch_ssl = Count.reach_ssl;
+#endif
 
   if (MyConnect(sptr))
     {
@@ -817,11 +894,13 @@
                  get_listener_name(sptr->listener), version);
       
       /*
-      ** Don't mess with this one - IRCII needs it! -Avalon
-      */
-      sendto_one(sptr,
+       * Don't mess with this one - IRCII needs it! -Avalon
+       *
+       * blah?
+       */
+/*      sendto_one(sptr,
                  "NOTICE %s :*** Your host is %s, running version %s",
-                 nick, get_listener_name(sptr->listener), version);
+                 nick, get_listener_name(sptr->listener), version);*/
       
       sendto_one(sptr, form_str(RPL_CREATED),me.name,nick,creation);
       sendto_one(sptr, form_str(RPL_MYINFO), me.name, parv[0],
@@ -961,7 +1040,7 @@
  * NOTE: this doesn't allow a hostname to begin with a dot and
  * will not allow more dots than chars.
  */
-static int valid_hostname(const char* hostname)
+int valid_hostname(const char* hostname)
 {
   int         dots  = 0;
   int         chars = 0;
@@ -1342,6 +1421,23 @@
    * parc == 9 on a normal TS style server-to-server NICK
    *      introduction
    */
+#ifdef HAVE_SSL
+  if(IsServer(sptr) && parc == 9 && (s = strchr(parv[4], 'S')))
+    {
+      if(IsSSL(cptr))
+        SetSSLUmode(sptr);
+      else
+        {
+          sendto_realops_flags(FLAGS_DEBUG,
+                               "Remote NICK from unencrypted link %s for user %s, stripping SSL flags...",
+                               cptr->name, parv[1]);
+          do
+            *s = s[1];
+          while(*s++ != '\0');
+        }
+    }
+#endif
+  
   if ((IsServer(sptr)) && (parc < 9))
     {
       /*
@@ -1393,7 +1489,7 @@
    * and KILL it. -avalon 4/4/92
    */
   if (clean_nick_name(nick) == 0 ||
-      (IsServer(cptr) && strcmp(nick, parv[1])))
+      (IsServer(cptr) && irccmp(nick, parv[1])))
     {
       sendto_one(sptr, form_str(ERR_ERRONEUSNICKNAME),
                  me.name, BadPtr(parv[0]) ? "*" : parv[0], parv[1]);
@@ -1497,7 +1593,7 @@
   */
   if (acptr == sptr)
    {
-    if (strcmp(acptr->name, nick) != 0)
+    if (irccmp(acptr->name, nick) != 0)
       /*
       ** Allows change of case in his/her nick
       */
@@ -1804,7 +1900,7 @@
 */
 int m_user(aClient* cptr, aClient* sptr, int parc, char *parv[])
 {
-#define UFLAGS  (FLAGS_INVISIBLE|FLAGS_WALLOP|FLAGS_SERVNOTICE)
+#define UFLAGS  (FLAGS_INVISIBLE|FLAGS_WALLOP|FLAGS_SERVNOTICE|FLAGS_SSLU)
   char* username;
   char* host;
   char* server;
@@ -1876,6 +1972,10 @@
       sptr->flags |= FLAGS_INVISIBLE;
 #endif
 
+#ifdef HAVE_SSL
+      if(IsSSL(sptr))
+        SetSSLUmode(sptr);
+#endif
 #if 0
       /* Undocumented lame extension to the protocol
        * if user provides a number, the bits set are
@@ -2021,7 +2121,8 @@
                                     FLAGS2_OPER_UNKLINE|
                                     FLAGS2_OPER_GLINE|
                                     FLAGS2_OPER_N|
-                                    FLAGS2_OPER_K);
+                                    FLAGS2_OPER_K|
+                                    FLAGS2_OPER_ENFORCE);
                   while(cur_cptr)
                     {
                       if(sptr == cur_cptr) 
@@ -2075,6 +2176,52 @@
       sptr->umodes &= ~FLAGS_NCHANGE; /* only tcm's really need this */
     }
 
+#ifdef HAVE_SSL
+  if((sptr->umodes & FLAGS_SSLU) && !IsSSL(cptr))
+    {
+      sptr->umodes &= ~FLAGS_SSLU;
+
+      if(MyConnect(sptr) && !(setflags & FLAGS_SSLU))
+        sendto_one(sptr,":%s NOTICE %s :You need SSL connection for +S",
+                   me.name, parv[0]);
+    }
+  else if(!(sptr->umodes & FLAGS_SSLU) && (setflags & FLAGS_SSLU) && MyConnect(sptr))
+    {
+      sendto_one(sptr, ":%s NOTICE %s :*** Can't remove SSL usermode",
+                 me.name, parv[0]);
+      sptr->umodes |= FLAGS_SSLU;
+    }
+#endif
+#ifdef ENFORCE
+  if((sptr->umodes & FLAGS_ENFORCE) && !(setflags & FLAGS_ENFORCE))
+    {
+      if(MyConnect(sptr) && !IsOperEnforce(sptr))
+        {
+          sendto_one(sptr, ":%s NOTICE %s :*** You need oper and E flag for +e",
+                     me.name, parv[0]);
+          sptr->umodes &= ~FLAGS_ENFORCE;
+        }
+      else if(MyConnect(sptr))
+#ifdef CUSTOM_ERR
+        sendto_ops("%s (%s@%s) has become an absolute fuck-face (+e)", parv[0],
+#else
+        sendto_ops("%s (%s@%s) has entered full privilege mode (+e)", parv[0],
+#endif /* CUSTOM_ERR */
+                   sptr->username, sptr->host);
+    }
+      
+  if(!(sptr->umodes & FLAGS_ENFORCE) && (setflags & FLAGS_ENFORCE))
+        
+    if(MyConnect(sptr))
+#ifdef CUSTOM_ERR
+      sendto_ops("%s (%s@%s) has returned to normal life (-e)", parv[0],
+#else
+      sendto_ops("%s (%s@%s) has left full privilege mode (-e)", parv[0],
+#endif /* CUSTOM_ERR */
+                 sptr->username, sptr->host);
+
+#endif /* shifty  rel. pi-0.1 */
+
   if (!(setflags & FLAGS_INVISIBLE) && IsInvisible(sptr))
     ++Count.invisi;
   if ((setflags & FLAGS_INVISIBLE) && !IsInvisible(sptr))
@@ -2188,9 +2335,9 @@
  * Annoy/OJNKbots:      "user foo . . :foo"   (disabled)
  * Spambots that are based on OJNK: "user foo x x :foo"
  */
-  if (!strcmp(host,"1")) return 1;
-  if (!strcmp(host,"null")) return 2;
-  if (!strcmp(host, "x")) return 3;
+  if (!irccmp(host,"1")) return 1;
+  if (!irccmp(host,"null")) return 2;
+  if (!irccmp(host, "x")) return 3;
 
   return 0;
 }
diff -uNrd ircd-hybrid-6.0/src/s_zip.c ircd-pi1.0a/src/s_zip.c
--- ircd-hybrid-6.0/src/s_zip.c	Fri Nov 24 13:24:37 2000
+++ ircd-pi1.0a/src/s_zip.c	Fri May 10 23:49:05 2002
@@ -16,8 +16,10 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_zip.c,v 1.24 2000/11/24 18:24:37 lusky Exp $
+ *   $Id: s_zip.c,v 1.5 2002/05/11 03:49:05 smoli Exp $
  */
+#define S_ZIP
+
 #include "s_zip.h"
 #include "client.h"
 #include "irc_string.h"
@@ -267,7 +269,7 @@
       break;
 
     case Z_DATA_ERROR: /* the buffer might not be compressed.. */
-      if ((IsCapable(cptr, CAP_ZIP))  && !strncmp("ERROR ", buffer, 6))
+      if ((IsCapable(cptr, CAP_ZIP))  && !ircncmp("ERROR ", buffer, 6))
         {
           cptr->flags2 &= ~FLAGS2_ZIP;
           cptr->caps &= ~CAP_ZIP;
diff -uNrd ircd-hybrid-6.0/src/scache.c ircd-pi1.0a/src/scache.c
--- ircd-hybrid-6.0/src/scache.c	Sun Aug  1 02:47:24 1999
+++ ircd-pi1.0a/src/scache.c	Fri May 10 23:49:05 2002
@@ -1,7 +1,7 @@
 /*
  * scache.c
  *
- * $Id: scache.c,v 1.16 1999/08/01 06:47:24 tomh Exp $
+ * $Id: scache.c,v 1.2 2002/05/11 03:49:05 smoli Exp $
  */
 
 #include "client.h"
@@ -106,7 +106,7 @@
         {
           *number_servers_cached = *number_servers_cached + 1;
           *mem_servers_cached = *mem_servers_cached +
-            (strlen(scache_ptr->name) +
+            (irclen(scache_ptr->name) +
              sizeof(SCACHE *));
 
           scache_ptr = scache_ptr->next;
diff -uNrd ircd-hybrid-6.0/src/send.c ircd-pi1.0a/src/send.c
--- ircd-hybrid-6.0/src/send.c	Sat Dec 30 19:12:03 2000
+++ ircd-pi1.0a/src/send.c	Wed May 22 08:00:22 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: send.c,v 1.98 2000/12/31 00:12:03 lusky Exp $
+ *   $Id: send.c,v 1.8 2002/05/22 12:00:22 smoli Exp $
  */
 #include "send.h"
 #include "channel.h"
@@ -87,7 +87,10 @@
   DBufClear(&to->sendQ);
   if (!IsPerson(to) && !IsUnknown(to) && !(to->flags & FLAGS_CLOSING))
     sendto_realops(notice, get_client_name(to, MASK_IP));
-  
+#ifdef BACKUP
+  backup_lost_link(to);
+#endif /* BACKUP */
+
   Debug((DEBUG_ERROR, notice, get_client_name(to, MASK_IP)));
 
   return (-1);
@@ -862,7 +865,6 @@
     {
       if (cptr == from)
         continue;
-      
       vsendto_one(cptr, pattern, args);
     }
 
@@ -995,7 +997,7 @@
               (void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
                                me.name, cptr->name);
       
-              (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+              (void)strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
       
               vsendto_one(cptr, nbuf, args);
             }
@@ -1014,7 +1016,7 @@
               (void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
                                me.name, cptr->name);
               
-              (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+              (void)strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
               
               vsendto_one(cptr, nbuf, args);
             }
@@ -1045,7 +1047,7 @@
         {
           (void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
                            me.name, cptr->name);
-          (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+          (void)strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
           
           vsendto_one(cptr, nbuf, args);
         }
@@ -1100,6 +1102,7 @@
   va_end(args);
 } /* sendto_ops_butone() */
 
+
 /*
 ** sendto_wallops_butone
 **      Send message to all operators.
@@ -1149,6 +1152,32 @@
         va_end(args);
 } /* sendto_wallops_butone() */
 
+/* send a message to ALL local clients */
+void
+sendto_myclients(aClient *from, const char *pattern, ...)
+{
+  aClient *cptr;
+  char nbuf[1024];
+  va_list args;
+  
+  va_start(args, pattern);
+  
+  for(cptr = local_cptr_list; cptr; cptr = cptr->next_local_client)
+    {
+      if(!IsPerson(cptr))
+        continue;
+      
+      ircsprintf(nbuf, ":%s!%s@%s NOTICE %s :*** Global -- ",
+                 from->name, from->username, from->host, cptr->name);
+            
+      strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
+                
+      vsendto_one(cptr, nbuf, args);
+    }
+  
+  va_end(args);
+}
+
 /*
 ** send_operwall -- Send Wallop to All Opers on this server
 **
@@ -1298,7 +1327,7 @@
   *sendbuf = ':';
   strncpy_irc(sendbuf + 1, par, sizeof(sendbuf) - 2);
 
-  parlen = strlen(par) + 1;
+  parlen = irclen(par) + 1;
   sendbuf[parlen++] = ' ';
 
   len = parlen;
@@ -1342,6 +1371,24 @@
   va_end(args);
 } /* sendto_realops() */
 
+void
+sendto_realops_lev(int priority, const char *pattern, ...)
+
+{
+  va_list args;
+
+  assert(-1 < priority);
+
+  va_start(args, pattern);
+  
+  if(priority > get_log_level())
+    return;
+  
+  vsendto_realops(pattern, args);
+
+  va_end(args);
+} /* sendto_realops() */
+
 /*
 vsendto_realops()
  Send the given string to local operators (not +s)
@@ -1360,7 +1407,7 @@
         {
           (void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
                            me.name, cptr->name);
-          (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+          (void)strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
           
           vsendto_one(cptr, nbuf, args);
         }
@@ -1389,7 +1436,7 @@
         {
           (void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
                            me.name, cptr->name);
-          (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+          (void)strncat(nbuf, pattern, sizeof(nbuf) - irclen(nbuf));
           
           vsendto_one(cptr, nbuf, args);
         }
diff -uNrd ircd-hybrid-6.0/src/sprintf_irc.c ircd-pi1.0a/src/sprintf_irc.c
--- ircd-hybrid-6.0/src/sprintf_irc.c	Fri Jul 30 21:53:32 1999
+++ ircd-pi1.0a/src/sprintf_irc.c	Sun May  5 00:42:24 2002
@@ -17,7 +17,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: sprintf_irc.c,v 1.9 1999/07/31 01:53:32 tomh Exp $
+ *   $Id: sprintf_irc.c,v 1.4 2002/05/05 04:42:24 smoli Exp $
  */
 #include "sprintf_irc.h"
 
@@ -451,7 +451,7 @@
 ircsprintf(register char *str, const char *format, ...)
 
 {
-        register va_list args;
+        va_list args;
         register int bytes;
 
         va_start(args, format);
diff -uNrd ircd-hybrid-6.0/src/ssl.c ircd-pi1.0a/src/ssl.c
--- ircd-hybrid-6.0/src/ssl.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/ssl.c	Thu May 23 13:51:47 2002
@@ -0,0 +1,921 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, src/ssl.c
+ *   Copyright (C) 1990 Jarkko Oikarinen and
+ *                      University of Oulu, Computing Center
+ *
+ *   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: ssl.c,v 1.14 2002/05/23 17:51:47 smoli Exp $
+ */
+
+#include "config.h"
+#include "s_log.h"
+#include "ssl.h"
+#include "struct.h"
+#include "common.h"
+#include "client.h"
+#include "s_log.h"
+#include "s_bsd.h"
+#include "send.h"
+#include "client.h"
+#include "numeric.h"
+#include "ircd.h"
+#include "s_user.h"
+#include "send.h"
+
+#ifdef HAVE_SSL
+
+#define SSL_READ    1
+#define SSL_WRITE   2
+#define SSL_ACCEPT  3
+#define SSL_CONNECT 4
+
+#include <string.h>
+#include <sys/stat.h>
+#include <openssl/rand.h>
+#include <openssl/asn1.h>
+
+int         ssl_capable = 0;
+int         ssl_cvl = 0;               /* client verification level */
+int         ssl_svl = 0;               /* server verification level */
+char       *ssl_cipher_list = NULL;
+char       *ssl_ciphers = SSL_DEFAULT_CIPHER_LIST;
+char       *ssl_pem_passphrase = NULL; /* is having the passphrase in ircd.conf a security leak? */
+SSL_CTX    *server_ctx;
+SSL_METHOD *server_meth;
+SSL_CTX    *client_ctx;
+SSL_METHOD *client_meth;
+
+static int server_verify_peer = 0;
+static int client_verify_peer = 0;
+
+#define CTX_ERR(x) { \
+                     ERR_print_errors_fp(stderr); \
+                     SSL_CTX_free((x)); \
+                     return 0; \
+                   }
+
+#define CHK_NULL(x) if(!x) \
+                      { \
+                        log(L_NOTICE, "Lost connection to %s: Error in SSL", \
+                            get_client_name(cptr, TRUE)); \
+                        return 0; \
+                      }
+
+int ssl_init();
+static SSL_CTX *ssl_create_context(SSL_METHOD *method);
+int ssl_init_verify(SSL_CTX *, int (*)(int, X509_STORE_CTX *), int, int *);
+
+/* some forward declarations */
+static time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
+static char *make_cipher_string(const char *);
+static int init_diffie_hellman();
+static int ssl_server_verify(int, X509_STORE_CTX *);
+static int ssl_client_verify(int, X509_STORE_CTX *);
+static int ssl_verify(int, X509_STORE_CTX *, int, int);
+static int ssl_error(int, int, struct Client *);
+#if SSLEAY_VERSION_NUMBER >= 0x00904000L
+static int ssl_pem_password_cb(char *, int, int, void *);
+#else
+static int ssl_pem_password_cb(char *, int, int);
+#endif
+static RSA *ssl_tmp_rsa_cb(SSL *, int, int);
+
+#ifndef HAVE_ASN1_UTCTIME_GET /* current ssl versions (0.9.6) have commented this out */
+static time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s)
+{
+  struct tm tm;
+  int offset;
+   
+  memset(&tm,'\0',sizeof tm);
+  
+  #define g2(p) (((p)[0] - '0') * 10 + (p)[1] - '0')
+  
+  tm.tm_year = g2(s->data);
+  if(tm.tm_year < 50)
+    tm.tm_year += 100;
+  
+  tm.tm_mon = g2(s->data + 2)-1;
+  tm.tm_mday = g2(s->data + 4);
+  tm.tm_hour = g2(s->data + 6);
+  tm.tm_min = g2(s->data + 8);
+  tm.tm_sec = g2(s->data + 10);
+  
+  if(s->data[12] == 'Z')
+    offset = 0;
+  else
+    {
+      offset = g2(s->data + 13) * 60 + g2(s->data + 15);
+      if(s->data[12] == '-')
+        offset = -offset;
+    }
+  
+#undef g2
+  
+  return mktime(&tm) - offset * 60; /* FIXME: mktime assumes the current timezone
+                                     * instead of UTC, and unless we rewrite OpenSSL
+                                     * in Lisp we cannot locally change the timezone
+                                     * without possibly interfering with other parts
+                                     * of the program. timegm, which uses UTC, is
+                                     * non-standard.
+                                     * Also time_t is inappropriate for general
+                                     * UTC times because it may a 32 bit type. */
+}
+#endif
+
+/* need different cipher delimiter (':' is already used as field delimiter)
+ * 
+ * replace '/' with ':'
+ */
+static char *make_cipher_string(const char *str)
+{
+  static char buf[1024];
+  int x;
+  
+  for(x = 0; (x < 1023) && str[x]; x++)
+    {
+      if(str[x] != '/')
+        buf[x] = str[x];
+      else
+        buf[x] = ':';
+    }
+  
+  buf[x] = '\0';
+  
+  return buf;
+}
+
+/*
+ * init client/server context and verification stuff.
+ * this MUST be called AFTER parsing the config file,
+ * because of S: line.
+ */
+int ssl_init()
+{
+  log(L_DEBUG, "SSL Line - passphrase: %s cvl: %u svl: %u",
+      ssl_pem_passphrase, ssl_cvl, ssl_svl);
+  
+  SSL_load_error_strings();
+  SSLeay_add_ssl_algorithms();
+  
+  server_meth = SSLv23_server_method();  
+  client_meth = SSLv3_client_method();  
+  
+  if(ssl_cipher_list && ssl_cipher_list[0])
+    ssl_ciphers = make_cipher_string(ssl_cipher_list);
+  
+  server_ctx = ssl_create_context(server_meth);
+  client_ctx = ssl_create_context(client_meth);
+
+  log(L_NOTICE, "SSL cipher list: %s", ssl_ciphers);
+  
+  if(!server_ctx || !client_ctx)
+    return(log(L_ERROR, "Could not create SSL context") == NULL);
+  
+/*  if(init_diffie_hellman(server_ctx))
+    log(L_WARN, "Couldn't load Diffie-Hellman parameters from %s", CEPATH);*/
+  
+  if(ssl_init_verify(server_ctx, ssl_server_verify, ssl_svl, &server_verify_peer) ||
+     ssl_init_verify(client_ctx, ssl_client_verify, ssl_cvl, &client_verify_peer))
+    log(L_WARN, "Could not init certificate verification");
+  
+  return 0;
+}
+
+/*
+ * create a context, set the PEM passphrase callback, enable
+ * session cache, set timeouts and load certificate.
+ */
+static SSL_CTX *ssl_create_context(SSL_METHOD *method)
+{
+  SSL_CTX *ret;
+  
+  ret = SSL_CTX_new(method);
+  
+  if(ret == NULL)
+    return NULL;
+  
+  SSL_CTX_set_default_passwd_cb(ret, ssl_pem_password_cb);
+  SSL_CTX_set_tmp_rsa_callback(ret, ssl_tmp_rsa_cb);
+  
+#if SSLEAY_VERSION_NUMBER >= 0x00906000L
+  SSL_CTX_set_mode(ret, SSL_MODE_ENABLE_PARTIAL_WRITE |
+                        SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+#endif  
+  
+  SSL_CTX_set_session_cache_mode(ret, SSL_SESS_CACHE_BOTH);
+  SSL_CTX_set_timeout(server_ctx, 360);
+  SSL_CTX_set_timeout(client_ctx, 360);
+  
+  /* init certificate stuff for context */
+  if(!SSL_CTX_use_certificate_chain_file(ret, CEPATH))
+    return log(L_ERROR, "Error using certificate chain file '%s'", CEPATH);
+  
+  if(!SSL_CTX_use_RSAPrivateKey_file(ret, CEPATH, SSL_FILETYPE_PEM))
+    return log(L_ERROR, "Error using private key file '%s'", CEPATH);
+    
+  if(!SSL_CTX_check_private_key(ret))
+    return log(L_ERROR, "Certificate and private key do not match");
+  
+  if(!SSL_CTX_set_cipher_list(ret, ssl_ciphers))
+    return log(L_ERROR, "Error setting cipher list");
+   
+  return ret;
+}
+
+/*
+ * setup certificate verification stuff (callbacks etc.)
+ */
+int ssl_init_verify(SSL_CTX *ctx, int (*verify_callback)(int, X509_STORE_CTX *), int verify_level, int *verify_peer)
+{
+  int verify = 0;
+
+  /* init certificate verification stuff */
+  if(!SSL_CTX_set_default_verify_paths(ctx))
+    return(log(L_ERROR, "Could not set default verify paths") == NULL);
+  
+  if(!SSL_CTX_load_verify_locations(ctx, CAPATH, NULL))
+    return(log(L_ERROR, "Error loading verify certificates from %s", CAPATH) == NULL);
+  
+  SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(CAPATH));
+  
+  switch(verify_level)
+    {
+      case 3:
+        *verify_peer = 1;
+      case 2:
+        verify |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+      case 1:
+        verify |= SSL_VERIFY_PEER;
+      case 0:
+        break;
+      default:
+        log(L_WARN, "Bad verify level");
+    }
+  
+  SSL_CTX_set_verify(ctx, verify ? verify : SSL_VERIFY_NONE, verify_callback);
+  
+/*  stack = SSL_CTX_get_client_CA_list(ctx);
+  log(L_DEBUG, "There are %d CA_list things", sk_X509_NAME_num(stack));*/
+
+  /* SSL_CTX_set_info_callback(server_ctx, ssl_info_callback);
+     SSL_CTX_set_info_callback(client_ctx, ssl_info_callback); */
+  return 0;
+}
+
+/*
+ * just return the passphrase specified in the config file.
+ * return error when no passphrase in config.
+ */
+#if SSLEAY_VERSION_NUMBER >= 0x00904000L
+static int ssl_pem_password_cb(char *buf, int size, int rwflag, void *userdata)
+#else
+static int ssl_pem_password_cb(char *buf, int size, int rwflag)
+#endif
+{
+  if(ssl_pem_passphrase)
+    {
+      strncpy(buf, ssl_pem_passphrase, size - 1);
+      buf[size - 1] = '\0';
+  
+      return strlen(buf);
+    }
+  else      
+    log(L_WARN, "Passphrase required but not in config file (S-Line)");
+  
+  return -1;
+}
+
+/*
+ * generate a temporary RSA key
+ */
+static RSA *ssl_tmp_rsa_cb(SSL *ssl, int x, int len)
+{
+  log(L_DEBUG, "Creating a temporary RSA key of length %i...", len);
+
+  /* ... */
+  
+  return NULL;
+}
+
+/* 
+ * seed prng from 'filename', when 'filename' doesn't exist from
+ * '/dev/urandom'....
+ * 
+ * TODO: seed from another prng (gettimeofday() stuff) when '/dev/urandom'
+ *       doesn't exist.
+ */
+int ssl_seed_prng(char *filename)
+{
+  struct stat st;
+  int readbytes, writebytes;
+  
+  if(stat(filename, &st))
+    readbytes = RAND_load_file("/dev/urandom", RANDOM_SIZE);
+  else
+    readbytes = RAND_load_file(filename, RANDOM_SIZE);
+  
+  if(readbytes <= 0)
+    {
+      log(L_WARN, "Unable to retrieve any random data from %s", filename);
+      return 0;
+    }
+  else
+    log(L_DEBUG, "Read %d random bytes from %s", readbytes, filename);
+ 
+  writebytes = RAND_write_file(filename);
+  
+  if(writebytes <= 0)
+    {
+      log(L_WARN, "Failed to write random data to %s: %s", filename, strerror(errno));
+      return 0;
+    }
+  else
+    log(L_DEBUG, "Wrote %d random bytes to %s", writebytes, filename);
+  
+  return readbytes;  
+}
+
+/* 
+ * initialize diffie-hellman key exchange algorithm.
+ * (currently unused)
+ */
+int init_diffie_hellman(SSL_CTX *ctx)
+{
+  DH *dh;
+  BIO *bio;
+  
+  if(!(bio = BIO_new_file(CEPATH, "r")))
+    return -1;
+
+  if(!(dh = PEM_read_bio_DHparams(bio, NULL, NULL
+#if SSLEAY_VERSION_NUMBER >= 0x00904000L
+                                 , NULL
+#endif
+                                 )))
+    {
+      BIO_free(bio);
+      return -1;
+    }
+  
+  SSL_CTX_set_tmp_dh(ctx, dh);
+  log(L_NOTICE, "Diffie-Hellman initialized with %u bit key", DH_size(dh) * 8);
+  BIO_free(bio);    
+  DH_free(dh);
+  
+  return 0;
+}
+
+/*
+ * do handshake on an outgoing connection.
+ */
+int ssl_connect(struct Client *cptr)
+{
+  int ssl_err;
+
+  cptr->ssl = SSL_new(client_ctx);
+  CHK_NULL(cptr->ssl);    
+  SSL_set_connect_state(cptr->ssl);
+  SSL_set_fd(cptr->ssl, cptr->fd);
+  
+  SSL_set_app_data(cptr->ssl, (char *)cptr);
+  
+  if((ssl_err = SSL_connect(cptr->ssl)) <= 0)
+    {
+      ssl_err = SSL_get_error(cptr->ssl, ssl_err);
+
+      if(ssl_err == SSL_ERROR_WANT_WRITE)
+        {
+          errno = EAGAIN;
+          return 0;
+        }
+      
+      return ssl_error(ssl_err, SSL_CONNECT, cptr);
+    }
+
+//  cptr->ssl_isconnecting = 0;
+  sendto_realops("SSL_connect is done");
+  return 0;
+}
+
+/*
+ * do handshake on an incoming connection.
+ */
+int ssl_accept(struct Client *cptr, int fd)
+{
+  int ssl_err;
+
+  SSL_set_app_data(cptr->ssl, (char *)cptr);
+
+  if((ssl_err = SSL_accept(cptr->ssl)) <= 0)
+    {
+      switch(ssl_err = SSL_get_error(cptr->ssl, ssl_err))
+        {
+          case SSL_ERROR_SSL:
+            if(errno == 0)
+              return -1;
+          case SSL_ERROR_SYSCALL:
+            errno = EINTR;
+            return -1;
+          case SSL_ERROR_WANT_READ:
+          case SSL_ERROR_WANT_WRITE:
+            errno = EAGAIN;
+            return -1;
+          default:
+            return ssl_error(ssl_err, SSL_ACCEPT, cptr);
+        }
+      /* NOTREACHED */
+      return -1;
+    }
+
+  sendto_realops_lev(L_DEBUG, "SSL handshake done: %p", cptr->ssl);
+
+  return 0;
+}
+
+/*
+ * read from SSL
+ */
+int ssl_read(struct Client *cptr, void *buf, size_t sz)
+{
+  int len, ssl_err;
+
+  do
+    {      
+      cptr->read_blocked_on_write = 0;
+      cptr->read_blocked = 0;
+      
+      len = SSL_read(cptr->ssl, buf, sz);
+      
+      switch(ssl_err = SSL_get_error(cptr->ssl, len))
+        {
+          case SSL_ERROR_NONE:
+            break;
+          case SSL_ERROR_ZERO_RETURN:
+            return 0;
+          case SSL_ERROR_WANT_READ:
+            cptr->read_blocked = 1;
+            errno = EWOULDBLOCK;
+            return -1;
+          case SSL_ERROR_WANT_WRITE:
+            cptr->read_blocked_on_write=1;
+            break;
+          case SSL_ERROR_SSL:
+          case SSL_ERROR_SYSCALL:
+            if(errno == EWOULDBLOCK || errno == EAGAIN ||
+               errno == EINTR)
+            return -1;
+            break;
+          default:
+            return ssl_error(ssl_err, SSL_READ, cptr);
+        }      
+    }
+  while(SSL_pending(cptr->ssl) && !cptr->read_blocked);
+  
+  return len;
+}
+  
+
+/*
+ * write to SSL
+ */
+int ssl_write(struct Client *cptr, const void *buf, size_t sz)
+{
+  int len, ssl_err;
+
+  cptr->write_blocked_on_read = 0;
+  
+  len = SSL_write(cptr->ssl, buf, sz);
+  
+  switch(ssl_err = SSL_get_error(cptr->ssl, len))
+    {
+      case SSL_ERROR_NONE:
+        break;
+      case SSL_ERROR_ZERO_RETURN:
+        return 0;
+      case SSL_ERROR_WANT_READ:
+        cptr->write_blocked_on_read = 1;
+        break;
+      case SSL_ERROR_WANT_WRITE:
+        cptr->write_blocked = 1;
+        errno = EWOULDBLOCK;
+        return -1;
+      case SSL_ERROR_SSL:
+      case SSL_ERROR_SYSCALL:
+        if(errno == EWOULDBLOCK || errno == EAGAIN ||
+           errno == EINTR)
+          return -1;
+        break;
+      default:
+        return ssl_error(ssl_err, SSL_ACCEPT, cptr);
+    }
+  
+  return len;
+}
+
+/*
+ * ssl socket cleanup
+ */
+int ssl_shutdown(SSL *ssl)
+{
+  char i;
+  int rc;
+
+  rc = 0;
+  for(i = 0; i < 4; i++)
+    if((rc = SSL_shutdown(ssl)))
+      break;
+
+  return rc;
+}
+
+/*
+ * raise an error
+ */
+static int ssl_error(int error, int where, struct Client *sptr)
+{
+  /* don`t alter errno */
+  int errtmp = errno;
+  char *errstr = strerror(errtmp);
+  char *ssl_errstr, *ssl_func;
+
+  switch(where)
+    {
+      case SSL_READ:
+        ssl_func = "SSL_read()";
+        break;
+      case SSL_WRITE:
+        ssl_func = "SSL_write()";
+        break;
+      case SSL_ACCEPT:
+        ssl_func = "SSL_accept()";
+        break;
+      case SSL_CONNECT:
+        ssl_func = "SSL_connect()";
+        break;
+      default:
+        ssl_func = "undefined SSL func [this is a bug]";
+    }
+
+    switch(error)
+      {
+        case SSL_ERROR_NONE:
+          ssl_errstr = "No error";
+          break;
+        case SSL_ERROR_SSL:
+          ssl_errstr = "Internal OpenSSL error or protocol error";
+          break;
+        case SSL_ERROR_WANT_READ:
+          ssl_errstr = "OpenSSL functions requested a read()";
+          break;
+        case SSL_ERROR_WANT_WRITE:
+          ssl_errstr = "OpenSSL functions requested a write()";
+          break;
+        case SSL_ERROR_WANT_X509_LOOKUP:
+          ssl_errstr = "OpenSSL requested a X509 lookup which didn`t arrive";
+          break;
+        case SSL_ERROR_SYSCALL:
+          ssl_errstr = "Underlying syscall error";
+          break;
+        case SSL_ERROR_ZERO_RETURN:
+          ssl_errstr = "Underlying socket operation returned zero";
+          break;
+        case SSL_ERROR_WANT_CONNECT:
+          ssl_errstr = "OpenSSL functions wanted a connect()";
+          break;
+        default:
+          ssl_errstr = "Unknown OpenSSL error (huh?)";
+    }
+
+  if(error != SSL_ERROR_ZERO_RETURN)
+    {
+      sendto_realops("%s to "
+                     "%s!%s@%s aborted with%serror (%s). [%s]",
+                     ssl_func, *sptr->name ? sptr->name : "<unknown>",
+                     (sptr->user && sptr->username) ? sptr->username : "<unregistered>", sptr->sockhost,
+                     (errno > 0) ? " " : " no ", errstr, ssl_errstr);
+      log(L_WARN, "SSL error in %s: %s [%s]", ssl_func, errstr, ssl_errstr);
+    }
+  else
+    errtmp = ECONNRESET;
+  
+  /* if we reply() something here, we might just trigger another
+   * ssl_error() call and loop until a stack overflow...
+   * the client won`t get the ERROR : ... string, but this is
+   * the only way to do it.
+
+   * IRC protocol wasn`t SSL enabled .. --vejeta
+   */
+
+  errno = errtmp ? errtmp : ECONNABORTED; /* Software caused connection abort */
+  sptr->flags |= FLAGS_DEADSOCKET;
+  return -1;
+}
+
+
+/* 
+ * server certificate callback
+ */
+static int ssl_server_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+{
+  sendto_realops_flags(FLAGS_DEBUG, "ssl_server_verify callback (preverify: %u)", preverify_ok);
+  return ssl_verify(preverify_ok, x509_ctx, 1, ssl_svl);
+}
+
+/*
+ * client certificate callback
+ */
+static int ssl_client_verify(int preverify_ok, X509_STORE_CTX *x509_ctx)
+{
+  sendto_realops_flags(FLAGS_DEBUG, "ssl_client_verify callback (preverify: %u)", preverify_ok);
+  return ssl_verify(preverify_ok, x509_ctx, 0, ssl_cvl);
+}
+
+/*
+ * generic certificate callback
+ */
+static int ssl_verify(int preverify_ok, X509_STORE_CTX *x509_ctx, int isserver, int level)
+{
+  char           buf[256];
+//  X509          *err_cert;
+  int            err, depth;
+  SSL           *ssl;
+  struct Client *cptr;
+  X509_OBJECT    ret;
+  
+  X509_NAME_oneline(X509_get_subject_name(x509_ctx->current_cert),
+                    buf, 255);
+  
+  if(level == 0)
+    {
+      sendto_realops_flags(FLAGS_DEBUG, "ignoring %s verify callback: cert = '%s'",
+                           isserver ? "server" : "client", buf);
+      return 1; /* accept connection */
+    }
+  
+//  err_cert = X509_STORE_CTX_get_current_cert(x509_ctx);
+  err = X509_STORE_CTX_get_error(x509_ctx);
+  depth = X509_STORE_CTX_get_error_depth(x509_ctx);
+  
+  /*
+   * Retrieve the pointer to the SSL of the connection
+   * currently treated and the cptr from the object.
+   */
+  
+  ssl = X509_STORE_CTX_get_ex_data(x509_ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
+  cptr = (struct Client *)SSL_get_app_data(ssl);
+  
+/*  X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256);*/
+  cptr->verify_ok = -1;
+  
+  if(!preverify_ok)
+    {
+      sendto_realops_flags(FLAGS_DEBUG, "verify error: depth = %u, error = %u, cert = '%s'",
+                           depth, err, buf);
+      return 0; /* reject connection */
+    }
+  
+  if(level == 3 && depth == 0 && 
+     X509_STORE_get_by_subject(x509_ctx, X509_LU_X509,
+     X509_get_subject_name(x509_ctx->current_cert), &ret) != 1)
+    {
+      sendto_realops_flags(FLAGS_DEBUG, "verify error: no cert for %s", buf);
+      return 0; /* reject connection */
+    }
+  
+  cptr->verify_ok = 1;
+  sendto_realops_flags(FLAGS_DEBUG, "verify ok: depth = %u, cert = '%s'", depth, buf);
+  
+  return preverify_ok;
+}
+
+/*
+ * send certificate info as notice to a client
+ */
+int ssl_show_cert(struct Client *sptr, struct Client *acptr, X509 *cert)
+{
+  ASN1_UTCTIME *utc;
+  time_t from, to, current = time(NULL);
+  struct tm *tm;
+  char v_from[32], v_to[32];
+  char buf[256];
+  long serial, version;
+  ASN1_INTEGER *asn1_i;
+
+  /* ugly time string formatting */
+  utc = X509_get_notBefore(cert);
+  from = ASN1_UTCTIME_get(utc);
+  tm = localtime(&from);
+  strftime(v_from, 32, "%F %H:%M", tm);
+  utc = X509_get_notAfter(cert);
+  to = ASN1_UTCTIME_get(utc);
+  tm = localtime(&to);
+  strftime(v_to, 32, "%F %H:%M", tm);
+      
+  sendto_one(sptr, ":%s NOTICE %s :*** Certificate information about %s",
+             me.name, sptr->name, acptr->name);
+
+  asn1_i = X509_get_serialNumber(cert);
+  serial = ASN1_INTEGER_get(asn1_i);
+  version = X509_get_version(cert);
+  sendto_one(sptr, ":%s NOTICE %s :Serial #%u (X509 version %u)", me.name, sptr->name, serial, version);
+  
+  X509_NAME_oneline(X509_get_subject_name(cert), buf, 255);
+  sendto_one(sptr, ":%s NOTICE %s :Subject: %s", me.name, sptr->name, buf);
+  
+  X509_NAME_oneline(X509_get_issuer_name(cert), buf, 255);
+  sendto_one(sptr, ":%s NOTICE %s :Issuer:  %s", me.name, sptr->name, buf);
+  
+  if(acptr->verify_ok)
+    sendto_one(sptr, ":%s NOTICE %s :Verify:  %s", me.name, sptr->name,
+               (acptr->verify_ok == 1) ? "Ok" : "Failed");
+  
+  sendto_one(sptr, ":%s NOTICE %s :Valid from %s to %s (%s)",
+             me.name, sptr->name, v_from, v_to,
+             (from <= current && current < to) ? "valid" : 
+             (from > current) ? "not yet valid" : "expired");
+      
+  return 0;
+}
+
+/*
+ * send info about an ssl session
+ */ 
+int ssl_show_info(struct Client *sptr, struct Client *acptr)
+{
+  SSL_CIPHER *cipher;
+  const char *cipher_name;
+  int cipher_bits;
+  time_t t, to;
+  struct tm *tm;
+  char timebuf[32];
+  
+  if(!acptr->ssl)
+    {
+      log(L_WARN, "ssl_show_info called but non-ssl link (this is a bug)");
+      return 0;
+    }
+  
+  if(!(cipher = SSL_get_current_cipher(acptr->ssl)))
+    {
+      log(L_WARN, "could not retrieve cipher for %s", acptr->name);
+      return 0;
+    }
+
+  cipher_name = SSL_CIPHER_get_name(cipher);
+  SSL_CIPHER_get_bits(cipher, &cipher_bits);
+       
+  sendto_one(sptr, ":%s NOTICE %s :*** Session information about link between %s and %s",
+             me.name, sptr->name, acptr->name, me.name);
+  
+  sendto_one(sptr, ":%s NOTICE %s :Protocol:    %s", 
+             me.name, sptr->name, SSL_CIPHER_get_version(cipher));
+  sendto_one(sptr, ":%s NOTICE %s :Cipher:      %s (%i bits)",
+             me.name, sptr->name, cipher_name, cipher_bits);
+  
+  if(acptr->ssl->session)
+    {
+      t = SSL_SESSION_get_time(acptr->ssl->session);
+      to = SSL_SESSION_get_timeout(acptr->ssl->session);
+  
+      tm = localtime(&t);
+      strftime(timebuf, 32, "%F %H:%M", tm);      
+      
+      sendto_one(sptr, ":%s NOTICE %s :Established: %s", 
+                 me.name, sptr->name, timebuf);
+      
+      sendto_one(sptr, ":%s NOTICE %s :Timeout:     %d seconds",
+                 me.name, sptr->name, to);
+    }
+  
+  return 1;
+}
+
+/*
+ * m_cert()
+ *
+ * parv[0] = sender prefix
+ * parv[1] = server or client
+ *
+ * show certificate info about clients.
+ */
+int     m_cert(struct Client *cptr,
+                struct Client *sptr,
+                int parc,
+                char *parv[])
+{  
+  struct Client *acptr, *a2cptr = &me;
+  X509 *cert;
+#ifdef PACE_CERT
+  static time_t last_used = 0L;
+#endif
+  
+  /* only allow this command from ssl links */
+  if(!IsSSL(cptr) || !cptr->ssl)
+    {
+      if(MyClient(sptr))
+        sendto_one(cptr, form_str(ERR_UNKNOWNCOMMAND),
+                   me.name, sptr->name, "CERT");
+      return 0;
+    }
+  
+#ifdef PACE_CERT  
+  if(MyClient(sptr) && !IsAnOper(sptr))
+    {
+      if((last_used + PACE_WAIT) > CurrentTime)
+        {
+          sendto_one(sptr,form_str(RPL_LOAD2HI), me.name,parv[0]);
+          return 0;
+        }
+      else
+        last_used = CurrentTime;
+    }
+#endif
+  
+  /*
+   * find the server/client to
+   * show certificate info from.
+   */
+  if(parc <= 1)
+    {
+      /* set acptr to &me when local client and no arg */
+      if(MyClient(sptr))
+        acptr = &me;
+      else
+        return 0;
+    }
+  else
+    if(valid_hostname(parv[1]))
+      {
+        /* arg looks like a hostname, find server struct */
+        if((acptr = find_server(parv[1])) == NULL)
+          {
+            sendto_one(sptr, form_str(ERR_NOSUCHSERVER), me.name, sptr->name, parv[1]);
+            return 0;
+          }
+        
+        a2cptr = acptr;
+      }
+    else
+      {      
+        /* could be a nickname, find client struct */
+        if((acptr = find_chasing(sptr, parv[1], NULL)) == NULL)
+          return 0;
+        
+        a2cptr = acptr->servptr;
+      }
+  
+  /* check wether client/server is in ssl mode */
+  if((IsPerson(acptr) && !IsSSLUmode(acptr)) ||
+     (IsServer(acptr) && !IsSSLServ(acptr)))    
+    {
+      sendto_one(sptr, form_str(RPL_NOTSSL), me.name, sptr->name);
+      return 0;
+    }
+  
+  /*
+   * send out the request when it is not a
+   * local connect and not &me.
+   * else dump information.
+   */
+  
+  if(MyConnect(acptr) || &me == acptr)
+    {
+      if(&me == acptr)
+        cert = SSL_get_certificate(cptr->ssl);
+      else
+        cert = SSL_get_peer_certificate(acptr->ssl);
+      
+      if(cert == NULL)
+        sendto_one(sptr, ":%s NOTICE %s :*** %s has no certificate",
+                   me.name, sptr->name, acptr->name);
+      else
+        ssl_show_cert(sptr, acptr, cert);
+      
+      if(acptr == &me)
+        ssl_show_info(sptr, sptr);
+      else
+        ssl_show_info(sptr, acptr);
+      
+      return 1;     
+    }
+  else
+    /* send out the stuff */      
+    sendto_one(a2cptr, ":%s CERT %s", sptr->name, acptr->name);
+  
+  return 1;
+}
+
+#endif
diff -uNrd ircd-hybrid-6.0/src/test/Makefile ircd-pi1.0a/src/test/Makefile
--- ircd-hybrid-6.0/src/test/Makefile	Sun Aug  1 14:17:48 1999
+++ ircd-pi1.0a/src/test/Makefile	Wed Dec 31 19:00:00 1969
@@ -1,34 +0,0 @@
-#
-# Makefile for test progs
-#
-#
-# $Id: Makefile,v 1.8 1999/08/01 18:17:48 db Exp $
-#
-#
-CPPFLAGS = -I../../include
-CFLAGS   = -O2 -Wall
-# CPPFLAGS = -I../../include -DDEAD_CODE
-
-ALL: strncpy_t match_t ilimit_test
-
-
-ilimit_test: ilimit_test.o
-	${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $^
-match_t: match_t.o ../match.o
-	${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $^
-
-strncpy_t: strncpy_t.o
-	${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $^
-
-parsetest: parsetest.o
-	${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $^
-
-.PHONY: clean distclean
-
-clean:
-	rm -f *.o match_t ilimit_test strncpy_t
-
-distclean: clean
-	rm -f .depend
-
--include .depend
diff -uNrd ircd-hybrid-6.0/src/test/data/collapse.data ircd-pi1.0a/src/test/data/collapse.data
--- ircd-hybrid-6.0/src/test/data/collapse.data	Thu Jun 24 03:38:20 1999
+++ ircd-pi1.0a/src/test/data/collapse.data	Wed Dec 31 19:00:00 1969
@@ -1,17 +0,0 @@
-***???***
-a*b**c***x
-**7?***
-
-*\*****??
-a*??0
-*!*@???**.com
-98cj\***
-***???**\*
-?999*?999*?999*?999*?999*?999*?999*?999*?999****\
-*******
-1234567890
-*******abcdek**?999hfhkx87&@#&$&%(^***x,d/***
-*\*****\***
-?
-x
-?***?
diff -uNrd ircd-hybrid-6.0/src/test/data/match.data ircd-pi1.0a/src/test/data/match.data
--- ircd-hybrid-6.0/src/test/data/match.data	Thu Jun 24 03:38:20 1999
+++ ircd-pi1.0a/src/test/data/match.data	Wed Dec 31 19:00:00 1969
@@ -1,16 +0,0 @@
-all.of.the.following.should.match *
-blarg!~foo@test.org *!*@test.org
-flarn!foo@test.org ?*.org
-blah@merde.com blah@me?*
-woof *
-!luser@ppp.lame.org *!*@ppp*?
-honk ?o*?
-balderdash!brouhaha@ballyhoo.org bal*!*@*.org
-dumb dumb
-x ?
-dd ?d
-ccjy ?*j?
-a *
-aaaaaaaaa a*
-baaaaaaaaaaaab b*b
-~shaft@isaac.badass.net *?a*c*b*?
diff -uNrd ircd-hybrid-6.0/src/test/ilimit_test.c ircd-pi1.0a/src/test/ilimit_test.c
--- ircd-hybrid-6.0/src/test/ilimit_test.c	Sat Jul 10 02:48:13 1999
+++ ircd-pi1.0a/src/test/ilimit_test.c	Wed Dec 31 19:00:00 1969
@@ -1,40 +0,0 @@
-/*
- * ilimit_test - test limits of ints and overflow charactersitics
- *
- * Thomas Helvey <tomh@inxpress.net>
- *
- * The output of this test should be:
- *
- * ui: 2147483647 i: 2147483647
- * ui: 2147483648 i: -2147483648
- * ui: 4294967295
- * ui: 0
- *
- * If you get results different than the above you may have problems
- * communciating integer values with other servers. Unfortunately there
- * are no guarantees about this sort of thing but this should produce
- * the same results on all 32 bit (ILP32) and most 64 bit hardware (I32LP64).
- * NOTE: This test should have some sort of expiration date, I'm sure this
- * won't be valid forever, but it seems to ok in 1999.
- *
- * $Id: ilimit_test.c,v 1.2 1999/07/10 06:48:13 tomh Exp $
- */
-#include <stdio.h>
-#include <limits.h>
-
-int main(int argc, char** argv)
-{
-  unsigned int ui = INT_MAX;
-  int          i  = INT_MAX;
-
-  printf("ui: %u i: %d\n", ui, i);
-  ui += 1;
-  i  += 1;
-  printf("ui: %u i: %d\n", ui, i);
-  ui = UINT_MAX;
-  printf("ui: %u\n", ui);
-  ui += 1;
-  printf("ui: %u\n", ui);
-
-  return 0;
-}
diff -uNrd ircd-hybrid-6.0/src/test/match_t.c ircd-pi1.0a/src/test/match_t.c
--- ircd-hybrid-6.0/src/test/match_t.c	Mon Jul 19 23:56:32 1999
+++ ircd-pi1.0a/src/test/match_t.c	Wed Dec 31 19:00:00 1969
@@ -1,70 +0,0 @@
-/*
- * match_t.c - test driver for match used in ircd
- *
- * Thomas Helvey <tomh@inxpress.net>
- *
- * $Id: match_t.c,v 1.3 1999/07/20 03:56:32 tomh Exp $
- */
-#include "irc_string.h"
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-const char* const MATCH_FILE    = "data/match.data";
-const char* const COLLAPSE_FILE = "data/collapse.data";
-
-void pcollapse(char* buf)
-{
-  printf("%s\n", collapse(buf));
-}
-
-void test_collapse(FILE* file)
-{
-  char buf[BUFSIZ + 1];
-  char* p;
-
-  while (fgets(buf, BUFSIZ, file)) {
-    if ((p = strchr(buf, '\n'))) 
-      *p = '\0';
-    pcollapse(buf);
-  }
-}
-
-void test_match(FILE* file)
-{
-  char buf[BUFSIZ + 1];
-  while (fgets(buf, BUFSIZ, file)) {
-    char* p = buf;
-    buf[strlen(buf) - 1] = '\0';
-    while (*p && !IsSpace(*p))
-      ++p;
-    while (*p && IsSpace(*p))
-      *p++ = '\0';
-    if (!*p) continue;
-    printf("%d: %s %s\n", match(p, buf), p, buf);
-  }
-  printf("\n");
-}
-
-int main(int argc, char** argv)
-{
-  FILE* file = fopen(COLLAPSE_FILE, "r");
-  if (file) {
-    test_collapse(file);
-    fclose(file);
-  }
-  else
-    printf("skipped collapse: %s %s\n", COLLAPSE_FILE, strerror(errno));
-    
-  file = fopen(MATCH_FILE, "r");
-  if (file) {
-    test_match(file);
-    fclose(file);
-  }
-  else
-    printf("skipped match: %s %s\n", MATCH_FILE, strerror(errno));
-    
-  return 0;
-}
-
-
diff -uNrd ircd-hybrid-6.0/src/test/parsetest.c ircd-pi1.0a/src/test/parsetest.c
--- ircd-hybrid-6.0/src/test/parsetest.c	Thu Oct  5 23:01:00 2000
+++ ircd-pi1.0a/src/test/parsetest.c	Wed Dec 31 19:00:00 1969
@@ -1,718 +0,0 @@
-/*
- * $Id: parsetest.c,v 1.7 2000/10/06 03:01:00 lusky Exp $
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include "../../include/irc_string.h"
-
-#define MAXPARA 20
-#define HOSTLEN 63
-
-/* Timing stuff (for performance measurements): compile with -DORATIMING
-   and put a TMRESET where you want the counter of time spent set to 0,
-   a TMPRINT where you want the accumulated results, and TMYES/TMNO pairs
-   around the parts you want timed -orabidoo
-*/
-struct timeval tsdnow, tsdthen;
-unsigned long tsdms;
-#define TMRESET tsdms=0;
-#define TMYES gettimeofday(&tsdthen, NULL);
-#define TMNO gettimeofday(&tsdnow, NULL); if (tsdnow.tv_sec!=tsdthen.tv_sec) tsdms+=1000000*(tsdnow.tv_sec-tsdthen.tv_sec); tsdms+=tsdnow.tv_usec; tsdms-=tsdthen.tv_usec;
-#define TMPRINT printf("Time spent: %ld ms\n", tsdms);
-
-static  char    *para[MAXPARA+1];
-
-static  char    sender[HOSTLEN+1];
-
-static char buffer[1024];  /* ZZZ must this be so big? must it be here? */
-
-#define NEW_PARSE
-
-char name[] = "irc.db.net";
-char input[512];
-char parse_input[512];
-char test_input[]="privmsg #test_channel :some test message rah rah\r\n";
-int show = 0;
-
-main()
-{
-  time_t start_time;
-  time_t end_time;
-
-  char *p;
-  int i;
-
-  while(fgets(input,512,stdin))
-    {
-      p = strchr(input,'\n');
-      if(p)
-	{*p++ = '\r'; *p++ = '\n'; *p++ = '\0'; }
-
-      if(!strcasecmp(input,"bench"))
-	{
-	  show = 0;
-	  TMRESET;
-	  TMYES;
-	  for(i=0;i<100000;i++)
-	    {
-	      strcpy(parse_input,test_input);
-	      parse(parse_input,test_input+sizeof(test_input));
-	    }
-	  TMNO;
-	  TMPRINT;
-
-	  TMRESET;
-
-	  TMYES;
-	  for(i=0;i<100000;i++)
-	    {
-	      strcpy(parse_input,test_input);
-	      new_parse(parse_input,test_input+sizeof(test_input));
-	    }
-	  TMNO;
-	  TMPRINT;
-	}
-      else
-	{
-	  show = 1;
-	  printf("old parse\n");
-	  strcpy(parse_input,input);
-	  parse(parse_input,input+510);
-	  printf("new parse\n");
-	  strcpy(parse_input,input);
-	  new_parse(parse_input,input+510);
-	}
-    }
-
-}
-
-/*
- * parse a buffer.
- *
- * NOTE: parse() should not be called recusively by any other functions!
- */
-int parse(char *buffer, char *bufend)
-{
-  char  *ch;
-  char  *s;
-  int   i;
-  char* numeric = 0;
-  int   paramcount=MAXPARA;
-  int   parc;
-
-  s = sender;
-  *s = '\0';
-
-  for (ch = buffer; *ch == ' '; ch++)   /* skip spaces */
-    /* null statement */ ;
-
-  para[0] = name;
-
-  if (*ch == ':')
-    {
-      /*
-      ** Copy the prefix to 'sender' assuming it terminates
-      ** with SPACE (or NULL, which is an error, though).
-      */
-      for (++ch, i = 0; *ch && *ch != ' '; ++ch )
-        if (s < (sender + sizeof(sender)-1))
-          *s++ = *ch; /* leave room for NULL */
-      *s = '\0';
-
-      while (*ch == ' ')
-        ch++;
-    }
-
-  if(show)
-    printf("old parse sender [%s] i = %d\n", sender, i);
-
-  if (*ch == '\0')
-    {
-      fprintf(stderr,"empty message\n");
-    }
-
-  /*
-  ** Extract the command code from the packet.  Point s to the end
-  ** of the command code and calculate the length using pointer
-  ** arithmetic.  Note: only need length for numerics and *all*
-  ** numerics must have parameters and thus a space after the command
-  ** code. -avalon
-  *
-  * ummm???? - Dianora
-  */
-
-  if( *(ch + 3) == ' ' && /* ok, lets see if its a possible numeric.. */
-      IsDigit(*ch) && IsDigit(*(ch + 1)) && IsDigit(*(ch + 2)) )
-    {
-      numeric = ch;
-      paramcount = MAXPARA;
-      s = ch + 3;       /* I know this is ' ' from above if */
-      *s++ = '\0';      /* blow away the ' ', and point s to next part */
-    }
-  else
-    {
-      s = strchr(ch, ' ');      /* moved from above,now need it here */
-      if (s)
-        *s++ = '\0';
-
-      paramcount = 3;
-      i = bufend - ((s) ? s : ch);
-
-      if (show)
-	{
-	  printf("old parse s = %lX ch = %lX\n", s , ch );
-	  printf("old parse i = bufend - ((s) ? s : ch) = %d \n", i );
-	  printf("old parse: paramcount %d i = %d\n", paramcount, i );
-	}
-    }
-
-  /*
-  ** Must the following loop really be so devious? On
-  ** surface it splits the message to parameters from
-  ** blank spaces. But, if paramcount has been reached,
-  ** the rest of the message goes into this last parameter
-  ** (about same effect as ":" has...) --msa
-  */
-
-  /* Note initially true: s==NULL || *(s-1) == '\0' !! */
-
-  para[0] = sender;
-
-  i = 0;
-  if (s)
-    {
-      if (paramcount > MAXPARA)
-        paramcount = MAXPARA;
-      for (;;)
-        {
-          /*
-          ** Never "FRANCE " again!! ;-) Clean
-          ** out *all* blanks.. --msa
-          */
-          while (*s == ' ')
-            *s++ = '\0';
-
-          if (*s == '\0')
-            break;
-          if (*s == ':')
-            {
-              /*
-              ** The rest is single parameter--can
-              ** include blanks also.
-              */
-              para[++i] = s + 1;
-              break;
-            }
-          para[++i] = s;
-          if (i >= paramcount)
-            break;
-          for (; *s != ' ' && *s; s++)
-            /* null statement */ ;
-        }
-    }
-
-  para[++i] = NULL;
-  /*  do_numeric(numeric, cptr, from, i, para); */
-
-  parc = i;
-
-  if(show)
-    {
-      printf("parc = %d \n", i);
-
-      for(i=0;i < parc;i++)
-	{
-	  printf("parv[%d] = [%s]\n", i, para[i]);
-	}
-    }
-}
-
-/*
- * parse a buffer.
- *
- * NOTE: parse() should not be called recusively by any other functions!
- */
-int new_parse(char *buffer, char *bufend)
-{
-  char  *ch;
-  char  *s;
-  int   i;
-  char* numeric = 0;
-  int   paramcount=MAXPARA;
-  int   parc;
-
-  s = sender;
-  *s = '\0';
-
-  ch = buffer;
-
-  while(*ch == ' ')
-    ch++;
-
-  para[0] = name;
-#ifdef NEW_PARSE
-  if (*ch == ':')
-    {
-      ch++;
-
-      /*
-      ** Copy the prefix to 'sender' assuming it terminates
-      ** with SPACE (or NULL, which is an error, though).
-      */
-      for (i = 0; *ch && *ch != ' '; i++ )
-	{
-	  if (i < (sizeof(sender)-1))
-	    *s++ = *ch++; /* leave room for NULL */
-	}
-      *s = '\0';
-
-      while (*ch == ' ')
-        ch++;
-    }
-#else
-  if (*ch == ':')
-    {
-      /*
-      ** Copy the prefix to 'sender' assuming it terminates
-      ** with SPACE (or NULL, which is an error, though).
-      */
-      for (++ch, i = 0; *ch && *ch != ' '; ++ch )
-        if (s < (sender + sizeof(sender)-1))
-          *s++ = *ch; /* leave room for NULL */
-      *s = '\0';
-
-      while (*ch == ' ')
-        ch++;
-    }
-#endif
-
-  if(show)
-    printf("new parse sender [%s] i = %d\n", sender, i);
-
-  if (*ch == '\0')
-    {
-      fprintf(stderr,"empty message\n");
-    }
-
-  /*
-  ** Extract the command code from the packet.  Point s to the end
-  ** of the command code and calculate the length using pointer
-  ** arithmetic.  Note: only need length for numerics and *all*
-  ** numerics must have parameters and thus a space after the command
-  ** code. -avalon
-  *
-  * ummm???? - Dianora
-  */
-
-  if( *(ch + 3) == ' ' && /* ok, lets see if its a possible numeric.. */
-      IsDigit(*ch) && IsDigit(*(ch + 1)) && IsDigit(*(ch + 2)) )
-    {
-      numeric = ch;
-      paramcount = MAXPARA;
-      s = ch + 3;       /* I know this is ' ' from above if */
-      *s++ = '\0';      /* blow away the ' ', and point s to next part */
-    }
-  else
-    {
-      s = strchr(ch, ' ');      /* moved from above,now need it here */
-      if (s)
-        *s++ = '\0';
-
-      paramcount = 3;
-      i = bufend - ((s) ? s : ch);
-
-      if (show)
-	{
-	  printf("new parse s = %lX ch = %lX\n", s , ch );
-	  printf("new parse i = bufend - ((s) ? s : ch) = %d \n", i );
-	  printf("new parse: paramcount %d i = %d\n", paramcount, i );
-	}
-    }
-
-  /*
-  ** Must the following loop really be so devious?
-  *
-  *  nope.
-  *
-  ** On surface it splits the message to parameters from
-  ** blank spaces. But, if paramcount has been reached,
-  ** the rest of the message goes into this last parameter
-  ** (about same effect as ":" has...) --msa
-  */
-
-  /* Note initially true: s==NULL || *(s-1) == '\0' !! */
-
-  para[0] = sender;
-
-  i = 1;
-  if (s)
-    {
-      if (paramcount > MAXPARA)
-        paramcount = MAXPARA;
-
-#ifdef NEW_PARSE
-      for (;;)
-        {
-	  /* Never BAD CODE again */
-
-	  while(*s == ' ')	/* tabs are not considered space */
-	    s++;
-
-          if (*s == ':')
-            {
-              /*
-              ** The rest is single parameter--can
-              ** include blanks also.
-              */
-              para[i++] = s + 1;
-              break;
-            }
-	  else
-	    {
-	      para[i++] = s;
-	      if (i > paramcount)
-		{
-		  break;
-		}
-	      else
-		{
-		  /* scan for end of string, either ' ' or '\0' */
-		  while (IsNonEOS(*s))
-		    s++;
-
-		  if(*s == '\0')
-		    break;
-		  else
-		    *s++ = '\0';
-		}
-	    }
-        }
-    }
-
-  para[i] = NULL;
-  parc = i;
-#else
-      for (;;)
-        {
-          /*
-          ** Never "FRANCE " again!! ;-) Clean
-          ** out *all* blanks.. --msa
-          */
-          while (*s == ' ')
-            *s++ = '\0';
-
-          if (*s == '\0')
-            break;
-          if (*s == ':')
-            {
-              /*
-              ** The rest is single parameter--can
-              ** include blanks also.
-              */
-              para[++i] = s + 1;
-              break;
-            }
-          para[++i] = s;
-          if (i >= paramcount)
-            break;
-          for (; *s != ' ' && *s; s++)
-            /* null statement */ ;
-        }
-    }
-
-  para[++i] = NULL;
-  /*  do_numeric(numeric, cptr, from, i, para); */
-
-  parc = i;
-#endif
-
-  if(show)
-    {
-      printf("parc = %d \n", parc);
-      printf("sender [%s]\n", sender );
-
-      for(i=0;i < parc;i++)
-	{
-	  printf("parv[%d] = [%s]\n", i, para[i]);
-	}
-    }
-}
-
-
-/*
- * CharAttrs table
- *
- * NOTE: RFC 1459 sez: anything but a ^G, comma, or space is allowed
- * for channel names
- */
-const unsigned int CharAttrs[] = {
-/* 0  */     CNTRL_C,
-/* 1  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 2  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 3  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 4  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 5  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 6  */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 7 BEL */  CNTRL_C|NONEOS_C,
-/* 8  \b */  CNTRL_C|CHAN_C|NONEOS_C,
-/* 9  \t */  CNTRL_C|SPACE_C|CHAN_C|NONEOS_C,
-/* 10 \n */  CNTRL_C|SPACE_C|CHAN_C|NONEOS_C,
-/* 11 \v */  CNTRL_C|SPACE_C|CHAN_C|NONEOS_C,
-/* 12 \f */  CNTRL_C|SPACE_C|CHAN_C|NONEOS_C,
-/* 13 \r */  CNTRL_C|SPACE_C|CHAN_C|NONEOS_C,
-/* 14 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 15 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 16 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 17 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 18 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 19 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 20 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 21 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 22 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 23 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 24 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 25 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 26 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 27 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 28 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 29 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 30 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* 31 */     CNTRL_C|CHAN_C|NONEOS_C,
-/* SP */     PRINT_C|SPACE_C,
-/* ! */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C,
-/* " */      PRINT_C|CHAN_C|NONEOS_C,
-/* # */      PRINT_C|CHANPFX_C|CHAN_C|NONEOS_C,
-/* $ */      PRINT_C|CHAN_C|NONEOS_C|USER_C,
-/* % */      PRINT_C|CHAN_C|NONEOS_C,
-/* & */      PRINT_C|CHANPFX_C|CHAN_C|NONEOS_C,
-/* ' */      PRINT_C|CHAN_C|NONEOS_C,
-/* ( */      PRINT_C|CHAN_C|NONEOS_C,
-/* ) */      PRINT_C|CHAN_C|NONEOS_C,
-/* * */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C,
-/* + */      PRINT_C|CHAN_C|NONEOS_C,
-/* , */      PRINT_C|NONEOS_C,
-/* - */      PRINT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* . */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C|HOST_C,
-#ifdef RFC1035_ANAL
-/* / */      PRINT_C|CHAN_C|NONEOS_C,
-#else
-/* / */      PRINT_C|CHAN_C|NONEOS_C|HOST_C,
-#endif
-/* 0 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 1 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 2 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 3 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 4 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 5 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 6 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 7 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 8 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* 9 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* : */      PRINT_C|CHAN_C|NONEOS_C,
-/* ; */      PRINT_C|CHAN_C|NONEOS_C,
-/* < */      PRINT_C|CHAN_C|NONEOS_C,
-/* = */      PRINT_C|CHAN_C|NONEOS_C,
-/* > */      PRINT_C|CHAN_C|NONEOS_C,
-/* ? */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C,
-/* @ */      PRINT_C|KWILD_C|CHAN_C|NONEOS_C,
-/* A */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* B */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* C */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* D */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* E */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* F */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* G */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* H */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* I */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* J */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* K */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* L */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* M */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* N */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* O */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* P */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* Q */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* R */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* S */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* T */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* U */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* V */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* W */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* X */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* Y */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* Z */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* [ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* \ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* ] */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* ^ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-#ifdef RFC1035_ANAL
-/* _ */      PRINT_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-#else
-/* _ */      PRINT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-#endif
-/* ` */      PRINT_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* a */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* b */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* c */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* d */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* e */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* f */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* g */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* h */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* i */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* j */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* k */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* l */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* m */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* n */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* o */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* p */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* q */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* r */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* s */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* t */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* u */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* v */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* w */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* x */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* y */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* z */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C,
-/* { */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* | */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* } */      PRINT_C|ALPHA_C|NICK_C|CHAN_C|NONEOS_C|USER_C,
-/* ~ */      PRINT_C|ALPHA_C|CHAN_C|NONEOS_C|USER_C,
-/* del  */   CHAN_C|NONEOS_C,
-/* 0x80 */   CHAN_C|NONEOS_C,
-/* 0x81 */   CHAN_C|NONEOS_C,
-/* 0x82 */   CHAN_C|NONEOS_C,
-/* 0x83 */   CHAN_C|NONEOS_C,
-/* 0x84 */   CHAN_C|NONEOS_C,
-/* 0x85 */   CHAN_C|NONEOS_C,
-/* 0x86 */   CHAN_C|NONEOS_C,
-/* 0x87 */   CHAN_C|NONEOS_C,
-/* 0x88 */   CHAN_C|NONEOS_C,
-/* 0x89 */   CHAN_C|NONEOS_C,
-/* 0x8A */   CHAN_C|NONEOS_C,
-/* 0x8B */   CHAN_C|NONEOS_C,
-/* 0x8C */   CHAN_C|NONEOS_C,
-/* 0x8D */   CHAN_C|NONEOS_C,
-/* 0x8E */   CHAN_C|NONEOS_C,
-/* 0x8F */   CHAN_C|NONEOS_C,
-/* 0x90 */   CHAN_C|NONEOS_C,
-/* 0x91 */   CHAN_C|NONEOS_C,
-/* 0x92 */   CHAN_C|NONEOS_C,
-/* 0x93 */   CHAN_C|NONEOS_C,
-/* 0x94 */   CHAN_C|NONEOS_C,
-/* 0x95 */   CHAN_C|NONEOS_C,
-/* 0x96 */   CHAN_C|NONEOS_C,
-/* 0x97 */   CHAN_C|NONEOS_C,
-/* 0x98 */   CHAN_C|NONEOS_C,
-/* 0x99 */   CHAN_C|NONEOS_C,
-/* 0x9A */   CHAN_C|NONEOS_C,
-/* 0x9B */   CHAN_C|NONEOS_C,
-/* 0x9C */   CHAN_C|NONEOS_C,
-/* 0x9D */   CHAN_C|NONEOS_C,
-/* 0x9E */   CHAN_C|NONEOS_C,
-/* 0x9F */   CHAN_C|NONEOS_C,
-/* 0xA0 */   CHAN_C|NONEOS_C,
-/* 0xA1 */   CHAN_C|NONEOS_C,
-/* 0xA2 */   CHAN_C|NONEOS_C,
-/* 0xA3 */   CHAN_C|NONEOS_C,
-/* 0xA4 */   CHAN_C|NONEOS_C,
-/* 0xA5 */   CHAN_C|NONEOS_C,
-/* 0xA6 */   CHAN_C|NONEOS_C,
-/* 0xA7 */   CHAN_C|NONEOS_C,
-/* 0xA8 */   CHAN_C|NONEOS_C,
-/* 0xA9 */   CHAN_C|NONEOS_C,
-/* 0xAA */   CHAN_C|NONEOS_C,
-/* 0xAB */   CHAN_C|NONEOS_C,
-/* 0xAC */   CHAN_C|NONEOS_C,
-/* 0xAD */   CHAN_C|NONEOS_C,
-/* 0xAE */   CHAN_C|NONEOS_C,
-/* 0xAF */   CHAN_C|NONEOS_C,
-/* 0xB0 */   CHAN_C|NONEOS_C,
-/* 0xB1 */   CHAN_C|NONEOS_C,
-/* 0xB2 */   CHAN_C|NONEOS_C,
-/* 0xB3 */   CHAN_C|NONEOS_C,
-/* 0xB4 */   CHAN_C|NONEOS_C,
-/* 0xB5 */   CHAN_C|NONEOS_C,
-/* 0xB6 */   CHAN_C|NONEOS_C,
-/* 0xB7 */   CHAN_C|NONEOS_C,
-/* 0xB8 */   CHAN_C|NONEOS_C,
-/* 0xB9 */   CHAN_C|NONEOS_C,
-/* 0xBA */   CHAN_C|NONEOS_C,
-/* 0xBB */   CHAN_C|NONEOS_C,
-/* 0xBC */   CHAN_C|NONEOS_C,
-/* 0xBD */   CHAN_C|NONEOS_C,
-/* 0xBE */   CHAN_C|NONEOS_C,
-/* 0xBF */   CHAN_C|NONEOS_C,
-/* 0xC0 */   CHAN_C|NONEOS_C,
-/* 0xC1 */   CHAN_C|NONEOS_C,
-/* 0xC2 */   CHAN_C|NONEOS_C,
-/* 0xC3 */   CHAN_C|NONEOS_C,
-/* 0xC4 */   CHAN_C|NONEOS_C,
-/* 0xC5 */   CHAN_C|NONEOS_C,
-/* 0xC6 */   CHAN_C|NONEOS_C,
-/* 0xC7 */   CHAN_C|NONEOS_C,
-/* 0xC8 */   CHAN_C|NONEOS_C,
-/* 0xC9 */   CHAN_C|NONEOS_C,
-/* 0xCA */   CHAN_C|NONEOS_C,
-/* 0xCB */   CHAN_C|NONEOS_C,
-/* 0xCC */   CHAN_C|NONEOS_C,
-/* 0xCD */   CHAN_C|NONEOS_C,
-/* 0xCE */   CHAN_C|NONEOS_C,
-/* 0xCF */   CHAN_C|NONEOS_C,
-/* 0xD0 */   CHAN_C|NONEOS_C,
-/* 0xD1 */   CHAN_C|NONEOS_C,
-/* 0xD2 */   CHAN_C|NONEOS_C,
-/* 0xD3 */   CHAN_C|NONEOS_C,
-/* 0xD4 */   CHAN_C|NONEOS_C,
-/* 0xD5 */   CHAN_C|NONEOS_C,
-/* 0xD6 */   CHAN_C|NONEOS_C,
-/* 0xD7 */   CHAN_C|NONEOS_C,
-/* 0xD8 */   CHAN_C|NONEOS_C,
-/* 0xD9 */   CHAN_C|NONEOS_C,
-/* 0xDA */   CHAN_C|NONEOS_C,
-/* 0xDB */   CHAN_C|NONEOS_C,
-/* 0xDC */   CHAN_C|NONEOS_C,
-/* 0xDD */   CHAN_C|NONEOS_C,
-/* 0xDE */   CHAN_C|NONEOS_C,
-/* 0xDF */   CHAN_C|NONEOS_C,
-/* 0xE0 */   CHAN_C|NONEOS_C,
-/* 0xE1 */   CHAN_C|NONEOS_C,
-/* 0xE2 */   CHAN_C|NONEOS_C,
-/* 0xE3 */   CHAN_C|NONEOS_C,
-/* 0xE4 */   CHAN_C|NONEOS_C,
-/* 0xE5 */   CHAN_C|NONEOS_C,
-/* 0xE6 */   CHAN_C|NONEOS_C,
-/* 0xE7 */   CHAN_C|NONEOS_C,
-/* 0xE8 */   CHAN_C|NONEOS_C,
-/* 0xE9 */   CHAN_C|NONEOS_C,
-/* 0xEA */   CHAN_C|NONEOS_C,
-/* 0xEB */   CHAN_C|NONEOS_C,
-/* 0xEC */   CHAN_C|NONEOS_C,
-/* 0xED */   CHAN_C|NONEOS_C,
-/* 0xEE */   CHAN_C|NONEOS_C,
-/* 0xEF */   CHAN_C|NONEOS_C,
-/* 0xF0 */   CHAN_C|NONEOS_C,
-/* 0xF1 */   CHAN_C|NONEOS_C,
-/* 0xF2 */   CHAN_C|NONEOS_C,
-/* 0xF3 */   CHAN_C|NONEOS_C,
-/* 0xF4 */   CHAN_C|NONEOS_C,
-/* 0xF5 */   CHAN_C|NONEOS_C,
-/* 0xF6 */   CHAN_C|NONEOS_C,
-/* 0xF7 */   CHAN_C|NONEOS_C,
-/* 0xF8 */   CHAN_C|NONEOS_C,
-/* 0xF9 */   CHAN_C|NONEOS_C,
-/* 0xFA */   CHAN_C|NONEOS_C,
-/* 0xFB */   CHAN_C|NONEOS_C,
-/* 0xFC */   CHAN_C|NONEOS_C,
-/* 0xFD */   CHAN_C|NONEOS_C,
-/* 0xFE */   CHAN_C|NONEOS_C,
-/* 0xFF */   CHAN_C|NONEOS_C
-};
-
diff -uNrd ircd-hybrid-6.0/src/test/reference/match_t.0 ircd-pi1.0a/src/test/reference/match_t.0
--- ircd-hybrid-6.0/src/test/reference/match_t.0	Thu Jun 24 03:38:21 1999
+++ ircd-pi1.0a/src/test/reference/match_t.0	Wed Dec 31 19:00:00 1969
@@ -1,34 +0,0 @@
-*???*
-a*b*c*x
-*7?*
-
-*\**??
-a*??0
-*!*@???*.com
-98cj\**
-*???*\*
-?999*?999*?999*?999*?999*?999*?999*?999*?999*\
-*
-1234567890
-*abcdek*?999hfhkx87&@#&$&%(^*x,d/*
-*\**\**
-?
-x
-?*?
-0: * all.of.the.following.should.match
-0: *!*@test.org blarg!~foo@test.org
-0: ?*.org flarn!foo@test.org
-0: blah@me?* blah@merde.com
-0: * woof
-0: *!*@ppp*? !luser@ppp.lame.org
-0: ?o*? honk
-0: bal*!*@*.org balderdash!brouhaha@ballyhoo.org
-0: dumb dumb
-0: ? x
-0: ?d dd
-0: ?*j? ccjy
-0: * a
-0: a* aaaaaaaaa
-0: b*b baaaaaaaaaaaab
-0: *?a*c*b*? ~shaft@isaac.badass.net
-
diff -uNrd ircd-hybrid-6.0/src/test/reference/match_t.ref ircd-pi1.0a/src/test/reference/match_t.ref
--- ircd-hybrid-6.0/src/test/reference/match_t.ref	Thu Jun 24 03:38:22 1999
+++ ircd-pi1.0a/src/test/reference/match_t.ref	Wed Dec 31 19:00:00 1969
@@ -1,34 +0,0 @@
-*???*
-a*b*c*x
-*7?*
-
-*\*??
-a*??0
-*!*@???*.com
-98cj\*
-*???*\*
-?999*?999*?999*?999*?999*?999*?999*?999*?999*\
-*
-1234567890
-*abcdek*?999hfhkx87&@#&$&%(^*x,d/*
-*\*\*
-?
-x
-?*?
-0: * all.of.the.following.should.match
-0: *!*@test.org blarg!~foo@test.org
-0: ?*.org flarn!foo@test.org
-0: blah@me?* blah@merde.com
-0: * woof
-0: *!*@ppp*? !luser@ppp.lame.org
-0: ?o*? honk
-0: bal*!*@*.org balderdash!brouhaha@ballyhoo.org
-0: dumb dumb
-0: ? x
-0: ?d dd
-0: ?*j? ccjy
-0: * a
-0: a* aaaaaaaaa
-0: b*b baaaaaaaaaaaab
-0: *?a*c*b*? ~shaft@isaac.badass.net
-
diff -uNrd ircd-hybrid-6.0/src/test/reference/strncpy_t.ref ircd-pi1.0a/src/test/reference/strncpy_t.ref
--- ircd-hybrid-6.0/src/test/reference/strncpy_t.ref	Sat Jul 17 23:58:34 1999
+++ ircd-pi1.0a/src/test/reference/strncpy_t.ref	Wed Dec 31 19:00:00 1969
@@ -1,32 +0,0 @@
-Test length: 0
-
-
-
-Test length: 1
-a
-a
-a
-Test length: 2
-ab
-ab
-ab
-Test empty string length: 0
-
-
-
-Test empty string length: 1
-
-
-
-Test empty string length: 2
-
-
-
-Test length: data_length: 36
-abcdefghijklmnopqrstuvwxyz0123456789***
-abcdefghijklmnopqrstuvwxyz0123456789***
-abcdefghijklmnopqrstuvwxyz0123456789***
-Test length: data_length + 1: 37
-abcdefghijklmnopqrstuvwxyz0123456789
-abcdefghijklmnopqrstuvwxyz0123456789
-abcdefghijklmnopqrstuvwxyz0123456789
diff -uNrd ircd-hybrid-6.0/src/test/strncpy_t.c ircd-pi1.0a/src/test/strncpy_t.c
--- ircd-hybrid-6.0/src/test/strncpy_t.c	Thu Oct  5 23:01:01 2000
+++ ircd-pi1.0a/src/test/strncpy_t.c	Wed Dec 31 19:00:00 1969
@@ -1,255 +0,0 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  
-
- * $Id: strncpy_t.c,v 1.5 2000/10/06 03:01:01 lusky Exp $
-*/
-
-/*
-
-  Timings for various string copy routines 100000 iterations 36 chars 
-  buffer sizes of 4096 and 56 bytes 200 mhz Pentium Linux 2.2.x kernel
-  memcpy + strlen
-  0.33user 0.00system 0:00.33elapsed 99%CPU
-  while loop (2 comparisons)
-  0.38user 0.00system 0:00.37elapsed 100%CPU
-  glibc non-asm strncpy
-  18.81user 0.00system 0:18.81elapsed 99%CPU
-  strncpy
-  18.88user 0.00system 0:18.88elapsed 99%CPU
-  macro strncpyzt
-  18.89user 0.00system 0:18.89elapsed 99%CPU
-
-  These are the 2 fastest strncpy functions:
-*/
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-char* strncpyx(char* s1, const char* s2, size_t n)
-{
-  size_t x = strlen(s2);
-  if (n < x)
-    x = n;
-  memcpy(s1, s2, x);
-  if (x != n)
-    *(s1 + x) = '\0';
-  return s1;
-}
-
-char* strncpyy(char* s1, const char* s2, size_t n)
-{
-  register char* endp = s1 + n;
-  register char* s = s1;
-  while (s < endp && (*s++ = *s2++))
-    ;
-  return s1;
-}
-
-#define COUNT1 100000
-#define COUNT2 1000000
-
-#define BIG    4096
-#define SMALL  52
-
-#define HOSTLEN 63
-#define NICKLEN 9
-
-char buf[BIG + 1];
-const char* const test_data = "abcdefghijklmnopqrstuvwxyz0123456789";
-const char* nick_data = "aClient";
-const char* host_data = "scorched.blackened.com";
-
-
-void strncpy_mixed(void)
-{
-  register int i;
-  for (i = 0; i < COUNT1; ++i) {
-    strncpy(buf, test_data, BIG);
-    buf[BIG] = '\0';
-    strncpy(buf, test_data, SMALL);
-    buf[SMALL] = '\0';
-  }
-}
- 
-void memcpy_mixed(void)
-{
-  register int i;
-  for (i = 0; i < COUNT1; ++i) {
-    strncpyx(buf, test_data, BIG);
-    buf[BIG] = '\0';
-    strncpyx(buf, test_data, SMALL);
-    buf[SMALL] = '\0';
-  }
-}
- 
-void while_mixed(void)
-{
-  register int i;
-  for (i = 0; i < COUNT1; ++i) {
-    strncpyy(buf, test_data, BIG);
-    buf[BIG] = '\0';
-    strncpyy(buf, test_data, SMALL);
-    buf[SMALL] = '\0';
-  }
-}
- 
-void strncpy_irc(void)
-{
-  register int i;
-  for (i = 0; i < COUNT2; ++i) {
-    strncpy(buf, host_data, HOSTLEN);
-    buf[HOSTLEN] = '\0';
-    strncpy(buf, nick_data, NICKLEN);
-    buf[NICKLEN] = '\0';
-  }
-}
- 
-void memcpy_irc(void)
-{
-  register int i;
-  for (i = 0; i < COUNT2; ++i) {
-    strncpyx(buf, host_data, HOSTLEN);
-    buf[HOSTLEN] = '\0';
-    strncpyx(buf, nick_data, NICKLEN);
-    buf[NICKLEN] = '\0';
-  }
-}
- 
-void while_irc(void)
-{
-  register int i;
-  for (i = 0; i < COUNT2; ++i) {
-    strncpyy(buf, host_data, HOSTLEN);
-    buf[HOSTLEN] = '\0';
-    strncpyy(buf, nick_data, NICKLEN);
-    buf[NICKLEN] = '\0';
-  }
-}
- 
-void test_strncpy(void)
-{
-  size_t len;
-
-  printf("Test length: 0\n");
-  printf("%s\n", strncpy(buf, test_data, 0));
-  printf("%s\n", strncpyx(buf, test_data, 0));
-  printf("%s\n", strncpyy(buf, test_data, 0));
-
-  printf("Test length: 1\n");
-  printf("%s\n", strncpy(buf, test_data, 1));
-  printf("%s\n", strncpyx(buf, test_data, 1));
-  printf("%s\n", strncpyy(buf, test_data, 1));
-
-  printf("Test length: 2\n");
-  printf("%s\n", strncpy(buf, test_data, 2));
-  printf("%s\n", strncpyx(buf, test_data, 2));
-  printf("%s\n", strncpyy(buf, test_data, 2));
-
-  buf[0] = '\0';
-  printf("Test empty string length: 0\n");
-  printf("%s\n", strncpy(buf, "", 0));
-  printf("%s\n", strncpyx(buf, "", 0));
-  printf("%s\n", strncpyy(buf, "", 0));
-  
-  printf("Test empty string length: 1\n");
-  printf("%s\n", strncpy(buf, "", 1));
-  printf("%s\n", strncpyx(buf, "", 1));
-  printf("%s\n", strncpyy(buf, "", 1));
-  
-  printf("Test empty string length: 2\n");
-  printf("%s\n", strncpy(buf, "", 2));
-  printf("%s\n", strncpyx(buf, "", 2));
-  printf("%s\n", strncpyy(buf, "", 2));
-  len = strlen(test_data);
-
-  printf("Test length: data_length: %d\n", len);
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpy(buf,  test_data, len));
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpyx(buf, test_data, len));
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpyy(buf, test_data, len));
-
-  ++len;
-  printf("Test length: data_length + 1: %d\n", len);
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpy(buf,  test_data, len));
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpyx(buf, test_data, len));
-  buf[len - 1] = '*';
-  buf[len]     = '*';
-  buf[len + 1] = '*';
-  buf[len + 2] = '*';
-  buf[len + 3] = '\0';
-  printf("%s\n", strncpyy(buf, test_data, len));
-}
-  
-  
-int main(int argc, char** argv)
-{
-  int which = 0;
-  if (argc > 1)
-    which = atoi(argv[1]);
-
-  switch (which) {
-  case 0:
-    test_strncpy();
-    break;
-  case 1:
-    strncpy_mixed();
-    break;
-  case 2:
-    memcpy_mixed();
-    break;
-  case 3:
-    while_mixed();
-    break;
-  case 4:
-    strncpy_irc();
-    break;
-  case 5:
-    memcpy_irc();
-    break;
-  case 6:
-    while_irc();
-  default:
-    break;
-  }
-  return 0;
-}
-   
diff -uNrd ircd-hybrid-6.0/src/test/testattr.c ircd-pi1.0a/src/test/testattr.c
--- ircd-hybrid-6.0/src/test/testattr.c	Thu Oct  5 23:01:01 2000
+++ ircd-pi1.0a/src/test/testattr.c	Wed Dec 31 19:00:00 1969
@@ -1,277 +0,0 @@
-#include <stdio.h>
-#include "../../include/irc_string.h"
-/*
- * $Id: testattr.c,v 1.2 2000/10/06 03:01:01 lusky Exp $
- */
-
-
-/*
- * CharAttrs table
- *
- * NOTE: RFC 1459 sez: anything but a ^G, comma, or space is allowed
- * for channel names
- */
-const unsigned int CharAttrs[] = {
-/* 0  */     CNTRL_C, 
-/* 1  */     CNTRL_C|CHAN_C,
-/* 2  */     CNTRL_C|CHAN_C,
-/* 3  */     CNTRL_C|CHAN_C,
-/* 4  */     CNTRL_C|CHAN_C,
-/* 5  */     CNTRL_C|CHAN_C,
-/* 6  */     CNTRL_C|CHAN_C,
-/* 7 BEL */  CNTRL_C,
-/* 8  \b */  CNTRL_C|CHAN_C,
-/* 9  \t */  CNTRL_C|SPACE_C|CHAN_C,
-/* 10 \n */  CNTRL_C|SPACE_C|CHAN_C,
-/* 11 \v */  CNTRL_C|SPACE_C|CHAN_C,
-/* 12 \f */  CNTRL_C|SPACE_C|CHAN_C,
-/* 13 \r */  CNTRL_C|SPACE_C|CHAN_C,
-/* 14 */     CNTRL_C|CHAN_C,
-/* 15 */     CNTRL_C|CHAN_C,
-/* 16 */     CNTRL_C|CHAN_C,
-/* 17 */     CNTRL_C|CHAN_C,
-/* 18 */     CNTRL_C|CHAN_C,
-/* 19 */     CNTRL_C|CHAN_C,
-/* 20 */     CNTRL_C|CHAN_C,
-/* 21 */     CNTRL_C|CHAN_C,
-/* 22 */     CNTRL_C|CHAN_C,
-/* 23 */     CNTRL_C|CHAN_C,
-/* 24 */     CNTRL_C|CHAN_C,
-/* 25 */     CNTRL_C|CHAN_C,
-/* 26 */     CNTRL_C|CHAN_C,
-/* 27 */     CNTRL_C|CHAN_C,
-/* 28 */     CNTRL_C|CHAN_C,
-/* 29 */     CNTRL_C|CHAN_C,
-/* 30 */     CNTRL_C|CHAN_C,
-/* 31 */     CNTRL_C|CHAN_C,
-/* SP */     PRINT_C|SPACE_C,
-/* ! */      PRINT_C|KWILD_C|CHAN_C,
-/* " */      PRINT_C|CHAN_C,
-/* # */      PRINT_C|CHANPFX_C|CHAN_C,
-/* $ */      PRINT_C|CHAN_C,
-/* % */      PRINT_C|CHAN_C,
-/* & */      PRINT_C|CHANPFX_C|CHAN_C,
-/* ' */      PRINT_C|CHAN_C,
-/* ( */      PRINT_C|CHAN_C,
-/* ) */      PRINT_C|CHAN_C,
-/* * */      PRINT_C|KWILD_C|CHAN_C,
-/* + */      PRINT_C|CHAN_C,
-/* , */      PRINT_C,
-/* - */      PRINT_C|NICK_C|CHAN_C,
-/* . */      PRINT_C|KWILD_C|CHAN_C,
-/* / */      PRINT_C|CHAN_C,
-/* 0 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 1 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 2 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 3 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 4 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 5 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 6 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 7 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 8 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* 9 */      PRINT_C|DIGIT_C|NICK_C|CHAN_C,
-/* : */      PRINT_C|CHAN_C,
-/* ; */      PRINT_C|CHAN_C,
-/* < */      PRINT_C|CHAN_C,
-/* = */      PRINT_C|CHAN_C,
-/* > */      PRINT_C|CHAN_C,
-/* ? */      PRINT_C|KWILD_C|CHAN_C,
-/* @ */      PRINT_C|KWILD_C|CHAN_C,
-/* A */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* B */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* C */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* D */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* E */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* F */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* G */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* H */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* I */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* J */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* K */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* L */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* M */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* N */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* O */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* P */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* Q */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* R */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* S */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* T */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* U */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* V */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* W */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* X */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* Y */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* Z */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* [ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* \ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* ] */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* ^ */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* _ */      PRINT_C|NICK_C|CHAN_C,
-/* a */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* b */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* c */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* d */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* e */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* f */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* g */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* h */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* i */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* j */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* k */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* l */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* m */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* n */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* o */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* p */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* q */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* r */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* s */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* t */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* u */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* v */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* w */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* x */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* y */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* z */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* { */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* | */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* } */      PRINT_C|ALPHA_C|NICK_C|CHAN_C,
-/* ~ */      PRINT_C|ALPHA_C|CHAN_C,
-/* del  */   CHAN_C,
-/* 0x80 */   CHAN_C,
-/* 0x81 */   CHAN_C,
-/* 0x82 */   CHAN_C,
-/* 0x83 */   CHAN_C,
-/* 0x84 */   CHAN_C,
-/* 0x85 */   CHAN_C,
-/* 0x86 */   CHAN_C,
-/* 0x87 */   CHAN_C,
-/* 0x88 */   CHAN_C,
-/* 0x89 */   CHAN_C,
-/* 0x8A */   CHAN_C,
-/* 0x8B */   CHAN_C,
-/* 0x8C */   CHAN_C,
-/* 0x8D */   CHAN_C,
-/* 0x8E */   CHAN_C,
-/* 0x8F */   CHAN_C,
-/* 0x90 */   CHAN_C,
-/* 0x91 */   CHAN_C,
-/* 0x92 */   CHAN_C,
-/* 0x93 */   CHAN_C,
-/* 0x94 */   CHAN_C,
-/* 0x95 */   CHAN_C,
-/* 0x96 */   CHAN_C,
-/* 0x97 */   CHAN_C,
-/* 0x98 */   CHAN_C,
-/* 0x99 */   CHAN_C,
-/* 0x9A */   CHAN_C,
-/* 0x9B */   CHAN_C,
-/* 0x9C */   CHAN_C,
-/* 0x9D */   CHAN_C,
-/* 0x9E */   CHAN_C,
-/* 0x9F */   CHAN_C,
-/* 0xA0 */   CHAN_C,
-/* 0xA1 */   CHAN_C,
-/* 0xA2 */   CHAN_C,
-/* 0xA3 */   CHAN_C,
-/* 0xA4 */   CHAN_C,
-/* 0xA5 */   CHAN_C,
-/* 0xA6 */   CHAN_C,
-/* 0xA7 */   CHAN_C,
-/* 0xA8 */   CHAN_C,
-/* 0xA9 */   CHAN_C,
-/* 0xAA */   CHAN_C,
-/* 0xAB */   CHAN_C,
-/* 0xAC */   CHAN_C,
-/* 0xAD */   CHAN_C,
-/* 0xAE */   CHAN_C,
-/* 0xAF */   CHAN_C,
-/* 0xB0 */   CHAN_C,
-/* 0xB1 */   CHAN_C,
-/* 0xB2 */   CHAN_C,
-/* 0xB3 */   CHAN_C,
-/* 0xB4 */   CHAN_C,
-/* 0xB5 */   CHAN_C,
-/* 0xB6 */   CHAN_C,
-/* 0xB7 */   CHAN_C,
-/* 0xB8 */   CHAN_C,
-/* 0xB9 */   CHAN_C,
-/* 0xBA */   CHAN_C,
-/* 0xBB */   CHAN_C,
-/* 0xBC */   CHAN_C,
-/* 0xBD */   CHAN_C,
-/* 0xBE */   CHAN_C,
-/* 0xBF */   CHAN_C,
-/* 0xC0 */   CHAN_C,
-/* 0xC1 */   CHAN_C,
-/* 0xC2 */   CHAN_C,
-/* 0xC3 */   CHAN_C,
-/* 0xC4 */   CHAN_C,
-/* 0xC5 */   CHAN_C,
-/* 0xC6 */   CHAN_C,
-/* 0xC7 */   CHAN_C,
-/* 0xC8 */   CHAN_C,
-/* 0xC9 */   CHAN_C,
-/* 0xCA */   CHAN_C,
-/* 0xCB */   CHAN_C,
-/* 0xCC */   CHAN_C,
-/* 0xCD */   CHAN_C,
-/* 0xCE */   CHAN_C,
-/* 0xCF */   CHAN_C,
-/* 0xD0 */   CHAN_C,
-/* 0xD1 */   CHAN_C,
-/* 0xD2 */   CHAN_C,
-/* 0xD3 */   CHAN_C,
-/* 0xD4 */   CHAN_C,
-/* 0xD5 */   CHAN_C,
-/* 0xD6 */   CHAN_C,
-/* 0xD7 */   CHAN_C,
-/* 0xD8 */   CHAN_C,
-/* 0xD9 */   CHAN_C,
-/* 0xDA */   CHAN_C,
-/* 0xDB */   CHAN_C,
-/* 0xDC */   CHAN_C,
-/* 0xDD */   CHAN_C,
-/* 0xDE */   CHAN_C,
-/* 0xDF */   CHAN_C,
-/* 0xE0 */   CHAN_C,
-/* 0xE1 */   CHAN_C,
-/* 0xE2 */   CHAN_C,
-/* 0xE3 */   CHAN_C,
-/* 0xE4 */   CHAN_C,
-/* 0xE5 */   CHAN_C,
-/* 0xE6 */   CHAN_C,
-/* 0xE7 */   CHAN_C,
-/* 0xE8 */   CHAN_C,
-/* 0xE9 */   CHAN_C,
-/* 0xEA */   CHAN_C,
-/* 0xEB */   CHAN_C,
-/* 0xEC */   CHAN_C,
-/* 0xED */   CHAN_C,
-/* 0xEE */   CHAN_C,
-/* 0xEF */   CHAN_C,
-/* 0xF0 */   CHAN_C,
-/* 0xF1 */   CHAN_C,
-/* 0xF2 */   CHAN_C,
-/* 0xF3 */   CHAN_C,
-/* 0xF4 */   CHAN_C,
-/* 0xF5 */   CHAN_C,
-/* 0xF6 */   CHAN_C,
-/* 0xF7 */   CHAN_C,
-/* 0xF8 */   CHAN_C,
-/* 0xF9 */   CHAN_C,
-/* 0xFA */   CHAN_C,
-/* 0xFB */   CHAN_C,
-/* 0xFC */   CHAN_C,
-/* 0xFD */   CHAN_C,
-/* 0xFE */   CHAN_C,
-/* 0xFF */   CHAN_C
-};
-
-main()
-{
-  int i;
-  for(i=0;i<255;i++)
-    printf("%i:%c %X\n", i, i, CharAttrs[i]);
-}
diff -uNrd ircd-hybrid-6.0/src/version.c ircd-pi1.0a/src/version.c
--- ircd-hybrid-6.0/src/version.c	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/version.c	Thu May 23 14:01:33 2002
@@ -0,0 +1,47 @@
+/*
+ *   IRC - Internet Relay Chat, src/version.c
+ *   Copyright (C) 1990 Chelsea Ashley Dyerman
+ *
+ *   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.
+ */
+
+/*
+ * This file is generated by version.c.sh. Any changes made will go away.
+ */
+
+#include "struct.h"
+#include "patchlevel.h"
+#include "serno.h"
+
+char *generation = "21";
+char *creation = "Thu May 23 2002 at 20:01:33 CEST";
+char *version = PATCHLEVEL;
+char *serno = SERIALNUM;
+char *platform = "Linux kitty 2.4.18-rml4 #9 Thu May 9 02:12:52 CEST 2002 i686 unknown";
+
+char *infotext[] =
+{
+  "IRC --",
+  "Based on the original code written by Jarkko Oikarinen",
+  "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
+  "",
+  "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.",
+  "",
+  "ircd-" PATCHLEVEL " - hybrid based version for pi-irc.",
+  0,
+};
diff -uNrd ircd-hybrid-6.0/src/version.c.SH ircd-pi1.0a/src/version.c.SH
--- ircd-hybrid-6.0/src/version.c.SH	Sat Oct 21 02:36:15 2000
+++ ircd-pi1.0a/src/version.c.SH	Wed Dec 31 19:00:00 1969
@@ -1,125 +0,0 @@
-#!/bin/sh
-
-# $Id: version.c.SH,v 1.22 2000/10/21 06:36:15 lusky Exp $ 
-
-spitshell=cat
-package=IRC
-
-echo "Extracting $package/src/version.c..."
-
-if test -r version.c.last
-then
-   generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c.last`
-   if test ! "$generation" ; then generation=0; fi
-else
-   generation=0
-fi
-
-generation=`expr $generation + 1`
-
-uname=`uname -a`
-
-creation=`date | \
-awk '{if (NF == 6) \
-         { print $1 " "  $2 " " $3 " "  $6 " at " $4 " " $5 } \
-else \
-         { print $1 " "  $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
-
-$spitshell >version.c <<!SUB!THIS!
-/*
- *   IRC - Internet Relay Chat, src/version.c
- *   Copyright (C) 1990 Chelsea Ashley Dyerman
- *
- *   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.
- */
-
-/*
- * This file is generated by version.c.SH. Any changes made will go away.
- */
-
-#include "struct.h"
-#include "patchlevel.h"
-#include "serno.h"
-
-char *generation = "$generation";
-char *creation = "$creation";
-char *version = PATCHLEVEL;
-char *serno = SERIALNUM;
-char *platform = "$uname";
-
-char *infotext[] =
-{
-  "$package --",
-  "Based on the original code written by Jarkko Oikarinen",
-  "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
-  "",
-  "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.",
-  "",
-  "The core Hybrid Team as of this major release:",
-  "",
-  "cosine              Patrick Alken       wnder@uwns.underworld.net",
-  "Dianora             Diane Bruce         db@db.net",
-  "is-                 Edward Brocklesby   ejb@leguin.org.uk",
-  "Neph|l|m            Adel Mezibra        adel@cybercable.fr",
-  "pro                 Bill Jonus          proggy@earthling.net",
-  "Rodder              Jon Lusky           lusky@blown.net",
-  "Wohali              Joan Touzet         jolo@cadence.com",
-  "",
-  "The following people have contributed to this release of hybrid",
-  "in nick alphabetical order:",
-  "",
-  "Bleep               Thomas Helvey       tomh@inxpress.net",
-  "CBongo              Chris Bongaarts     cab@tc.umn.edu",
-  "comstud             Chris Behrens       cbehrens@concentric.net",
-  "echo                Adam J. Durana      adam@caca.com",
-  "FlashMan            Craig A. Huegen     chuegen@quadrunner.com",
-  "jailbird            Dustin Marquess     jailbird@alcatraz.fdf.net",
-  "johan               Johannes Erdfelt    jerdfelt@eng.mindspring.net",
-  "LarZ                Matthew Ramsey      mjr@blackened.com",
-  "orabidoo            Roger Espel Llima   espel@unix.bigots.org",
-  "Seaner              Sean McVeigh        sdlmcvei@uwaterloo.ca",
-  "Shadowfax           Michael Pearce      mpearce@varner.com",
-  "Slowaris            Ryan Parker         rjp@wpmedia.com",
-  "ThemBones           Brian Kraemer       kraemer@u.washington.edu",
-  "White_Dragon        Chip Norkus         wd@dal.net",
-  "WintrHawk           Jake Khuon          khuon@GCtr.Net",
-  "",
-  "",
-  "Developers and Contributors for previous versions:",
-  "",
-  "Chris Portman       Keith Fralick       Jon Mischo",
-  "Sam Noble           Taner Halicioglu    Darren Reed",
-  "Markku Savela       Greg Lindahl        Jarkko Oikarinen",
-  "Armin Gruner        Matthew Green       Chuck Kane",
-  "Matt Lyle           Vesa Ruokonen       Nicolas PIOCH",
-  "Stellan Klebom      Dan Goodwin         Mike Bolotski",
-  "Ian Frechette       Markku Jarvinen     Kimmo Suominen",
-  "Jeff Trim           Vijay Subramaniam   Karl Kleinpaste",
-  "Bill Wisner         Tom Davis           Hugo Calendar",
-  "Tom Hopkins         Stephen van den Berg",
-  "Bo Adler            Michael Sandrof     Jon Solomon",
-  "Jan Peterson        Helen Rose          Paul Graham",
-  "",
-  "Thanks also goes to those persons not mentioned here who have added",
-  "their advice, opinions, and code to IRC.",
-  "Thanks also to those who provide the kind sys admins who let me and",
-  "others continue to develop IRC.",
-  "",
-  0,
-};
-!SUB!THIS!
diff -uNrd ircd-hybrid-6.0/src/version.c.sh ircd-pi1.0a/src/version.c.sh
--- ircd-hybrid-6.0/src/version.c.sh	Wed Dec 31 19:00:00 1969
+++ ircd-pi1.0a/src/version.c.sh	Sat May  4 22:54:50 2002
@@ -0,0 +1,90 @@
+#!/bin/sh
+# IRC - Internet Relay Chat, src/version.c
+# Copyright (C) 1990 Chelsea Ashley Dyerman
+#
+# 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: version.c.sh,v 1.2 2002/05/05 02:54:50 smoli Exp $ 
+
+spitshell=cat
+package=ircd
+
+if test -r version.c.old
+then
+   generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c.old`
+   if test ! "$generation" ; then generation=0; fi
+else
+   generation=0
+fi
+
+generation=`expr $generation + 1`
+
+uname=`uname -a`
+
+creation=`date | \
+awk '{if (NF == 6) \
+         { print $1 " "  $2 " " $3 " "  $6 " at " $4 " " $5 } \
+else \
+         { print $1 " "  $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
+
+$spitshell >version.c <<!SUB!THIS!
+/*
+ *   IRC - Internet Relay Chat, src/version.c
+ *   Copyright (C) 1990 Chelsea Ashley Dyerman
+ *
+ *   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.
+ */
+
+/*
+ * This file is generated by version.c.sh. Any changes made will go away.
+ */
+
+#include "struct.h"
+#include "patchlevel.h"
+#include "serno.h"
+
+char *generation = "$generation";
+char *creation = "$creation";
+char *version = PATCHLEVEL;
+char *serno = SERIALNUM;
+char *platform = "$uname";
+
+char *infotext[] =
+{
+  "IRC --",
+  "Based on the original code written by Jarkko Oikarinen",
+  "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
+  "",
+  "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.",
+  "",
+  "ircd-" PATCHLEVEL " - hybrid based version for pi-irc.",
+  0,
+};
+!SUB!THIS!
diff -uNrd ircd-hybrid-6.0/src/whowas.c ircd-pi1.0a/src/whowas.c
--- ircd-hybrid-6.0/src/whowas.c	Tue Nov 21 01:49:33 2000
+++ ircd-pi1.0a/src/whowas.c	Fri Nov  2 19:23:46 2001
@@ -16,7 +16,7 @@
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
-*   $Id: whowas.c,v 1.33 2000/11/21 06:49:33 lusky Exp $
+*   $Id: whowas.c,v 1.1.1.1 2001/11/03 00:23:46 shifty Exp $
 */
 #include "whowas.h"
 #include "client.h"
diff -uNrd ircd-hybrid-6.0/tools/Makefile.in ircd-pi1.0a/tools/Makefile.in
--- ircd-hybrid-6.0/tools/Makefile.in	Thu Oct  5 23:01:02 2000
+++ ircd-pi1.0a/tools/Makefile.in	Thu May 23 13:51:47 2002
@@ -1,47 +1,267 @@
-# $Id: Makefile.in,v 1.10 2000/10/06 03:01:02 lusky Exp $
+# $Id: Makefile.in,v 1.6 2002/05/23 17:51:47 smoli Exp $
 
-CC=@CC@
-RM=@RM@
-IRCDLIBS=@LIBS@
-INCLUDEDIR=-I../include -I../zlib
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
 
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+ircddir = $(exec_prefix)/@IRCDDIR@
+ircduser = @IRCDUSER@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+PACKAGE = @PACKAGE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+install_sh = @install_sh@
+bin_PROGRAMS = mkpasswd
 mkpasswd_SOURCES = mkpasswd.c
-mkpasswd_OBJECTS = mkpasswd.o
-viconf_SOURCES = viconf.c
-viconf_OBJECTS = viconf.o
-fixklines_SOURCES = fixklines.c
-fixklines_OBJECTS = fixklines.o
+subdir = tools
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/setup.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = mkpasswd$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-all_OBJECTS = $(viconf_OBJECTS) $(mkpasswd_OBJECTS) $(fixklines_OBJECTS)
+mkpasswd_OBJECTS = mkpasswd.$(OBJEXT)
+mkpasswd_LDADD = $(LDADD)
+mkpasswd_DEPENDENCIES =
+mkpasswd_LDFLAGS =
 
-all: viconf mkpasswd fixklines
+DEFS = @DEFS@
+INCLUDES = -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CC) $(LDFLAGS) $(CFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(mkpasswd_SOURCES)
+DIST_COMMON = README Makefile.in
+SOURCES = $(mkpasswd_SOURCES)
 
-build: all
+all: Makefile $(PROGRAMS)
 
-mkpasswd: $(mkpasswd_OBJECTS)
-	$(CC) $(LDFLAGS) -o mkpasswd $(mkpasswd_OBJECTS) $(IRCDLIBS)
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 
-viconf: $(viconf_OBJECTS)
-	$(CC) $(LDFLAGS) -o viconf $(viconf_OBJECTS) $(IRCDLIBS)
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+mkpasswd$(EXEEXT): $(mkpasswd_OBJECTS) $(mkpasswd_DEPENDENCIES) 
+	@rm -f mkpasswd$(EXEEXT)
+	$(LINK) $(mkpasswd_OBJECTS) $(LIBS)
 
-fixklines: $(fixklines_OBJECTS)
-	$(CC) $(LDFLAGS) -o fixklines $(fixklines_OBJECTS) $(IRCDLIBS)
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-clean:
-	$(RM) -f $(all_OBJECTS) fixklines viconf chkconf mkpasswd *~ core *.exe
+distclean-compile:
+	-rm -f *.tab.c
 
-distclean: clean
-	$(RM) -f Makefile
+distclean-depend:
+	-rm -rf ./$(DEPDIR)
 
 .c.o:
-	$(CC) $(CFLAGS) $(INCLUDEDIR) -c $<
+	$(COMPILE) -c $<
 
-install: build
-	@echo "Please do a make install from the top level directory"
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info:
 
-# DO NOT DELETE
+ETAGS = etags
+ETAGSFLAGS =
 
-mkpasswd.o: ../include/setup.h ../zlib/zlib.h
-mkpasswd.o: ../zlib/zconf.h
-viconf.o: ../include/config.h ../include/setup.h
-viconf.o: ../zlib/zlib.h ../zlib/zconf.h
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`cd $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check: all
+
+installdirs: $(ircddir)
+	$(mkinstalldirs) $(ircddir)
+
+uninstall:
+	rm -f $(ircddir)/mkpasswd
+
+install: all installdirs install-exec
+
+install-strip:
+	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+
+clean: clean-binPROGRAMS clean-generic mostlyclean-compile
+
+distclean: clean distclean-compile distclean-depend \
+	distclean-generic distclean-tags
+
+dvi:
+
+info:
+
+install-data:
+
+install-exec:
+	@if test "`id -u`" = "0"; \
+        then \
+          echo "$(INSTALL_PROGRAM) -c -o $(ircduser) -m 775 $(PROGRAMS) $(ircddir)"; \
+          $(INSTALL_PROGRAM) -c -o $(ircduser) -m 775 $(PROGRAMS) $(ircddir)/$$X; \
+        else \
+          echo "$(INSTALL_PROGRAM) $(PROGRAMS) $(ircddir)/$$X"; \
+          $(INSTALL_PROGRAM) -c -m 775 $(PROGRAMS) $(ircddir)/$$X; \
+        fi
+
+install-info: install-info
+
+install-man:
+
+installcheck:
+
+maintainer-clean: maintainer-clean
+
+maintainer-clean: distclean maintainer-clean-generic
+
+mostlyclean: mostlyclean
+
+mostlyclean: mostlyclean-compile mostlyclean-generic
+
+uninstall: uninstall-binPROGRAMS uninstall-info
+
+.PHONY: GTAGS all check clean clean-binPROGRAMS clean-generic \
+        distclean distclean-compile distclean-depend \
+        distclean-generic distclean-tags distdir dvi info \
+        install install-binPROGRAMS install-data install-exec \
+        install-info install-man install-strip installcheck \
+        installdirs maintainer-clean maintainer-clean-generic \
+        mostlyclean mostlyclean-compile mostlyclean-generic \
+        tags uninstall uninstall-binPROGRAMS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -uNrd ircd-hybrid-6.0/tools/README ircd-pi1.0a/tools/README
--- ircd-hybrid-6.0/tools/README	Thu Oct  5 23:01:02 2000
+++ ircd-pi1.0a/tools/README	Sun May  5 00:07:41 2002
@@ -1,13 +1,5 @@
-$Id: README,v 1.3 2000/10/06 03:01:02 lusky Exp $
+$Id: README,v 1.5 2002/05/05 04:07:41 smoli Exp $
 
 A directory of support programs for ircd.
 
 mkpasswd - makes password for O lines
-
-start_ircd.c - start program for fbsd and bsd/os systems
-ircd_start.c - start program for solaris
-
-klineParse.c  -cleans out redundant klines
-
-viconf - edit your conf file without having to chdir su etc. etc.
-         also locks the file if file locking is used.
diff -uNrd ircd-hybrid-6.0/tools/fixklines.c ircd-pi1.0a/tools/fixklines.c
--- ircd-hybrid-6.0/tools/fixklines.c	Tue Aug 10 19:07:25 1999
+++ ircd-pi1.0a/tools/fixklines.c	Wed Dec 31 19:00:00 1969
@@ -1,251 +0,0 @@
-/*
-fixklines - scan an ircd.conf or kline.conf file
-$Id: fixklines.c,v 1.4 1999/08/10 23:07:25 lusky Exp $
-
-  D lines of form
-  D:192.168.0.* are converted to D:192.168.0.0/24
-  K-lines of form
-  K:192.168.0.*:reason:*
-  converted to D:192.168.0.0/24
-  # marks found in comment field of either D line or K line
-  are replaced with a space.
-
-To compile:
-  gcc -o fixklines fixklines.c
-
-Typical usage:
-
-  ./fixklines ircd.conf ircd.conf.fix
-  mv ircd.conf irc.conf.bak
-  mv ircd.conf.fix ircd.conf
-  ./fixklines kline.conf kline.conf.fix
-  mv kline.conf kline.conf.bak
-  mv kline.conf.fix kline.conf
-
-  /rehash
-
--Dianora
-
-*/
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <ctype.h>
-
-#define MAXLINE 1024
-#define YES 1
-#define NO 0
-
-char linebuf[MAXLINE];
-void read_write_klines(char *,char *);
-int host_is_legal_dline(char *);
-
-int main(int argc,char *argv[])
-{
-  if(argc < 3)
-    {
-      (void)fprintf(stderr,"%s: filein fileout\n",argv[0]);
-      (void)fprintf(stderr,"i.e. %s ircd.conf ircd.conf.fix\n",argv[0]);
-      exit(-1);
-    }
-
-  read_write_klines(argv[1],argv[2]);
-  return 0;
-}
-
-/*
-read_write_klines
-
-input		- file name input
-		- file name to output
-output		- none
-side effects	- kline/dline file read in, D lines of form
-		  D:192.168.0.* converted to D:192.168.0.0/24
-		  klines of form
-		  K:192.168.0.*:reason:*
-		  converted to D:192.168.0.0/24
-		  # marks found in comment field of either D line or K line
-		  are replaced with a space.
-*/
-
-
-void read_write_klines(char *filein,char *fileout)
-{
-  FILE *fp_in;
-  FILE *fp_out;
-  char *p;
-  char *host;
-  char *comment;
-  char *name;
-  int k_conf_line_count=0;
-  int d_conf_line_count=0;
-  int hash_in_comment_count=0;
-  int k_lines_converted=0;
-
-  if((fp_in = fopen(filein,"r")) == (FILE *)NULL)
-    {
-      (void)fprintf(stderr,"Cannot open %s for read\n", filein);
-      exit(-1);
-    }
- 
-  if((fp_out = fopen(fileout,"w")) == (FILE *)NULL)
-    {
-      (void)fprintf(stderr,"Cannot open %s for write\n", fileout);
-      exit(-1);
-    }
-
-  while(fgets(linebuf,MAXLINE-1,fp_in))
-    {
-      p = strchr(linebuf,'\n');
-      if(p)
-	*p = '\0';
-      if((linebuf[0] == 'K') && (linebuf[1] == ':'))
-	{
-	  k_conf_line_count++;
-	  host = linebuf+2;
-	  p = strchr(host,':');
-	  if(p == (char *)NULL)
-	    continue;
-	  *p = '\0';
-	  p++;
-	  comment = p;
-	  p = strchr(comment,':');
-	  if(p == (char *)NULL)
-	    continue;
-	  *p = '\0';
-	  p++;
-	  name = p;
-          p = strchr(comment,'#');
-          while(p)
-            {
-              *p = ' ';
-              p = strchr(comment,'#');
-              hash_in_comment_count++;
-            }
-          if((*name == '*') && (*(name+1) == '\0'))
-            {
-              if(host_is_legal_dline(host))
-                {
-                  p = strchr(host,'*');
-                  if(p)
-                    {
-                      if(*(p+1) == '\0')
-                        {
-                          *p = '\0';
-                          (void)fprintf(fp_out,"D:%s0/24:%s\n",host,comment);
-                          k_lines_converted++;
-                        }
-                      else
-                        {
-                          (void)fprintf(fp_out,"D:%s:%s\n",host,comment);
-                          k_lines_converted++;
-                        }
-                    }
-                  else
-                    (void)fprintf(fp_out,"K:%s:%s:%s\n",host,comment,name);
-                }
-              else
-                (void)fprintf(fp_out,"K:%s:%s:%s\n",host,comment,name);
-            }
-          else
-            (void)fprintf(fp_out,"K:%s:%s:%s\n",host,comment,name);
-	}
-      else if( (linebuf[0] == 'D') && (linebuf[1] == ':'))
-        {
-          d_conf_line_count++;
-          host = linebuf+2;
-          p = strchr(host,':');
-          if(p == (char *)NULL)
-            continue;
-          *p = '\0';
-          p++;
-          comment = p;
-          p = strchr(comment,':');
-          if(p != (char *)NULL)
-            *p = '\0';
-
-          p = strchr(comment,'#');
-          while(p)
-            {
-              *p = ' ';
-              p = strchr(comment,'#');
-              hash_in_comment_count++;
-            }
-
-          p = strchr(host,'*');
-          if(p)
-            {
-              if(*(p+1) == '\0')
-                {
-                  *p = '\0';
-                  (void)fprintf(fp_out,"D:%s0/24:%s\n",host,comment); 
-                }
-              else
-                {
-                  (void)fprintf(fp_out,"D:%s:%s\n",host,comment);
-                }
-            }
-          else
-            (void)fprintf(fp_out,"D:%s:%s\n",host,comment);
-        }
-      else
-        (void)fprintf(fp_out,"%s\n",linebuf);
-    }
-  (void)fclose(fp_in);
-  (void)fclose(fp_out);
-  (void)fprintf(stderr,"%d K: lines read in\n", k_conf_line_count);
-  (void)fprintf(stderr,"%d D: lines read in\n", d_conf_line_count);
-  (void)fprintf(stderr,"%d K: lines converted to D: lines\n",
-     k_lines_converted);
-  (void)fprintf(stderr,
-     "%d hash (#) marks in comment fields found and replaced\n",
-        hash_in_comment_count);
-}
-
-
-/*
-host_is_legal_dline
-
-inputs          - hostname
-output          - YES if hostname is ip# only NO if its not
-side effects    - NONE
-
-(If you think you've seen this somewhere else, you are right.
-ripped out of tcm-dianora basically)
-
--Diaora
-*/
-
-int host_is_legal_dline(char *host_name)
-{
-  int number_of_dots = 0;
-
-  if(*host_name == '.')return(NO);      /* degenerate case */
-  while(*host_name)
-    {
-      if( *host_name == '.' )
-        number_of_dots++;
-      else if(*host_name == '*')
-        {
-          if(*(host_name+1) == '\0')
-            {
-              if(number_of_dots == 3)
-                return(YES);
-              else
-                return(NO);
-            }
-          else
-            return(NO);
-        }
-      else if(!isdigit((int) *host_name))
-        return(NO);
-      host_name++;
-    }
-
-  if(number_of_dots == 3 )
-    return(YES);
-  else
-    return(NO);
-}
-
diff -uNrd ircd-hybrid-6.0/tools/install_ircd ircd-pi1.0a/tools/install_ircd
--- ircd-hybrid-6.0/tools/install_ircd	Thu Oct  5 23:01:02 2000
+++ ircd-pi1.0a/tools/install_ircd	Wed Dec 31 19:00:00 1969
@@ -1,150 +0,0 @@
-#!/bin/sh
-# IRCD INSTALL SCRIPT
-# $Id: install_ircd,v 1.6 2000/10/06 03:01:02 lusky Exp $
-#
-# Completely re-written by FlashMan <chuegen@quadrunner.com> 981231
-# Wow.  The old version was *very* messy and had boatloads of redundancy.
-# Fixed.
-#
-
-# Path to install-sh
-INSTALL_SH="autoconf/install-sh"
-
-#
-# dir_concat looks to see if we have an absolute or relative path
-# it echos $DPATH/<arg> if we have a relative path
-#
-dir_concat() {
-  if [ ! -z "`echo $1 | grep '^/'`" ]; then
-    echo $1;
-  else
-    echo ${DPATH}$1;
-  fi;
-}
-
-#
-# dir_make attempts to make a directory tree using mkdir -p
-# Used to eliminate redundancy
-#
-dir_make() {
-  if [ \( ! -z "$1" \) -a \( ! -d "$1" \) ]; then
-    echo $1 does not exist, creating...
-    mkdir -p $1
-    if [ $? -ne 0 ]; then
-      echo Could not create directory path $1.
-      echo Perhaps you are not allowed to create a directory in the path.
-      echo Please fix and try again.
-      exit -1;
-    fi;
-  fi
-}
-
-DPATH=`grep '#define.DPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-SPATH=`grep '#define.SPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-CPATH=`grep '#define.CPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-KPATH=`grep '#define.KPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-MPATH=`grep '#define.MPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-LPATH=`grep '#define.LPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-PPATH=`grep '#define.PPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-HPATH=`grep '#define.HPATH' include/config.h|awk '{print $3}'|tr -d \"`;
-
-SPATH=`dir_concat ${SPATH}`;
-CPATH=`dir_concat ${CPATH}`;
-KPATH=`dir_concat ${KPATH}`;
-MPATH=`dir_concat ${MPATH}`;
-LPATH=`dir_concat ${LPATH}`;
-PPATH=`dir_concat ${PPATH}`;
-HPATH=`dir_concat ${HPATH}`;
-
-#   DPATH = directory,
-#   SPATH = server executable,
-#   CPATH = conf file,
-#   MPATH = MOTD
-#   KPATH = kline conf file
-#   leave KPATH undefined if you want klines in main conf file
-#   HPATH is the opers help file, seen by opers on /quote help
-
-# Let's make sure $DPATH exists
-dir_make ${DPATH}
-
-if [ -f src/ircd.exe ]; then
-  EXESUFFIX=".exe"
-else
-  EXESUFFIX=""
-fi
-
-# try to install their ircd.conf file, unless it already exists.
-# install ircd, save old one as ircd.old
-dir_make `dirname ${SPATH}`
-if [ ! -f ${SPATH}${EXESUFFIX} ]; then
-  echo installing ircd as ${SPATH}${EXESUFFIX}
-  $INSTALL_SH -c src/ircd${EXESUFFIX} ${SPATH}${EXESUFFIX};
-else
-  echo installing ircd as ${SPATH}${EXESUFFIX}
-  echo previous ircd saved as ircd${EXESUFFIX}.old
-  mv ${SPATH}${EXESUFFIX} ${SPATH}${EXESUFFIX}.old
-  $INSTALL_SH -c src/ircd${EXESUFFIX} ${SPATH}${EXESUFFIX};
-fi
-
-dir_make `dirname ${CPATH}`
-if [ ! -f ${CPATH} ]; then
-  echo installing example.conf as ${CPATH}
-  $INSTALL_SH -c doc/example.conf ${CPATH};
-else
-  echo You already have ${CPATH}.;
-fi
-
-# try to install their motd file, unless it already exists.
-dir_make `dirname ${MPATH}`
-if [ ! -f ${MPATH} ]; then
-  echo installing a sample MOTD in ${MPATH}
-  echo "This is ircd-hybrid MOTD replace it with something better" > ${MPATH};
-else
-  echo You already have an MOTD in ${MPATH}.;
-fi
-
-# try to install their kpath file unless it already exists.
-dir_make `dirname ${KPATH}`
-if [ ! -f ${KPATH} ]; then
-  echo touching K-line file ${KPATH}
-  touch ${KPATH};
-else
-  echo You already have a K-line file in ${KPATH}.;
-fi
-
-# try to install their opers.txt file, in all cases 
-dir_make `dirname ${HPATH}`
-if [ ! -f ${HPATH} ]; then
-  echo installing opers.txt as ${HPATH}
-  $INSTALL_SH -c opers.txt ${HPATH};
-else
-   echo installing opers.txt as ${HPATH}
-   echo previous opers.txt saved as opers.txt.old
-   mv ${HPATH} ${HPATH}.old
-   $INSTALL_SH -c opers.txt ${HPATH};
-fi
-
-# install mkpasswd
-if [ ! -f ${DPATH}/mkpasswd ]; then
-  echo installing mkpasswd as ${DPATH}/mkpasswd${EXESUFFIX}
-  $INSTALL_SH -c tools/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX};
-else
-   echo installing mkpasswd as ${DPATH}/mkpasswd${EXESUFFIX}
-   echo previous mkpasswd saved as mkpasswd${EXESUFFIX}.old
-   mv ${DPATH}/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX}.old
-   $INSTALL_SH -c tools/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX};
-fi 
-
-# install viconf
-if [ ! -f ${DPATH}/viconf ]; then
-  echo installing viconf as ${DPATH}/viconf${EXESUFFIX}
-  $INSTALL_SH -c tools/viconf${EXESUFFIX} ${DPATH}/viconf${EXESUFFIX};
-else
-   echo installing viconf as ${DPATH}/viconf${EXESUFFIX}
-   echo previous viconf saved as viconf${EXESUFFIX}.old
-   mv ${DPATH}/viconf${EXESUFFIX} ${DPATH}/viconf${EXESUFFIX}.old
-   $INSTALL_SH -c tools/viconf${EXESUFFIX} ${DPATH}/viconf${EXESUFFIX};
-fi
-
-# finished.
-echo install complete!
diff -uNrd ircd-hybrid-6.0/tools/ircd_start.c ircd-pi1.0a/tools/ircd_start.c
--- ircd-hybrid-6.0/tools/ircd_start.c	Thu Oct  5 23:01:03 2000
+++ ircd-pi1.0a/tools/ircd_start.c	Wed Dec 31 19:00:00 1969
@@ -1,87 +0,0 @@
-/*
- * contributed by mjr
- * $Id: ircd_start.c,v 1.2 2000/10/06 03:01:03 lusky Exp $
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <pwd.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#define IRCD_EXECUTABLE "/usr/local/bin/ircd" /* location of executable    */
-#define IRCD_USER       "ircd"                 /* user to setuid to b4 fork */
-
-#define SOFT_FD_NUM     4096                  /* default soft fd limit     */
-#define HARD_FD_NUM     8096                  /* default hard fd limit     */
-
-int usage() {
-        fprintf(stderr, "usage: ircd_start [ -h ] [ -c rlim_fd_cur ] ");
-        fprintf(stderr, "[ -m rlim_fd_max ]\n");
-        fprintf(stderr, "        -h   this usage information\n");
-        fprintf(stderr, "        -c   set the low fd limit (currently: %d)\n",
-                                SOFT_FD_NUM);
-        fprintf(stderr, "        -m   set the high fd limit (currently: %d)\n",
-                                HARD_FD_NUM);
-        exit(0);
-}
-
-int main(int argc, char *argv[]) {
-        int             ch, ret, rlim_fd_cur, rlim_fd_max;
-        struct rlimit   rlp;
-        struct passwd   *pw;
-        extern char     *optarg;
-        extern int      optind, opterr, optopt;
-
-        rlim_fd_cur = SOFT_FD_NUM;
-        rlim_fd_max = HARD_FD_NUM;
-
-        while((ch = getopt(argc, argv, "c:m:h")) != EOF) {
-                switch(ch) {
-                        case 'c':
-                                rlim_fd_cur = atoi(optarg);
-                                break;
-                        case 'm':
-                                rlim_fd_max = atoi(optarg);
-                                break;
-                        case 'h':
-                        case '?':
-                        default:
-                                usage();
-                                /* not reached */
-                }
-        }
-        argc -= optind;
-
-        if (argc != 0) usage();
-
-        rlp.rlim_cur = rlim_fd_cur;
-        rlp.rlim_max = rlim_fd_max;
-
-        if (( ret = setrlimit(RLIMIT_NOFILE, &rlp) ) < 0 ) {
-                fprintf(stderr, "%s: unable to set resource limits (%s)\n",
-                                                argv[0], strerror(errno));
-                exit(ret);
-        }
-
-        /* check if user exists in the first place */
-        if ((pw = getpwnam(IRCD_USER)) == (struct passwd *) NULL) {
-                fprintf(stderr, "%s: no such user %s\n", argv[0], IRCD_USER);
-                exit(-1);
-        }
-
-        /* user does exist, time to switch to their uid/gid */
-        setuid(pw->pw_uid);
-        setgid(pw->pw_gid);
-
-        /* attempt to spawn given executable */
-        if ((ret = execl(IRCD_EXECUTABLE, IRCD_EXECUTABLE, 0)) < 0) {
-                fprintf(stderr, "%s: execl() failed for %s (reason: %s)\n",
-                                argv[0], IRCD_EXECUTABLE, strerror(errno));
-                exit(ret);
-        }
-
-        return(0);
-}
-
diff -uNrd ircd-hybrid-6.0/tools/klineParse.c ircd-pi1.0a/tools/klineParse.c
--- ircd-hybrid-6.0/tools/klineParse.c	Thu Oct  5 23:01:03 2000
+++ ircd-pi1.0a/tools/klineParse.c	Wed Dec 31 19:00:00 1969
@@ -1,544 +0,0 @@
-/* klineParse.c   
- * 1.0  17Dec98 Darkshde -- Initial bug ridden release
- * 2.0  07Jan99 Darkshde -- added redundant kline checking
- * 2.1  11Jan99 Darkshde -- added -f made verbose display optional with -v
- *
- * This program will take a kline.conf and remove duplicate and redundant 
- * entries from it, creating a kline.conf.parsed file
- * $Id: klineParse.c,v 1.2 2000/10/06 03:01:03 lusky Exp $
- */
-
-#define kParseVer "2.12"
-
-#define KLINEFILE "kline.conf"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <ctype.h>
-
-typedef struct {
-    char userid[15];
-    char domain[128];
-    char klinedata[256];
-    char valid;
-    struct KlineList *next;
-    struct KlineList *previous;
-} KlineList;
-
-
-KlineList *AddKline (KlineList *, KlineList *);
-KlineList *RemoveKline (KlineList *);
-KlineList *Read_Kline_File (char *);
-int        Array_Search (KlineList *, KlineList *, short);
-int        RemoveDupes (char *, char *);
-int        RemoveRedundant (char *, char *, short);
-int        strToLower(unsigned char *);
-void       ClearKlines (KlineList * );
-
-int main (int argc, char *argv[]) {
-    
-    char *parsedFile, *klineFile, appName[128];
-    short dupeCheck, altInput, altOutput, showMatches;
-    
-    dupeCheck = altInput = altOutput = showMatches =0;
-    memset(appName,'\0',128);    
-    
-    if (argc > 1) {
-        if (argv[1][0] == '-') {
-        
-            if (strspn(argv[1],"-dvf\0") != strlen(argv[1])) {
-                goto paramReturn;
-            }
-            if (strchr(argv[1], 'f')) {
-                if (argc > 3) {
-                    parsedFile = (char *)  malloc(strlen(argv[3])+1);
-                    strcpy(parsedFile,argv[3]);
-                    altOutput =1;
-                }
-                if (argc >2) {
-                    klineFile = (char *)  malloc(strlen(argv[2])+1);
-                    strcpy(klineFile,argv[2]);
-                    altInput =1;
-                }
-            }
-            
-            if (strchr(argv[1], 'v')) {
-                showMatches = 1;
-            }
-            
-            if (strchr (argv[1], 'd')) {
-                dupeCheck = 1;
-            }
-        } else {
-            goto paramReturn;
-        }
-    }
-
-    if (!altOutput) {
-        parsedFile = (char *)  malloc(strlen(KLINEFILE)+8);
-        strcpy(parsedFile,KLINEFILE);
-        strcat(parsedFile,".parsed");
-    }
-    if (!altInput) {
-        klineFile = (char *)  malloc(strlen(KLINEFILE));
-        strcpy(klineFile,KLINEFILE);
-    }
-    if (dupeCheck) {
-        if (!RemoveDupes(klineFile,"kline.conf.parsed.tmp")) { 
-            RemoveRedundant("kline.conf.parsed.tmp",parsedFile, showMatches);
-            remove("kline.conf.parsed.tmp");
-        } else {
-            printf("\n");
-            goto paramReturn;
-        }
-    } else {
-        if (RemoveRedundant(klineFile,parsedFile, showMatches)) {
-            printf("\n");
-            goto paramReturn;
-        }
-    }
-    
-
-    printf("\nklineParse %s has finished mangling %s.\n",kParseVer,
-        klineFile);
-    printf("The new version has been saved as %s.\n",parsedFile);
-    printf("It is a good idea to diff the two files to ensure no insane "
-        "changes were made.\n\n");
-
-    free(parsedFile);
-    free(klineFile);
-
-    return (EXIT_SUCCESS);
-    
-    paramReturn:
-    if (strchr(argv[0],'/')) {
-        strcat(appName, strrchr(argv[0],'/')+1);
-    } else {
-        strcpy(appName,argv[0]);
-    }
-    printf ("usage: %s [-dfv] [<input file>] [<output file>]\n",
-        appName);
-    printf (" -d remove duplicate consecutive klines\n");
-    printf (" -v verbose display during redundant search\n");
-    printf (" -f use alterate file names, instead of kline.conf and ");
-    printf ("kline.conf.parsed\n ");
-    if (altOutput) {
-        free(parsedFile);
-    }
-    if (altInput) {
-        free(klineFile);
-    }
-    return (EXIT_FAILURE);
-
-}
-
-/*
- * This function will search out klines that are redundant to wider matching 
- * klines.  In other words, if you had previously klined *userid@*domain.com, 
- * *@machine.domain.com, ~*@*.domain.com, and then finally *@*domain.com, this
- * code will remove all the klines except *@*domain.com.
- *
- */
-
-
-int RemoveRedundant (char *KlineFile, char *parsedFile, short showMatches) {
-    KlineList      *pKlines, anotherKline, *pKlineList;
-    FILE           *outFile;
-    
-    pKlines = NULL;
-    pKlines = Read_Kline_File(KlineFile);
-    if (pKlines == NULL) {
-        return(EXIT_FAILURE);
-    }
-    pKlineList = pKlines;
-    while (pKlines != NULL) {
-        if (pKlines->valid == 1 && (!strcmp(pKlines->userid,"*") && 
-                pKlines->domain[0] == '*') || !strcmp(pKlines->domain,"*") ||
-                (isdigit(pKlines->domain[0]) && strrchr(pKlines->domain,'*'))){
-            pKlines->valid == 3;
-            Array_Search(pKlines,pKlineList, showMatches);
-            pKlines->valid == 1;
-        }
-        pKlines = (KlineList *) pKlines->next;
-    }
-    pKlines = pKlineList;
-    
-    outFile = fopen(parsedFile, "w+");
-    if (outFile == NULL) {
-        printf("Could not open %s for writing.\n",parsedFile);
-        return EXIT_FAILURE;
-    }
-    
-    while (pKlines != NULL) {
-        if (pKlines->valid >= 1) {
-            fputs(pKlines->klinedata, outFile);
-    
-        }
-        pKlines = (KlineList *) pKlines->next;
-        
-    }
-    fclose(outFile);
-    
-    pKlines = pKlineList;
-    ClearKlines (pKlines);
-    return (EXIT_SUCCESS);
-}
-
-
-/* This was the original (1.0) code, which has now be reduced to a command line
- * option, since this problem does not appear to be widespread.  You only need
- * to use this if the the following two commands don't return the same value, or
- * if when doing an unkline on the server you see (2 matches) or some number
- * other than 1.  This procedure only removes the duplicates if they are 
- * consequtive.
- *
- *        grep K: kline.conf | sort -n | uniq | wc -l
- *        grep K: kline.conf | wc -l
- */
-
-int RemoveDupes (char *KlineFile, char *parsedFile) {
-
-    FILE *inFile, *outFile;
-    char sLine1[512], sLine2[512];
-    char domain1[128],domain2[128],userid1[15],userid2[15];
-    
-    memset(sLine1,'\0',512);
-    memcpy(sLine2,sLine1,512);
-    memset(domain1,'\0',128);
-    memcpy(domain2,domain1,128);
-    memset(userid1,'\0',15);
-    memcpy(userid2,userid1,15);
-    
-    inFile = fopen(KlineFile, "r+");
-    if (inFile == NULL) {
-        printf("No %s found\n",KlineFile);
-        return EXIT_FAILURE;
-    }
-    outFile = fopen(parsedFile, "w+");
-    if (outFile == NULL) {
-        fclose(inFile);
-        printf("Could not open %s.parsed for writing.\n",KlineFile);
-        return EXIT_FAILURE;
-    }
-
-
-    if (fgets(sLine1,512,inFile) == NULL) {
-        fclose(inFile);
-        printf("%s is empty.\n",KlineFile);
-        return EXIT_FAILURE;
-    }
-    
-    while (!feof(inFile)) {
-        fgets(sLine2,512,inFile);
-        
-        if (sLine1[0] == 'K' && sLine2[0] == 'K') {
-            strncat(domain1, sLine1+2, strchr(sLine1+2,':')-sLine1-2);
-            strcat(userid1, strrchr(sLine1,':')+1);
-            strncat(domain2, sLine2+2, strchr(sLine2+2,':')-sLine2-2);
-            strcat(userid2, strrchr(sLine2,':')+1);
-            if (strcmp(domain1,domain2) != 0 || strcmp(userid1,userid2) != 0) {
-                fputs(sLine1, outFile);
-            }
-            domain1[0] = userid1[0] = domain2[0] = userid2[0] = '\0';
-        } else {
-            fputs(sLine1, outFile);
-        }
-        strcpy(sLine1, sLine2);
-        memset(sLine2,'\0',512);        
-    }
-    fputs(sLine2, outFile);
-    fclose(inFile);
-    fclose(outFile);
-    
-    return EXIT_SUCCESS;
-}
-
-KlineList *Read_Kline_File (char *KlineFile) {
-
-    KlineList *pNewKlines, aKline;
-    
-    FILE *inFile, *outFile;
-    char sLine1[256], sLine2[256];
-    char domain1[128],domain2[128],userid1[15],userid2[15];
-    char *endOffset;
-    
-    pNewKlines = NULL;
-
-    memset(sLine1,'\0',256);
-    memcpy(sLine2,sLine1,256);
-    memset(domain1,'\0',128);
-    memcpy(domain2,domain1,128);
-    memset(userid1,'\0',15);
-    memcpy(userid2,userid1,15);
-    
-    inFile = fopen(KlineFile, "r+");
-    if (inFile == NULL) {
-        printf("No %s found\n",KlineFile);
-        return NULL;
-    }
-    
-    while (!feof(inFile)) {
-        fgets(sLine1,256,inFile);
-        memset(&aKline,'\0',sizeof(aKline));
-        if (sLine1[0] == 'K') {
-            strncat(aKline.domain, sLine1+2, strchr(sLine1+2,':')-sLine1-2);
-            strToLower(aKline.domain);
-            endOffset = strrchr(sLine1,':')+1;
-            strncat(aKline.userid, endOffset, strrchr(sLine1,'\n')-endOffset);
-            strToLower(aKline.userid);
-            /* the kline.conf I developed this for had about 60 *~*@ klines...
-             * This will change them to ~* for matching purposes only, so they
-             * may well survive if you don't have ~*@* klined.
-             */
-            if(!strcmp(aKline.userid,"*~*")) {
-                strcpy(aKline.userid,"~*");
-            }
-            strcpy(aKline.klinedata,sLine1);
-            aKline.valid = 1;
-            aKline.next = NULL;
-            aKline.previous = NULL;
-            pNewKlines = AddKline(pNewKlines,&aKline);
-        } else {
-            memset(aKline.userid,'\0',15);
-            memset(aKline.domain,'\0',128);
-            strcpy(aKline.klinedata,sLine1);
-            aKline.valid = 2;
-            aKline.next = NULL;
-            aKline.previous = NULL;
-            pNewKlines = AddKline(pNewKlines,&aKline);
-        }
-        memset(sLine1,'\0',256);        
-    }
-    fclose(inFile);
-    return pNewKlines;
-
-}
-
-int Array_Search (KlineList *pTargKline, KlineList *pKline, short showMatches) {
-    
-    KlineList *pKlineTop = pKline;
-    char stuff[128], stuff2[128];
-    while (pKline != NULL) {
-        if (pKline->valid == 1) {
-            if (Tcl_StringMatch(pKline->domain,pTargKline->domain) && 
-                    Tcl_StringMatch(pKline->userid,pTargKline->userid) &&
-                    strcmp(pTargKline->klinedata,pKline->klinedata)) {
-                pKline->valid = 0;
-                if (showMatches) {
-                    printf("%s@%s ",strcpy(stuff,pKline->userid),
-                        strcpy(stuff2,pKline->domain));
-                    printf("is redundant to %s@%s\n",strcpy(stuff,
-                        pTargKline->userid),strcpy(stuff2,pTargKline->domain));
-                }
-                if (pKline->previous != NULL) {
-                    pKline = (KlineList *) pKline->previous;
-                    if (pKline->klinedata[0] == '#') {
-                        pKline->valid = 0;
-                    }
-                    pKline = (KlineList *) pKline->next;
-                }
-            } else if (Tcl_StringMatch(pTargKline->domain,pKline->domain) && 
-                    Tcl_StringMatch(pTargKline->userid,pKline->userid) &&
-                    strcmp(pTargKline->klinedata,pKline->klinedata)) {
-                pTargKline->valid = 0;
-                if (showMatches) {
-                    printf("%s@%s ",strcpy(stuff,pTargKline->userid),
-                        strcpy(stuff2,pTargKline->domain));
-                    printf("is redundant to %s@%s\n",strcpy(stuff,
-                        pKline->userid),strcpy(stuff2,pKline->domain));
-                }
-                Array_Search(pKline,pKlineTop, showMatches);
-            }   
-        }
-        pKline = (KlineList *) pKline->next; 
-    }        
-} 
-
-KlineList *AddKline (KlineList *pKline, KlineList *pKlineData) {
-
-     KlineList *pCurrentKline, *pOrigKline = pKline;
-
-    if (pKline != NULL) {
-        if (pKline->previous != NULL) {
-            pKline = (KlineList *) pKline->previous;
-        }
-        pCurrentKline =  pKline;
-        pKline->next = (struct KlineList  *) malloc (sizeof (KlineList));
-        pKline = (KlineList *) pKline->next;
-        pKline->next = NULL;
-        *pKline = *pKlineData;
-        pKline->previous =  (struct KlineList *) pCurrentKline;
-        pOrigKline->previous = (struct KlineList *) pKline;
-        return pOrigKline;
-    }
-    else {
-        pKline = ( KlineList  *) malloc (sizeof (KlineList));
-        pKline->next = NULL;
-        pKline->previous = NULL;
-        *pKline = *pKlineData;
-        return pKline;
-    }
-}
-
-KlineList *RemoveKline (KlineList *pKline) {
-
-    KlineList *tempp;
-    tempp = (KlineList *) pKline->next;
-    free (pKline);
-    return tempp;
-}
-
-void ClearKlines (KlineList * listpointer) {
-
-    while (listpointer != NULL) {
-        listpointer = RemoveKline (listpointer);
-    }
-}
-
-
-int strToLower(unsigned char *aString) {
-    
-    short i =0;
-    
-    while (aString[i]) {   
-        if (isupper(aString[i])) {
-            aString[i] = tolower(aString[i]);
-        }
-        i++;
-    } 
-    return 1;
-}
-
-/* The following function is taken from the TCL soure code distribution,
- * specifically the file tclUtil.c, I did this because most ircd boxes do
- * not have TCL installed, and it's likely they don't want to install it.
- *
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * The file "license.terms" can be found in the tcl source code distribution
- * at ftp://ftp.scriptics.com/pub/tcl/tcl7_6/tcl7.6p2.tar.gz
- *
- */
-
-int 
-Tcl_StringMatch(string, pattern)
-    register char *string;	/* String. */
-    register char *pattern;	/* Pattern, which may contain
-				 * special characters. */
-{
-    char c2;
-
-    while (1) {
-	/* See if we're at the end of both the pattern and the string.
-	 * If so, we succeeded.  If we're at the end of the pattern
-	 * but not at the end of the string, we failed.
-	 */
-	
-	if (*pattern == 0) {
-	    if (*string == 0) {
-		return 1;
-	    } else {
-		return 0;
-	    }
-	}
-	if ((*string == 0) && (*pattern != '*')) {
-	    return 0;
-	}
-
-	/* Check for a "*" as the next pattern character.  It matches
-	 * any substring.  We handle this by calling ourselves
-	 * recursively for each postfix of string, until either we
-	 * match or we reach the end of the string.
-	 */
-	
-	if (*pattern == '*') {
-	    pattern += 1;
-	    if (*pattern == 0) {
-		return 1;
-	    }
-	    while (1) {
-		if (Tcl_StringMatch(string, pattern)) {
-		    return 1;
-		}
-		if (*string == 0) {
-		    return 0;
-		}
-		string += 1;
-	    }
-	}
-    
-	/* Check for a "?" as the next pattern character.  It matches
-	 * any single character.
-	 */
-
-	if (*pattern == '?') {
-	    goto thisCharOK;
-	}
-
-	/* Check for a "[" as the next pattern character.  It is followed
-	 * by a list of characters that are acceptable, or by a range
-	 * (two characters separated by "-").
-	 */
-	
-	if (*pattern == '[') {
-	    pattern += 1;
-	    while (1) {
-		if ((*pattern == ']') || (*pattern == 0)) {
-		    return 0;
-		}
-		if (*pattern == *string) {
-		    break;
-		}
-		if (pattern[1] == '-') {
-		    c2 = pattern[2];
-		    if (c2 == 0) {
-			return 0;
-		    }
-		    if ((*pattern <= *string) && (c2 >= *string)) {
-			break;
-		    }
-		    if ((*pattern >= *string) && (c2 <= *string)) {
-			break;
-		    }
-		    pattern += 2;
-		}
-		pattern += 1;
-	    }
-	    while (*pattern != ']') {
-		if (*pattern == 0) {
-		    pattern--;
-		    break;
-		}
-		pattern += 1;
-	    }
-	    goto thisCharOK;
-	}
-    
-	/* If the next pattern character is '/', just strip off the '/'
-	 * so we do exact matching on the character that follows.
-	 */
-	
-	if (*pattern == '\\') {
-	    pattern += 1;
-	    if (*pattern == 0) {
-		return 0;
-	    }
-	}
-
-	/* There's no special character.  Just make sure that the next
-	 * characters of each string match.
-	 */
-	
-	if (*pattern != *string) {
-	    return 0;
-	}
-
-	thisCharOK: pattern += 1;
-	string += 1;
-    }
-}
diff -uNrd ircd-hybrid-6.0/tools/mkconf ircd-pi1.0a/tools/mkconf
--- ircd-hybrid-6.0/tools/mkconf	Wed Jul  7 22:22:10 1999
+++ ircd-pi1.0a/tools/mkconf	Wed Dec 31 19:00:00 1969
@@ -1,444 +0,0 @@
-#!/bin/sh
-#
-# $Id: mkconf,v 1.1 1999/07/08 02:22:10 db Exp $
-# Copyright (C) 1999 Patrick Alken
-#
-# Usage: ./mkconf [options]
-#
-# Options:
-#   --path=<dir>       : Location of ircd.conf/mkpasswd files
-#   --quick            : Quick setup, no questions
-#   --addo             : Add an O: line
-#   --addy             : Add a Y: line
-#   --addp             : Add a P: line
-
-# Initialize some variables
-Path="."
-ConfFile="$Path/ircd.conf"
-MkPass="$Path/mkpasswd"
-Quick="0"
-Input=""
-
-# Various functions
-
-# GetInput
-#  Ask user string $1 until they give a valid response ($2)
-# Default response: $3
-# Stores response in: Input
-GetInput ()
-{
-  okinput=0
-  while [ $okinput -eq 0 ]; do
-    if test -n "$3"; then
-      echo -n "$1 [$3] "
-    else
-      echo -n "$1"
-    fi
-    read Input
-    if test ! -n "$Input"; then
-      Input="$3"
-    fi
-
-    if test ! -n "$2"; then
-      # $2 is blank, any response is valid
-      okinput=1
-    else
-      for tmp in $2; do
-        if test "$tmp" = "$Input"; then
-          okinput=1
-          break
-        fi
-      done
-    fi
-
-    if test ! "$okinput" = "1"; then
-      echo "Valid responses are: $2"
-    fi
-  done
-  return 1
-}
-
-AddMline ()
-{
-  GetInput "Enter the name of your server: " "" ""
-  ServerName="$Input"
-  GetInput "Are you using a virtual host?" "y n" "n"
-  case "$Input" in
-    y* | Y*)
-      GetInput "  Enter virtual hostname/ip: " "" ""
-      Vhost="$Input"
-    ;;
-    *)
-      Vhost="*"
-    ;;
-  esac
-  GetInput "Enter a description of your server: " "" ""
-  ServerDesc="$Input"
-
-  echo "M:$ServerName:$Vhost:$ServerDesc:" >> $ConfFile
-  return 1
-}
-
-AddAline ()
-{
-  GetInput "Line 1: " "" ""
-  Line1="$Input"
-  GetInput "Line 2: " "" ""
-  Line2="$Input"
-  GetInput "Line 3: " "" ""
-  Line3="$Input"
-
-  echo "A:$Line1:$Line2:$Line3" >> $ConfFile
-  return 1
-}
-
-AddYline ()
-{
-  stop=0
-  classcnt=0
-  while [ $stop -eq 0 ]; do
-    classcnt=`expr $classcnt + 1`
-
-    GetInput "Enter any positive integer for the class identifier" "" "$classcnt"
-    Class="$Input"
-    GetInput "Enter the delay (in seconds) between server pings to this client" "" "90"
-    PingFreq="$Input"
-    GetInput "Enter the delay (in seconds) between connection attempts (if a server class)" "" "300"
-    ConnFreq="$Input"
-    GetInput "Enter the maximum number of connections a client from this class can have at any one time" "" "10"
-    MaxConn="$Input"
-    GetInput "Enter the size of the SendQ for this client (servers should be 4mb or more)" "" "100000"
-    SendQ="$Input"
-
-    echo "Y:$Class:$PingFreq:$ConnFreq:$MaxConn:$SendQ" >> $ConfFile
-
-    GetInput "Configure another Y: line?" "y n" "n"
-    case "$Input" in
-      n* | N*)
-        stop=1
-      ;;
-    esac
-  done
-
-  return 1
-}
-
-AddIline ()
-{
-  stop=0
-  while [ $stop -eq 0 ]; do
-    GetInput "Enter password that clients must supply, or leave blank for none: " "" ""
-    IPass="$Input"
-    GetInput "Enter hostmask that clients must match in order to connect" "" "*@*"
-    IMask="$Input"
-    GetInput "Enter connection class that will identify the client" "" "1"
-    IClass="$Input"
-
-    echo "I:NOMATCH:$IPass:$IMask::$IClass" >> $ConfFile
-
-    GetInput "Configure another I: line?" "y n" "n"
-    case "$Input" in
-      n* | N*)
-        stop=1
-      ;;
-    esac
-  done
-
-  return 1
-}
-
-AddPline ()
-{
-  stop=0
-  while [ $stop -eq 0 ]; do
-    GetInput "Enter an ip address to bind this port to, or leave blank if none: " "" ""
-    PAddr="$Input"
-    GetInput "Enter port number to listen on" "" "6667"
-    PPort="$Input"
-
-    echo "P::$Paddr::$PPort" >> $ConfFile
-
-    GetInput "Configure another P: line?" "y n" "n"
-    case "$Input" in
-      n* | N*)
-        stop=1
-      ;;
-    esac
-  done
-
-  return 1
-}
-
-AddOline ()
-{
-  stop=0
-  while [ $stop -eq 0 ]; do
-    GetInput "Would you like this operator to have global access to the network?" "y n" "y"
-    case "$Input" in
-      y* | Y*)
-        Okey="O"
-      ;;
-      n* | N*)
-        Okey="o"
-      ;;
-    esac
-    GetInput "Enter hostmask for operator" "" "*@*"
-    OMask="$Input"
-    cat << EOF
-
-You must now use the "mkpasswd" utility to encrypt a password
-that the operator will be required to use.
-EOF
-    GetInput "Enter password (encrypted): " "" ""
-    OPass="$Input"
-    GetInput "Enter nickname for operator: " "" ""
-    ONick="$Input"
-    GetInput "Enter connection class that will identify the operator" "" "1"
-    OClass="$Input"
-
-    echo "$Okey:$OMask:$OPass:$ONick::$OClass" >> $ConfFile
-
-    GetInput "Configure another O: line?" "y n" "n"
-    case "$Input" in
-      n* | N*)
-        stop=1
-      ;;
-    esac
-  done
-
-  return 1
-}
-
-AddCNline ()
-{
-  stop=0
-  while [ $stop -eq 0 ]; do
-    GetInput "Enter the *IP ADDRESS* of the server: " "" ""
-    CIp="$Input"
-    GetInput "Enter password for link (plaintext): " "" ""
-    CPass="$Input"
-    GetInput "Enter server name: " "" ""
-    CName="$Input"
-    GetInput "Would you like to autolink to this server?" "y n" "n"
-    case "$Input" in
-      y* | Y*)
-        GetInput "  Enter port for autolinking" "" "6667"
-        CPort="$Input"
-      ;;
-      n* | N*)
-        CPort=""
-      ;;
-    esac
-    GetInput "Enter connection class that will identify the server" "" "1"
-    CClass="$Input"
-
-    echo "C:$CIp:$CPass:$CName:$CPort:$CClass" >> $ConfFile
-    echo "N:$CIp:$CPass:$CName::$CClass" >> $ConfFile
-
-    GetInput "Configure another set of C/N lines?" "y n" "n"
-    case "$Input" in
-      n* | N*)
-        stop=1
-      ;;
-    esac
-  done
-
-  return 1
-}
-
-# Parse the command line arguements
-
-for arg in "$@"; do
-  # Check if they gave an arguement like: --path=/path
-  # If so, store "/path" into target
-  case "$arg" in
-    -*=*)
-      target=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'`
-    ;;
-    *)
-      target=
-    ;;
-  esac
-
-  case "$arg" in
-    -p | --path | --pat | --pa | --p)
-      echo "Error: no path given"
-      exit 1
-    ;;
-    -p=* | --path=* | --pat=* | --pa=* | --p=*)
-      Path="$target"
-      ConfFile="$Path/ircd.conf"
-    ;;
-    -q | --quick | --quic | --qui | --qu | --q)
-      Quick="1"
-    ;;
-    --addo | -o)
-      AddOline
-      exit 0
-    ;;
-    --addy | -y)
-      AddYline
-      exit 0
-    ;;
-    --addi | -i)
-      AddIline
-      exit 0
-    ;;
-    --addp | -p)
-      AddPline
-      exit 0
-    ;;
-    --addc | -c)
-      AddCNline
-      exit 0
-    ;;
-    -h | --help | --hel | --he | --h)
-      cat << EOF
-Usage: mkconf [options]
-
-Options:
-  --path=DIR        Search for ircd.conf in DIR [default: $Path]
-  --quick           Quick setup - no questions asked
-  --addo            Add an operator (O:) line to ircd.conf
-  --addy            Add a class (Y:) line to ircd.conf
-  --addi            Add an authorization (I:) line to ircd.conf
-  --addp            Add a port (P:) line to ircd.conf
-  --addc            Add a set of server linking (C/N) lines to ircd.conf
-EOF
-      exit 0
-    ;;
-  esac
-done
-
-if test -w "$ConfFile"; then
-  GetInput "$ConfFile exists, delete it?" "y n" "n"
-  case "$Input" in
-    y* | Y*)
-      rm -f $ConfFile
-    ;;
-    n* | N*)
-      exit 1
-    ;;
-  esac
-fi
-
-echo "Creating $ConfFile"
-echo "# ircd.conf - created $(date '+%a %b %d %Y %T')" > $ConfFile
-
-if test "$Quick" = "1"; then
-  # Quick configuration, just output a bunch of defaults
-  cat >> $ConfFile << EOF
-M:irc.myserver.com:*:My Server:
-A:Administrator:Location:Email - irc@myserver.com
-
-# Connection classes
-Y:1:90:300:10:1000000
-
-# Authorization lines
-I:NOMATCH::*@*::1
-
-# Port lines
-P::::6667
-EOF
-
-  exit 0
-fi
-
-echo ""
-
-# Now, the interactive configuration
-
-# Setup the M: line
-AddMline
-
-echo ""
-
-# Setup the A: line
-cat << EOF
-You will now be required to enter three lines of administrative
-information. This is what will show up in the /admin command.
-EOF
-
-AddAline
-
-# Setup Y: lines
-cat << EOF
-
-You must now configure at least one Y: line. Y: lines define
-connection classes. Each client/server is given a certain class
-which configures several properties for that client/server.
-
-EOF
-
-cat >> $ConfFile << EOF
-
-# Connection classes
-EOF
-
-AddYline
-
-# Setup I: lines
-cat >> $ConfFile << EOF
-
-# Authorization lines
-EOF
-
-cat << EOF
-
-You must now configure at least one I: line, or no one will
-be able to connect to your shiny new hybrid server. :-)
-I: lines specify hostmasks that are allowed to connect to
-your server. You may also require a password for clients
-if you wish.
-
-EOF
-
-AddIline
-
-# Setup P: lines
-cat >> $ConfFile << EOF
-
-# Port lines
-EOF
-
-cat << EOF
-
-You must now configure at least one P: line, or hybrid will
-not accept any connections from anybody. P: lines specify
-ports that hybrid will listen on for incoming connections.
-
-EOF
-
-AddPline
-
-# Setup O: lines
-echo ""
-
-GetInput "Would you like to add operators at this time?" "y n" "y"
-case "$Input" in
-  y* | Y*)
-    cat >> $ConfFile << EOF
-
-# Operators
-EOF
-    AddOline
-  ;;
-esac
-
-# Setup C/N lines
-echo ""
-
-GetInput "Would you like to add server linking lines at this time?" "y n" "n"
-case "$Input" in
-  y* | Y*)
-    cat >> $ConfFile << EOF
-
-# Server linking lines
-EOF
-    AddCNline
-  ;;
-esac
-
-echo ""
-echo "Configuration of $ConfFile is now complete"
-echo ""
diff -uNrd ircd-hybrid-6.0/tools/mkpasswd.c ircd-pi1.0a/tools/mkpasswd.c
--- ircd-hybrid-6.0/tools/mkpasswd.c	Tue Aug 10 19:07:25 1999
+++ ircd-pi1.0a/tools/mkpasswd.c	Sun May  5 22:48:33 2002
@@ -3,44 +3,41 @@
  * You can use this code as long as my name stays with it.
  *
  *
- * $Id: mkpasswd.c,v 1.4 1999/08/10 23:07:25 lusky Exp $
+ * $Id: mkpasswd.c,v 1.6 2002/05/06 02:48:33 smoli Exp $
  */
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <time.h>
+#include <unistd.h>
+#include <crypt.h>
 
-
-extern char *getpass();
-extern char *crypt();
-/* extern long random(); */
-/* extern int srandom(unsigned); */
-
-int main(argc, argv)
-int argc;
-char *argv[];
+int main()
 {
   static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
   char salt[3];
-  char * plaintext;
+  long seed;
+  char *plaintext, *passwd;
 
-  if (argc < 2) {
-    srandom(time(0));		/* may not be the BEST salt, but its close */
-    salt[0] = saltChars[random() % 64];
-    salt[1] = saltChars[random() % 64];
-    salt[2] = 0;
-  }
-  else {
-    salt[0] = argv[1][0];
-    salt[1] = argv[1][1];
-    salt[2] = '\0';
-    if ((strchr(saltChars, salt[0]) == NULL) || (strchr(saltChars, salt[1]) == NULL))
-      fprintf(stderr, "illegal salt %s\n", salt), exit(1);
-  }
+  plaintext = getpass("Password: ");
 
-  plaintext = getpass("plaintext: ");
+  seed = time(NULL);
 
-  printf("%s\n", crypt(plaintext, salt));
+  for(;;)
+    { 
+      srandom(seed);
+      salt[0] = saltChars[random() % 64];
+      salt[1] = saltChars[random() % 64];
+      salt[2] = 0;
+      passwd = crypt(plaintext, salt);
+      if(!strchr(passwd, '.') &&
+         !strchr(passwd, '/'))
+        break;
+      seed -= 0x9e45ba93;
+      seed ^= seed - 0x9e45ba93;
+    }
+
+  printf("%s\n", passwd);
   return 0;
 }
 
diff -uNrd ircd-hybrid-6.0/tools/start_ircd.c ircd-pi1.0a/tools/start_ircd.c
--- ircd-hybrid-6.0/tools/start_ircd.c	Mon Sep 21 21:52:28 1998
+++ ircd-pi1.0a/tools/start_ircd.c	Wed Dec 31 19:00:00 1969
@@ -1,119 +0,0 @@
-#include <stdio.h>
-#include <errno.h>
-#include <pwd.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-/*
-  start_ircd
-
-  This is a setuid root program to set all limits to maximum before
-launching ircd.
-
-
-Bugs: has holes, but everyone on here has root, so I'm not worrying about it.
-
-Diane Bruce, db May 11 1998
-*/
-
-static char *version="$Id: start_ircd.c,v 1.1 1998/09/22 01:52:28 db Exp $";
-
-#define IRCDDIR "/usr/local/lib/ircd"
-
-main()
-{
-  int result;
-  struct rlimit rlp;
-  struct passwd   *pw;
-
-  result = chdir(IRCDDIR);
-
-  if(result < 0 )
-    {
-      (void)fprintf(stderr,"Can't chdir to %s\n", IRCDDIR);
-      exit(0);
-    }
-
-  rlp.rlim_cur = RLIM_INFINITY;
-  rlp.rlim_max = RLIM_INFINITY;
-
-  result =  setrlimit(RLIMIT_CORE, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_CORE\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_CPU, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_CPU\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_DATA, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_DATA\n");
-      exit(-1);
-    } 
-
-  result =  setrlimit(RLIMIT_RSS, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_RSS\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_FSIZE, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_FSIZE\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_NOFILE, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_NOFILE\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_NPROC, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_NPROC\n");
-      exit(-1);
-    }
-
-  result =  setrlimit(RLIMIT_STACK, &rlp);
-  if(result<0)
-    {
-      (void)fprintf(stderr,"Error setting RLIMIT_STACK\n");
-      exit(-1);
-    }
-
-  (void)fprintf(stderr,"About to exec ircd\n");
-
-  /* check if user exists in the first place */
-  if ((pw = getpwnam(IRCD_USER)) == (struct passwd *) NULL)
-    {
-      fprintf(stderr, "%s: no such user %s\n", argv[0], IRCD_USER);
-      exit(-1);
-    }
-  
-  /* user does exist, time to switch to their uid/gid */
-  setuid(pw->pw_uid);
-  setgid(pw->pw_gid);
-
-  result = execl("./ircd","ircd",(char *)NULL);
-  
-  /* shouldn't be here */
-
-  if(result < 0)
-    {
-      fprintf(stderr,"Can't execute ircd\n");
-      exit(0);
-    }
-}
diff -uNrd ircd-hybrid-6.0/tools/untabify ircd-pi1.0a/tools/untabify
--- ircd-hybrid-6.0/tools/untabify	Wed Jul 21 00:36:15 1999
+++ ircd-pi1.0a/tools/untabify	Wed Dec 31 19:00:00 1969
@@ -1,9 +0,0 @@
-#!/usr/bin/perl
-#
-# untabify - convert tabs to spaces
-#
-# $Id: untabify,v 1.1 1999/07/21 04:36:15 tomh Exp $
-use Text::Tabs;
-$tabstop = 8;
-while (<>) { print expand($_) }
-
diff -uNrd ircd-hybrid-6.0/tools/viconf.c ircd-pi1.0a/tools/viconf.c
--- ircd-hybrid-6.0/tools/viconf.c	Wed Oct 25 23:22:04 2000
+++ ircd-pi1.0a/tools/viconf.c	Wed Dec 31 19:00:00 1969
@@ -1,186 +0,0 @@
-/*
- * viconf.c
- *
- * $Id: viconf.c,v 1.11 2000/10/26 03:22:04 lusky Exp $
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <limits.h>
-#include <signal.h>
-#include "config.h"
-
-
-/* wait.h is in /include on solaris, likely on other SYSV machines as well
- * but wait.h is normally in /include/sys on BSD boxen,
- * probably we should have an #ifdef SYSV?
- * -Dianora
- */
-/*
- * USE_RCS assumes "ci" is in PATH, I suppose we should make
- * this CI_PATH or some such in config.h
- * -Dianora
- */
-
-#ifdef SOL20
-#include <wait.h>
-#else
-#include <sys/wait.h>
-#endif
-
-static int LockedFile(char *filename);
-static char lockpath[PATH_MAX + 1];
-
-
-int main(int argc, char *argv[])
-{
-  char *ed, *p, *filename = CPATH;
-
-  if( chdir(DPATH) < 0 )
-    {
-      fprintf(stderr,"Cannot chdir to %s\n", DPATH);
-      exit(errno);
-    }
-
-  if((p = strrchr(argv[0], '/')) == NULL)
-    p = argv[0];
-  else
-    p++;
-#ifdef KPATH
-  if(strcmp(p, "viklines") == 0)
-    filename = KPATH;
-#endif /* KPATH */
-
-  if(LockedFile(filename))
-    {
-      fprintf(stderr,"Cant' lock %s\n", filename);
-      exit(errno);
-    }
-
-#ifdef USE_RCS
-  switch(fork())
-    {
-    case -1:
-      fprintf(stderr, "error forking, %d\n", errno);
-      exit(errno);
-    case 0:		/* Child */
-      execlp("ci", "ci", "-l", filename, NULL);
-      fprintf(stderr, "error running ci, %d\n", errno);
-      exit(errno);
-    default:
-      wait(0);
-    }
-#endif
-
-  /* ed config file */
-  switch(fork())
-    {
-    case -1:
-      fprintf(stderr, "error forking, %d\n", errno);
-      exit(errno);
-    case 0:		/* Child */
-      if((ed = getenv("EDITOR")) == NULL)
-	ed = "vi";
-      execlp(ed, ed, filename, NULL);
-      fprintf(stderr, "error running editor, %d\n", errno);
-      exit(errno);
-    default:
-      wait(0);
-    }
-
-#ifdef USE_RCS
-  switch(fork())
-    {
-    case -1:
-      fprintf(stderr, "error forking, %d\n", errno);
-      exit(errno);
-    case 0:		/* Child */
-      execlp("ci", "ci", "-l", filename, NULL);
-      fprintf(stderr, "error running ci, %d\n", errno);
-      exit(errno);
-    default:
-      wait(0);
-    }
-#endif
-
-  unlink(lockpath);
-  return 0;
-}
-
-/*
- * LockedFile() (copied from m_kline.c in ircd)
- * Determine if 'filename' is currently locked. If it is locked,
- * there should be a filename.lock file which contains the current
- * pid of the editing process. Make sure the pid is valid before
- * giving up.
- *
- * Return: 1 if locked
- *         -1 if couldn't unlock
- *         0 if was able to lock
- */
-
-
-
-static int
-LockedFile(char *filename)
-
-{
-
-  char buffer[1024];
-  FILE *fileptr;
-  int killret;
-  int fd;
-
-  if (!filename)
-    return (0);
-  
-  sprintf(lockpath, "%s.lock", filename);
-  
-  if ((fileptr = fopen(lockpath, "r")) != (FILE *) NULL)
-    {
-      if (fgets(buffer, sizeof(buffer) - 1, fileptr))
-	{
-	  /*
-	   * If it is a valid lockfile, 'buffer' should now
-	   * contain the pid number of the editing process.
-	   * Send the pid a SIGCHLD to see if it is a valid
-	   * pid - it could be a remnant left over from a
-	   * crashed editor or system reboot etc.
-	   */
-      
-	  killret = kill(atoi(buffer), SIGCHLD);
-	  if (killret == 0)
-	    {
-	      fclose(fileptr);
-	      return (1);
-	    }
-
-	  /*
-	   * killret must be -1, which indicates an error (most
-	   * likely ESRCH - No such process), so it is ok to
-	   * proceed writing klines.
-	   */
-	}
-      fclose(fileptr);
-    }
-
-  /*
-   * Delete the outdated lock file
-   */
-  unlink(lockpath);
-
-  /* create exclusive lock */
-  if((fd = open(lockpath, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
-    {
-      fprintf(stderr, "ircd config file locked\n");
-      return (-1);
-    }
-
-  fileptr = fdopen(fd,"w");
-  fprintf(fileptr,"%d\n",(int) getpid());
-  fclose(fileptr);
-  return (0);
-} /* LockedFile() */
diff -uNrd ircd-hybrid-6.0/zlib/ChangeLog ircd-pi1.0a/zlib/ChangeLog
--- ircd-hybrid-6.0/zlib/ChangeLog	Sat Oct 10 01:00:28 1998
+++ ircd-pi1.0a/zlib/ChangeLog	Wed Dec 31 19:00:00 1969
@@ -1,474 +0,0 @@
-Changes by ircd-hybrid team (10 October 1998)
-- deleted dirs/files not used for ircd
-- integrated with ircd configure/make
-
-		ChangeLog file for zlib
-
-Changes in 1.1.3 (9 July 1998)
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-- Support gzdopen on Mac with Metrowerks (Jason Linhart)
-- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
-- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
-- avoid some warnings with Borland C (Tom Tanner)
-- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
-- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)
-- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
-- use libdir and includedir in Makefile.in (Tim Mooney)
-- support shared libraries on OSF1 V4 (Tim Mooney)
-- remove so_locations in "make clean"  (Tim Mooney)
-- fix maketree.c compilation error (Glenn, Mark)
-- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
-- new Makefile.riscos (Rich Walker)
-- initialize static descriptors in trees.c for embedded targets (Nick Smith)
-- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
-- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
-- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
-- fix maketree.c to allow clean compilation of inffixed.h (Mark)
-- fix parameter check in deflateCopy (Gunther Nikl)
-- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
-- Many portability patches by Christian Spieler:
-  . zutil.c, zutil.h: added "const" for zmem*
-  . Make_vms.com: fixed some typos
-  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
-  . msdos/Makefile.msc: remove "default rtl link library" info from obj files
-  . msdos/Makefile.*: use model-dependent name for the built zlib library
-  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
-     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
-- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
-- replace __far with _far for better portability (Christian Spieler, Tom Lane)
-- fix test for errno.h in configure (Tim Newsham)
-
-Changes in 1.1.2 (19 March 98)
-- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
-  See http://www.winimage.com/zLibDll/unzip.html
-- preinitialize the inflate tables for fixed codes, to make the code
-  completely thread safe (Mark)
-- some simplifications and slight speed-up to the inflate code (Mark)
-- fix gzeof on non-compressed files (Allan Schrum)
-- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
-- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
-- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
-- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
-- do not wrap extern "C" around system includes (Tom Lane)
-- mention zlib binding for TCL in README (Andreas Kupries)
-- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
-- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
-- allow "configure --prefix $HOME" (Tim Mooney)
-- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
-- move Makefile.sas to amiga/Makefile.sas
-
-Changes in 1.1.1 (27 Feb 98)
-- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)
-- remove block truncation heuristic which had very marginal effect for zlib
-  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
-  compression ratio on some files. This also allows inlining _tr_tally for
-  matches in deflate_slow.
-- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
-
-Changes in 1.1.0 (24 Feb 98)
-- do not return STREAM_END prematurely in inflate (John Bowler)
-- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
-- compile with -DFASTEST to get compression code optimized for speed only
-- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
-- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
-  on Sun but significant on HP)
-
-- add a pointer to experimental unzip library in README (Gilles Vollant)
-- initialize variable gcc in configure (Chris Herborth)
-
-Changes in 1.0.9 (17 Feb 1998)
-- added gzputs and gzgets functions
-- do not clear eof flag in gzseek (Mark Diekhans)
-- fix gzseek for files in transparent mode (Mark Diekhans)
-- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
-- replace EXPORT with ZEXPORT to avoid conflict with other programs
-- added compress2 in zconf.h, zlib.def, zlib.dnt
-- new asm code from Gilles Vollant in contrib/asm386
-- simplify the inflate code (Mark):
- . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
- . ZALLOC the length list in inflate_trees_fixed() instead of using stack
- . ZALLOC the value area for huft_build() instead of using stack
- . Simplify Z_FINISH check in inflate()
-
-- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
-- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
-- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
-  the declaration of FAR (Gilles VOllant)
-- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
-- read_buf buf parameter of type Bytef* instead of charf*
-- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
-- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
-- fix check for presence of directories in "make install" (Ian Willis)
-
-Changes in 1.0.8 (27 Jan 1998)
-- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
-- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
-- added compress2() to allow setting the compression level
-- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
-- use constant arrays for the static trees in trees.c instead of computing
-  them at run time (thanks to Ken Raeburn for this suggestion). To create
-  trees.h, compile with GEN_TREES_H and run "make test".
-- check return code of example in "make test" and display result
-- pass minigzip command line options to file_compress
-- simplifying code of inflateSync to avoid gcc 2.8 bug
-
-- support CC="gcc -Wall" in configure -s (QingLong)
-- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
-- fix test for shared library support to avoid compiler warnings
-- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
-- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
-- do not use fdopen for Metrowerks on Mac (Brad Pettit))
-- add checks for gzputc and gzputc in example.c
-- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
-- use const for the CRC table (Ken Raeburn)
-- fixed "make uninstall" for shared libraries
-- use Tracev instead of Trace in infblock.c
-- in example.c use correct compressed length for test_sync
-- suppress +vnocompatwarnings in configure for HPUX (not always supported)
-
-Changes in 1.0.7 (20 Jan 1998)
-- fix gzseek which was broken in write mode
-- return error for gzseek to negative absolute position
-- fix configure for Linux (Chun-Chung Chen)
-- increase stack space for MSC (Tim Wegner)
-- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
-- define EXPORTVA for gzprintf (Gilles Vollant)
-- added man page zlib.3 (Rick Rodgers)
-- for contrib/untgz, fix makedir() and improve Makefile
-
-- check gzseek in write mode in example.c
-- allocate extra buffer for seeks only if gzseek is actually called
-- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
-- add inflateSyncPoint in zconf.h
-- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
-
-Changes in 1.0.6 (19 Jan 1998)
-- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
-  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
-- Fix a deflate bug occuring only with compression level 0 (thanks to
-  Andy Buckler for finding this one).
-- In minigzip, pass transparently also the first byte for .Z files.
-- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
-- check Z_FINISH in inflate (thanks to Marc Schluper)
-- Implement deflateCopy (thanks to Adam Costello)
-- make static libraries by default in configure, add --shared option.
-- move MSDOS or Windows specific files to directory msdos
-- suppress the notion of partial flush to simplify the interface
-  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
-- suppress history buffer provided by application to simplify the interface
-  (this feature was not implemented anyway in 1.0.4)
-- next_in and avail_in must be initialized before calling inflateInit or
-  inflateInit2
-- add EXPORT in all exported functions (for Windows DLL)
-- added Makefile.nt (thanks to Stephen Williams)
-- added the unsupported "contrib" directory:
-   contrib/asm386/ by Gilles Vollant <info@winimage.com>
-	386 asm code replacing longest_match().
-   contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-   contrib/iostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>
-	Another C++ I/O streams interface
-   contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag@tid.es>
-	A very simple tar.gz file extractor using zlib
-   contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
-- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
-  level) in minigzip (thanks to Tom Lane)
-
-- use const for rommable constants in deflate
-- added test for gzseek and gztell in example.c
-- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
-- add undocumented function zError to convert error code to string
-  (for Tim Smithers)
-- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
-- Use default memcpy for Symantec MSDOS compiler.
-- Add EXPORT keyword for check_func (needed for Windows DLL)
-- add current directory to LD_LIBRARY_PATH for "make test"
-- create also a link for libz.so.1
-- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
-- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
-- added -soname for Linux in configure (Chun-Chung Chen,
-- assign numbers to the exported functions in zlib.def (for Windows DLL)
-- add advice in zlib.h for best usage of deflateSetDictionary
-- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
-- allow compilation with ANSI keywords only enabled for TurboC in large model
-- avoid "versionString"[0] (Borland bug)
-- add NEED_DUMMY_RETURN for Borland
-- use variable z_verbose for tracing in debug mode (L. Peter Deutsch).
-- allow compilation with CC
-- defined STDC for OS/2 (David Charlap)	
-- limit external names to 8 chars for MVS (Thomas Lund)
-- in minigzip.c, use static buffers only for 16-bit systems
-- fix suffix check for "minigzip -d foo.gz"
-- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
-- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
-- added makelcc.bat for lcc-win32 (Tom St Denis)
-- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
-- Avoid expanded $Id: ChangeLog,v 1.2 1998/10/10 05:00:28 lusky Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
-- check for unistd.h in configure (for off_t)
-- remove useless check parameter in inflate_blocks_free
-- avoid useless assignment of s->check to itself in inflate_blocks_new
-- do not flush twice in gzclose (thanks to Ken Raeburn)
-- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
-- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
-- work around buggy fclose on pipes for HP/UX
-- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
-- fix configure if CC is already equal to gcc
-
-Changes in 1.0.5 (3 Jan 98)
-- Fix inflate to terminate gracefully when fed corrupted or invalid data
-- Use const for rommable constants in inflate
-- Eliminate memory leaks on error conditions in inflate
-- Removed some vestigial code in inflate
-- Update web address in README
-  
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
-  bit, so the decompressor could decompress all the correct data but went
-  on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
-  small and medium models; this makes the library incompatible with previous
-  versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
-  avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
-  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
-  and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-  -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
-     warning C4746: 'inflate_mask' : unsized array treated as  '__far'
-     (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
-  not completely flushed in rare occasions).
-- default window size is same for compression and decompression
-  (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
-  typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
-  was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
-  pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
-  is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
-  (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
-  TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
-  (one's complement) is now done inside crc32(). WARNING: this is
-  incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
-  not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
-  Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
-  if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
-  user-provided history buffer. This is supported only in deflateInit2
-  and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
diff -uNrd ircd-hybrid-6.0/zlib/FAQ ircd-pi1.0a/zlib/FAQ
--- ircd-hybrid-6.0/zlib/FAQ	Sat Oct 10 01:03:55 1998
+++ ircd-pi1.0a/zlib/FAQ	Wed Dec 31 19:00:00 1969
@@ -1,72 +0,0 @@
-
-		Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page 
-http://www.cdrom.com/pub/infozip/zlib/ which may have more recent information.
-
-
-1) I need a Windows DLL
-2) I need a Visual Basic interface to zlib
-3) compress() returns Z_BUF_ERROR
-4) deflate or inflate returns Z_BUF_ERROR
-5) Where is the zlib documentation (man pages, etc...)?
-6) Why don't you use GNU autoconf, libtool, etc...?
-7) There is a bug in zlib.
-8) I get "undefined reference to gzputc"
-
-
-
-1) I need a Windows DLL
-
-  The zlib sources can be compiled without change to produce a DLL.
-  If you want a precompiled DLL, see http://www.winimage.com/zLibDll
-
-
-2) I need a Visual Basic interface to zlib
-
-  See http://www.tcfb.com/dowseware/cmp-z-it.zip
-      http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
-  and contrib/visual-basic.txt
-
-3) compress() returns Z_BUF_ERROR
-
-  Make sure that before the call of compress, the length of the
-  compressed buffer is equal to the total size of the compressed buffer
-  and not zero.  For Visual Basic, check that this parameter is passed
-  by reference ("as any"), not by value ("as long").
-
-
-4) deflate or inflate returns Z_BUF_ERROR
-
-  Make sure that before the call avail_in and avail_out are not zero.
-
-
-5) Where is the zlib documentation (man pages, etc...)?
-
-  It's in zlib.h for the moment. Volunteers to transform this
-  to man pages, please contact jloup@gzip.org. Examples of zlib usage
-  are in the files example.c and minigzip.c.
-
-
-6) Why don't you use GNU autoconf, libtool, etc...?
-
-  Because we would like to keep zlib as a very small and simple package.
-  zlib is rather portable and doesn't need much configuration.
-
-
-7) There is a bug in zlib.
-
-  Most of the time, such problems are due to an incorrect usage
-  of zlib. Please try to reproduce the problem with a small
-  program and send us the corresponding source at zlib@quest.jpl.nasa.gov
-  Do not send multi-megabyte data files without prior agreement.
-
-
-8) I get "undefined reference to gzputc"
-
-  If "make test" produces something like
-     example.o(.text+0x174): 
-  check that you don't have old files libz.* in /usr/lib, /usr/local/lib
-  or /usr/X11R6/lib. Remove old versions then do "make install".
-
diff -uNrd ircd-hybrid-6.0/zlib/INDEX ircd-pi1.0a/zlib/INDEX
--- ircd-hybrid-6.0/zlib/INDEX	Sat Oct 10 01:00:28 1998
+++ ircd-pi1.0a/zlib/INDEX	Wed Dec 31 19:00:00 1969
@@ -1,86 +0,0 @@
-ChangeLog		history of changes
-INDEX			this file
-FAQ			Frequently Asked Questions about zlib
-Make_vms.com		script for Vax/VMS
-Makefile		makefile for Unix (generated by configure)
-Makefile.in		makefile for Unix (template for configure)
-Makefile.riscos 	makefile for RISCOS
-README			guess what
-algorithm.txt		description of the (de)compression algorithm
-configure		configure script for Unix
-descrip.mms		makefile for Vax/VMS
-zlib.3			mini man page for zlib (volunteers to write full
-			man pages from zlib.h welcome. write to jloup@gzip.org)
-
-amiga/Makefile.sas	makefile for Amiga SAS/C
-amiga/Makefile.pup      makefile for Amiga powerUP SAS/C PPC
-
-msdos/Makefile.w32      makefile for Microsoft Visual C++ 32-bit
-msdos/Makefile.b32	makefile for Borland C++   32-bit
-msdos/Makefile.bor	makefile for Borland C/C++ 16-bit
-msdos/Makefile.dj2	makefile for DJGPP 2.x
-msdos/Makefile.emx	makefile for EMX 0.9c (32-bit DOS/OS2)
-msdos/Makefile.msc	makefile for Microsoft C 16-bit
-msdos/Makefile.tc	makefile for Turbo C
-msdos/Makefile.wat	makefile for Watcom C
-msdos/zlib.def        	definition file for Windows DLL
-msdos/zlib.rc         	definition file for Windows DLL
-
-nt/Makefile.nt		makefile for Windows NT
-nt/zlib.dnt		definition file for Windows NT DLL
-nt/Makefile.emx		makefile for EMX 0.9c/RSXNT 1.41 (Win32 Intel)
-nt/Makefile.gcc		makefile for Windows NT using GCC (mingw32)
-
-
-		zlib public header files (must be kept):
-zconf.h
-zlib.h
-
-		private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-deflate.c
-deflate.h
-gzio.c
-infblock.c
-infblock.h
-infcodes.c
-infcodes.h
-inffast.c
-inffast.h
-inflate.c
-inftrees.c
-inftrees.h
-infutil.c
-infutil.h
-maketree.c
-trees.c
-uncompr.c
-zutil.c
-zutil.h
-
-		source files for sample programs:
-example.c
-minigzip.c
-
-		unsupported contribution by third parties
-
-contrib/asm386/ by Gilles Vollant <info@winimage.com>
-	386 asm code replacing longest_match().
-
-contrib/minizip/ by Gilles Vollant <info@winimage.com>
-	Mini zip and unzip based on zlib
-        See http://www.winimage.com/zLibDll/unzip.html
-
-contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-
-contrib/iostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>
-	Another C++ I/O streams interface
-
-contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag@tid.es>
-	A very simple tar.gz extractor using zlib
-
-contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
diff -uNrd ircd-hybrid-6.0/zlib/Makefile.in ircd-pi1.0a/zlib/Makefile.in
--- ircd-hybrid-6.0/zlib/Makefile.in	Fri Mar 26 00:21:12 1999
+++ ircd-pi1.0a/zlib/Makefile.in	Wed Dec 31 19:00:00 1969
@@ -1,179 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h 
-
-# To compile and test, type:
-#   ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-#    make install
-# To install in $HOME instead of /usr/local, use:
-#    make install prefix=$HOME
-
-CC=@CC@
-
-#CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=-L. -lz
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-VER=1.1.3
-LIBS=libz.a
-SHAREDLIB=libz.so
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README FAQ INDEX ChangeLog configure Make*[a-z0-9] *.[ch] *.mms \
-  algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
-  nt/Make*[a-z0-9] nt/zlib.dnt amiga/Make*.??? os2/M*.os2 os2/zlib.def \
-  contrib/RE*.contrib contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \
-  contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/asm[56]86/*.?86 \
-  contrib/asm[56]86/*.S contrib/iostream/*.cpp \
-  contrib/iostream/*.h  contrib/iostream2/*.h contrib/iostream2/*.cpp \
-  contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \
-  contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \
-  contrib/delphi*/*.???
-
-all: example minigzip
-build: libz.a
-
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
-	$(CPP) match.S > _match.s
-	$(CC) -c _match.s
-	mv _match.o match.o
-	rm -f _match.s
-
-$(SHAREDLIB).$(VER): $(OBJS)
-	$(LDSHARED) -o $@ $(OBJS)
-	rm -f $(SHAREDLIB) $(SHAREDLIB).1
-	ln -s $@ $(SHAREDLIB)
-	ln -s $@ $(SHAREDLIB).1
-
-example: example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
-	-@if [ ! -d $(includedir)  ]; then mkdir $(includedir); fi
-	-@if [ ! -d $(libdir) ]; then mkdir $(libdir); fi
-	cp zlib.h zconf.h $(includedir)
-	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-	cp $(LIBS) $(libdir)
-	cd $(libdir); chmod 755 $(LIBS)
-	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-	cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
-	  rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
-	  ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
-	  ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
-	  (ldconfig || true)  >/dev/null 2>&1; \
-	fi
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
-	cd $(includedir); \
-	v=$(VER); \
-	if test -f zlib.h; then \
-	  v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \
-          rm -f zlib.h zconf.h; \
-	fi; \
-	cd $(libdir); rm -f libz.a; \
-	if test -f $(SHAREDLIB).$$v; then \
-	  rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \
-	fi
-
-clean:
-	rm -f *.o *~ example minigzip libz.a libz.so* foo.gz so_locations \
-	   _match.s maketree
-
-distclean:	clean
-	rm setup.h Makefile
-
-zip:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c contrib/minizip/test.zip
-	v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	zip -ul9 zlib$$v $(DISTFILES)
-	mv Makefile~ Makefile
-
-dist:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c contrib/minizip/test.zip
-	d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	rm -f $$d.tar.gz; \
-	if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
-	files=""; \
-	for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
-	cd ..; \
-	GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
-	if test ! -d $$d; then rm -f $$d; fi
-	mv Makefile~ Makefile
-
-tags:	
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h setup.h
-compress.o: zlib.h zconf.h setup.h
-crc32.o: zlib.h zconf.h setup.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h setup.h
-example.o: zlib.h zconf.h setup.h
-gzio.o: zutil.h zlib.h zconf.h setup.h
-infblock.o: zutil.h zlib.h zconf.h setup.h infblock.h inftrees.h infcodes.h
-infblock.o: infutil.h
-infcodes.o: zutil.h zlib.h zconf.h setup.h inftrees.h infblock.h infcodes.h
-infcodes.o: infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h setup.h inftrees.h infblock.h infcodes.h
-inffast.o: infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h setup.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h setup.h inftrees.h inffixed.h
-infutil.o: zutil.h zlib.h zconf.h setup.h infblock.h inftrees.h infcodes.h
-infutil.o: infutil.h
-maketree.o: zutil.h zlib.h zconf.h setup.h inftrees.h
-minigzip.o: zlib.h zconf.h setup.h
-trees.o: deflate.h zutil.h zlib.h zconf.h setup.h trees.h
-uncompr.o: zlib.h zconf.h setup.h
-zutil.o: zutil.h zlib.h zconf.h setup.h
diff -uNrd ircd-hybrid-6.0/zlib/README ircd-pi1.0a/zlib/README
--- ircd-hybrid-6.0/zlib/README	Sat Oct 10 01:00:30 1998
+++ ircd-pi1.0a/zlib/README	Wed Dec 31 19:00:00 1969
@@ -1,148 +0,0 @@
-zlib 1.1.3 is a general purpose data compression library.  All the code
-is thread safe.  The data format used by the zlib library
-is described by RFCs (Request for Comments) 1950 to 1952 in the files 
-ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
-format) and rfc1952.txt (gzip format). These documents are also available in
-other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact jloup@gzip.org). A usage
-example of the library is given in the file example.c which also tests that
-the library is working correctly. Another example is given in the file
-minigzip.c. The compression library itself is composed of all source files
-except example.c and minigzip.c.
-
-To compile all files and run the test program, follow the instructions
-given at the top of Makefile. In short "make test; make install"
-should work for most machines. For Unix: "configure; make test; make install"
-For MSDOS, use one of the special makefiles such as Makefile.msc.
-For VMS, use Make_vms.com or descrip.mms.
-
-Questions about zlib should be sent to <zlib@quest.jpl.nasa.gov>, or to
-Gilles Vollant <info@winimage.com> for the Windows DLL version.
-The zlib home page is http://www.cdrom.com/pub/infozip/zlib/
-The official zlib ftp site is ftp://ftp.cdrom.com/pub/infozip/zlib/
-Before reporting a problem, please check those sites to verify that
-you have the latest version of zlib; otherwise get the latest version and
-check whether the problem still exists or not.
-
-Mark Nelson <markn@tiny.com> wrote an article about zlib for the Jan. 1997
-issue of  Dr. Dobb's Journal; a copy of the article is available in
-http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
-
-The changes made in version 1.1.3 are documented in the file ChangeLog.
-The main changes since 1.1.2 are:
-
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-plus many changes for portability.
-
-Unsupported third party contributions are provided in directory "contrib".
-
-A Java implementation of zlib is available in the Java Development Kit 1.1
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-See the zlib home page http://www.cdrom.com/pub/infozip/zlib/ for details.
-
-A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk>
-is in the CPAN (Comprehensive Perl Archive Network) sites, such as:
-ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib*
-
-A Python interface to zlib written by A.M. Kuchling <amk@magnet.com>
-is available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
-
-A zlib binding for TCL written by Andreas Kupries <a.kupries@westend.com>
-is availlable at http://www.westend.com/~kupries/doc/trf/man/man.html
-
-An experimental package to read and write files in .zip format,
-written on top of zlib by Gilles Vollant <info@winimage.com>, is
-available at http://www.winimage.com/zLibDll/unzip.html
-and also in the contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- To build a Windows DLL version, include in a DLL project zlib.def, zlib.rc
-  and all .c files except example.c and minigzip.c; compile with -DZLIB_DLL
-  The zlib DLL support was initially done by Alessandro Iacopetti and is
-  now maintained by Gilles Vollant <info@winimage.com>. Check the zlib DLL
-  home page at http://www.winimage.com/zLibDll
-
-  From Visual Basic, you can call the DLL functions which do not take
-  a structure as argument: compress, uncompress and all gz* functions.
-  See contrib/visual-basic.txt for more information, or get
-  http://www.tcfb.com/dowseware/cmp-z-it.zip
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization.
-  With -O, one libpng test fails. The test works in 32 bit mode (with
-  the -n32 compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1   
-  it works when compiled with cc.
-
-- on Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1
-  is necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works
-  with other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
-
-- For Turbo C the small model is supported only with reduced performance to
-  avoid any far allocation; it was tested with -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-
-- For PalmOs, see http://www.cs.uit.no/~perm/PASTA/pilot/software.html
-  Per Harald Myrvang <perm@stud.cs.uit.no>
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind.  The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes.
diff -uNrd ircd-hybrid-6.0/zlib/adler32.c ircd-pi1.0a/zlib/adler32.c
--- ircd-hybrid-6.0/zlib/adler32.c	Sat Oct 10 01:00:31 1998
+++ ircd-pi1.0a/zlib/adler32.c	Wed Dec 31 19:00:00 1969
@@ -1,48 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: adler32.c,v 1.2 1998/10/10 05:00:31 lusky Exp $ */
-
-#include "zlib.h"
-
-#define BASE 65521L /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i)  {s1 += buf[i]; s2 += s1;}
-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf)   DO8(buf,0); DO8(buf,8);
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
-    uLong adler;
-    const Bytef *buf;
-    uInt len;
-{
-    unsigned long s1 = adler & 0xffff;
-    unsigned long s2 = (adler >> 16) & 0xffff;
-    int k;
-
-    if (buf == Z_NULL) return 1L;
-
-    while (len > 0) {
-        k = len < NMAX ? len : NMAX;
-        len -= k;
-        while (k >= 16) {
-            DO16(buf);
-	    buf += 16;
-            k -= 16;
-        }
-        if (k != 0) do {
-            s1 += *buf++;
-	    s2 += s1;
-        } while (--k);
-        s1 %= BASE;
-        s2 %= BASE;
-    }
-    return (s2 << 16) | s1;
-}
diff -uNrd ircd-hybrid-6.0/zlib/algorithm.txt ircd-pi1.0a/zlib/algorithm.txt
--- ircd-hybrid-6.0/zlib/algorithm.txt	Sat Oct 10 01:19:01 1998
+++ ircd-pi1.0a/zlib/algorithm.txt	Wed Dec 31 19:00:00 1969
@@ -1,215 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by gzip (also zip and zlib) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data.  The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length).  Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes.  (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for
-a longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the process of lazy evaluation begins again. Otherwise,
-the original match is kept, and the next match search is attempted only N
-steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-2.1 Introduction
-
-The real question is, given a Huffman tree, how to decode fast.  The most
-important realization is that shorter codes are much more common than
-longer codes, so pay attention to decoding the short codes fast, and let
-the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code.  It gets that many bits from the
-stream, and looks it up in the table.  The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table.  If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code.  However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table.  What inflate() does is
-simply to make the number of bits in the first table a variable, and set it
-for the maximum speed.
-
-inflate() sends new trees relatively often, so it is possibly set for a
-smaller first level table than an application that has only one tree for
-all the data.  For inflate, which has 286 possible codes for the
-literal/length tree, the size of the first table is nine bits.  Also the
-distance trees have 30 possible values, and the size of the first table is
-six bits.  Note that for each of those cases, the table ended up one bit
-longer than the ``average'' code length, i.e. the code length of an
-approximately flat code which would be a little more than eight bits for
-286 symbols and a little less than five bits for 30 symbols.  It would be
-interesting to see if optimizing the first level table for other
-applications gave values within a bit or two of the flat code size.
-
-
-2.2 More details on the inflate table lookup
-
-Ok, you want to know what this cleverly obfuscated inflate tree actually  
-looks like.  You are correct that it's not a Huffman tree.  It is simply a  
-lookup table for the first, let's say, nine bits of a Huffman symbol.  The  
-symbol could be as short as one bit or as long as 15 bits.  If a particular  
-symbol is shorter than nine bits, then that symbol's translation is duplicated
-in all those entries that start with that symbol's bits.  For example, if the  
-symbol is four bits, then it's duplicated 32 times in a nine-bit table.  If a  
-symbol is nine bits long, it appears in the table once.
-
-If the symbol is longer than nine bits, then that entry in the table points  
-to another similar table for the remaining bits.  Again, there are duplicated  
-entries as needed.  The idea is that most of the time the symbol will be short
-and there will only be one table look up.  (That's whole idea behind data  
-compression in the first place.)  For the less frequent long symbols, there  
-will be two lookups.  If you had a compression method with really long  
-symbols, you could have as many levels of lookups as is efficient.  For  
-inflate, two is enough.
-
-So a table entry either points to another table (in which case nine bits in  
-the above example are gobbled), or it contains the translation for the symbol  
-and the number of bits to gobble.  Then you start again with the next  
-ungobbled bit.
-
-You may wonder: why not just have one lookup table for how ever many bits the  
-longest symbol is?  The reason is that if you do that, you end up spending  
-more time filling in duplicate symbol entries than you do actually decoding.   
-At least for deflate's output that generates new trees every several 10's of  
-kbytes.  You can imagine that filling in a 2^15 entry table for a 15-bit code  
-would take too long if you're only decoding several thousand symbols.  At the  
-other extreme, you could make a new table for every bit in the code.  In fact,
-that's essentially a Huffman tree.  But then you spend two much time  
-traversing the tree while decoding, even for short symbols.
-
-So the number of bits for the first lookup table is a trade of the time to  
-fill out the table vs. the time spent looking at the second level and above of
-the table.
-
-Here is an example, scaled down:
-
-The code being decoded, with 10 symbols, from 1 to 6 bits long:
-
-A: 0
-B: 10
-C: 1100
-D: 11010
-E: 11011
-F: 11100
-G: 11101
-H: 11110
-I: 111110
-J: 111111
-
-Let's make the first table three bits long (eight entries):
-
-000: A,1
-001: A,1
-010: A,1
-011: A,1
-100: B,2
-101: B,2
-110: -> table X (gobble 3 bits)
-111: -> table Y (gobble 3 bits)
-
-Each entry is what the bits decode to and how many bits that is, i.e. how  
-many bits to gobble.  Or the entry points to another table, with the number of
-bits to gobble implicit in the size of the table.
-
-Table X is two bits long since the longest code starting with 110 is five bits
-long:
-
-00: C,1
-01: C,1
-10: D,2
-11: E,2
-
-Table Y is three bits long since the longest code starting with 111 is six  
-bits long:
-
-000: F,2
-001: F,2
-010: G,2
-011: G,2
-100: H,2
-101: H,2
-110: I,3
-111: J,3
-
-So what we have here are three tables with a total of 20 entries that had to  
-be constructed.  That's compared to 64 entries for a single table.  Or  
-compared to 16 entries for a Huffman tree (six two entry tables and one four  
-entry table).  Assuming that the code ideally represents the probability of  
-the symbols, it takes on the average 1.25 lookups per symbol.  That's compared
-to one lookup for the single table, or 1.66 lookups per symbol for the  
-Huffman tree.
-
-There, I think that gives you a picture of what's going on.  For inflate, the  
-meaning of a particular symbol is often more than just a letter.  It can be a  
-byte (a "literal"), or it can be either a length or a distance which  
-indicates a base value and a number of bits to fetch after the code that is  
-added to the base value.  Or it might be the special end-of-block code.  The  
-data structures created in inftrees.c try to encode all that information  
-compactly in the tables.
-
-
-Jean-loup Gailly        Mark Adler
-jloup@gzip.org          madler@alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-ftp://ds.internic.net/rfc/rfc1951.txt
-
-
diff -uNrd ircd-hybrid-6.0/zlib/compress.c ircd-pi1.0a/zlib/compress.c
--- ircd-hybrid-6.0/zlib/compress.c	Sat Oct 10 01:00:32 1998
+++ ircd-pi1.0a/zlib/compress.c	Wed Dec 31 19:00:00 1969
@@ -1,68 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: compress.c,v 1.2 1998/10/10 05:00:32 lusky Exp $ */
-
-#include "zlib.h"
-
-/* ===========================================================================
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-    int level;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-    stream.opaque = (voidpf)0;
-
-    err = deflateInit(&stream, level);
-    if (err != Z_OK) return err;
-
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = deflateEnd(&stream);
-    return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
diff -uNrd ircd-hybrid-6.0/zlib/crc32.c ircd-pi1.0a/zlib/crc32.c
--- ircd-hybrid-6.0/zlib/crc32.c	Sat Oct 10 01:00:33 1998
+++ ircd-pi1.0a/zlib/crc32.c	Wed Dec 31 19:00:00 1969
@@ -1,162 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: crc32.c,v 1.2 1998/10/10 05:00:33 lusky Exp $ */
-
-#include "zlib.h"
-
-#define local static
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local int crc_table_empty = 1;
-local uLongf crc_table[256];
-local void make_crc_table OF((void));
-
-/*
-  Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
-  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
-  Polynomials over GF(2) are represented in binary, one bit per coefficient,
-  with the lowest powers in the most significant bit.  Then adding polynomials
-  is just exclusive-or, and multiplying a polynomial by x is a right shift by
-  one.  If we call the above polynomial p, and represent a byte as the
-  polynomial q, also with the lowest power in the most significant bit (so the
-  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
-  where a mod b means the remainder after dividing a by b.
-
-  This calculation is done using the shift-register method of multiplying and
-  taking the remainder.  The register is initialized to zero, and for each
-  incoming bit, x^32 is added mod p to the register if the bit is a one (where
-  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
-  x (which is shifting right by one and adding x^32 mod p if the bit shifted
-  out is a one).  We start with the highest power (least significant bit) of
-  q and repeat for all eight bits of q.
-
-  The table is simply the CRC of all possible eight bit values.  This is all
-  the information needed to generate CRC's on data a byte at a time for all
-  combinations of CRC register values and incoming bytes.
-*/
-local void make_crc_table()
-{
-  uLong c;
-  int n, k;
-  uLong poly;            /* polynomial exclusive-or pattern */
-  /* terms of polynomial defining this crc (except x^32): */
-  static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
-  /* make exclusive-or pattern from polynomial (0xedb88320L) */
-  poly = 0L;
-  for (n = 0; n < sizeof(p)/sizeof(Byte); n++)
-    poly |= 1L << (31 - p[n]);
- 
-  for (n = 0; n < 256; n++)
-  {
-    c = (uLong)n;
-    for (k = 0; k < 8; k++)
-      c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-    crc_table[n] = c;
-  }
-  crc_table_empty = 0;
-}
-#else
-/* ========================================================================
- * Table of CRC-32's of all single-byte values (made by make_crc_table)
- */
-local const uLongf crc_table[256] = {
-  0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
-  0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
-  0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
-  0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
-  0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
-  0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
-  0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
-  0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
-  0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
-  0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
-  0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
-  0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
-  0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
-  0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
-  0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
-  0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
-  0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
-  0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
-  0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
-  0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
-  0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
-  0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
-  0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
-  0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
-  0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
-  0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
-  0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
-  0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
-  0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
-  0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
-  0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
-  0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
-  0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
-  0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
-  0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
-  0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
-  0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
-  0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
-  0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
-  0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
-  0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
-  0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
-  0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
-  0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
-  0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
-  0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
-  0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
-  0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
-  0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
-  0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
-  0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
-  0x2d02ef8dL
-};
-#endif
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const uLongf * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
-  if (crc_table_empty) make_crc_table();
-#endif
-  return (const uLongf *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
-#define DO2(buf)  DO1(buf); DO1(buf);
-#define DO4(buf)  DO2(buf); DO2(buf);
-#define DO8(buf)  DO4(buf); DO4(buf);
-
-/* ========================================================================= */
-uLong ZEXPORT crc32(crc, buf, len)
-    uLong crc;
-    const Bytef *buf;
-    uInt len;
-{
-    if (buf == Z_NULL) return 0L;
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-      make_crc_table();
-#endif
-    crc = crc ^ 0xffffffffL;
-    while (len >= 8)
-    {
-      DO8(buf);
-      len -= 8;
-    }
-    if (len) do {
-      DO1(buf);
-    } while (--len);
-    return crc ^ 0xffffffffL;
-}
diff -uNrd ircd-hybrid-6.0/zlib/deflate.c ircd-pi1.0a/zlib/deflate.c
--- ircd-hybrid-6.0/zlib/deflate.c	Sat Oct 10 01:00:34 1998
+++ ircd-pi1.0a/zlib/deflate.c	Wed Dec 31 19:00:00 1969
@@ -1,1350 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process depends on being able to identify portions
- *      of the input text which are identical to earlier input (within a
- *      sliding window trailing behind the input currently being processed).
- *
- *      The most straightforward technique turns out to be the fastest for
- *      most input files: try all possible matches and select the longest.
- *      The key feature of this algorithm is that insertions into the string
- *      dictionary are very simple and thus fast, and deletions are avoided
- *      completely. Insertions are performed at each input character, whereas
- *      string matches are performed only when the previous match ends. So it
- *      is preferable to spend more time in matches to allow very fast string
- *      insertions and avoid deletions. The matching algorithm for small
- *      strings is inspired from that of Rabin & Karp. A brute force approach
- *      is used to find longer strings when a small match has been found.
- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- *      (by Leonid Broukhis).
- *         A previous version of this file used a more sophisticated algorithm
- *      (by Fiala and Greene) which is guaranteed to run in linear amortized
- *      time, but has a larger average cost, uses more memory and is patented.
- *      However the F&G algorithm may be faster for some highly redundant
- *      files if the parameter max_chain_length (described below) is too large.
- *
- *  ACKNOWLEDGEMENTS
- *
- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- *      I found it in 'freeze' written by Leonid Broukhis.
- *      Thanks to many people for bug reports and testing.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- *      Available in ftp://ds.internic.net/rfc/rfc1951.txt
- *
- *      A description of the Rabin and Karp algorithm is given in the book
- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- *      Fiala,E.R., and Greene,D.H.
- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id: deflate.c,v 1.2 1998/10/10 05:00:34 lusky Exp $ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
-   " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- *  Function prototypes.
- */
-typedef enum {
-    need_more,      /* block not completed, need more input or more output */
-    block_done,     /* block flush performed */
-    finish_started, /* finish started, need only more output at next deflate */
-    finish_done     /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window    OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast   OF((deflate_state *s, int flush));
-local block_state deflate_slow   OF((deflate_state *s, int flush));
-local void lm_init        OF((deflate_state *s));
-local void putShortMSB    OF((deflate_state *s, uInt b));
-local void flush_pending  OF((z_streamp strm));
-local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifdef ASMV
-      void match_init OF((void)); /* asm code initialization */
-      uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#endif
-
-#ifdef DEBUG
-local  void check_match OF((deflate_state *s, IPos start, IPos match,
-                            int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-#  define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
-   ush good_length; /* reduce lazy search above this match length */
-   ush max_lazy;    /* do not perform lazy search above this match length */
-   ush nice_length; /* quit search above this match length */
-   ush max_chain;
-   compress_func func;
-} config;
-
-local const config configuration_table[10] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* maximum speed, no lazy matches */
-/* 2 */ {4,    5, 16,    8, deflate_fast},
-/* 3 */ {4,    6, 32,   32, deflate_fast},
-
-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */
-/* 5 */ {8,   16, 32,   32, deflate_slow},
-/* 6 */ {8,   16, 128, 128, deflate_slow},
-/* 7 */ {8,   32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
- *    input characters, so that a running hash key can be computed from the
- *    previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
- *    input characters and the first MIN_MATCH bytes of str are valid
- *    (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
-    s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamp strm;
-    int level;
-    const char *version;
-    int stream_size;
-{
-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
-			 Z_DEFAULT_STRATEGY, version, stream_size);
-    /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-		  version, stream_size)
-    z_streamp strm;
-    int  level;
-    int  method;
-    int  windowBits;
-    int  memLevel;
-    int  strategy;
-    const char *version;
-    int stream_size;
-{
-    deflate_state *s;
-    int noheader = 0;
-    static const char* my_version = ZLIB_VERSION;
-
-    ushf *overlay;
-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
-     * output size for (length,distance) codes is <= 24 bits.
-     */
-
-    if (version == Z_NULL || version[0] != my_version[0] ||
-        stream_size != sizeof(z_stream)) {
-	return Z_VERSION_ERROR;
-    }
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->msg = Z_NULL;
-    if (strm->zalloc == Z_NULL) {
-	strm->zalloc = zcalloc;
-	strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == Z_NULL) strm->zfree = zcfree;
-
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#ifdef FASTEST
-    level = 1;
-#endif
-
-    if (windowBits < 0) { /* undocumented feature: suppress zlib header */
-        noheader = 1;
-        windowBits = -windowBits;
-    }
-    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-	strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
-        return Z_STREAM_ERROR;
-    }
-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
-    if (s == Z_NULL) return Z_MEM_ERROR;
-    strm->state = (struct internal_state FAR *)s;
-    s->strm = strm;
-
-    s->noheader = noheader;
-    s->w_bits = windowBits;
-    s->w_size = 1 << s->w_bits;
-    s->w_mask = s->w_size - 1;
-
-    s->hash_bits = memLevel + 7;
-    s->hash_size = 1 << s->hash_bits;
-    s->hash_mask = s->hash_size - 1;
-    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
-    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
-
-    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
-    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
-        s->pending_buf == Z_NULL) {
-        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
-        deflateEnd (strm);
-        return Z_MEM_ERROR;
-    }
-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
-    s->level = level;
-    s->strategy = strategy;
-    s->method = (Byte)method;
-
-    return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamp strm;
-    const Bytef *dictionary;
-    uInt  dictLength;
-{
-    deflate_state *s;
-    uInt length = dictLength;
-    uInt n;
-    IPos hash_head = 0;
-
-    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
-        strm->state->status != INIT_STATE) return Z_STREAM_ERROR;
-
-    s = strm->state;
-    strm->adler = adler32(strm->adler, dictionary, dictLength);
-
-    if (length < MIN_MATCH) return Z_OK;
-    if (length > MAX_DIST(s)) {
-	length = MAX_DIST(s);
-#ifndef USE_DICT_HEAD
-	dictionary += dictLength - length; /* use the tail of the dictionary */
-#endif
-    }
-    zmemcpy(s->window, dictionary, length);
-    s->strstart = length;
-    s->block_start = (long)length;
-
-    /* Insert all strings in the hash table (except for the last two bytes).
-     * s->lookahead stays null, so s->ins_h will be recomputed at the next
-     * call of fill_window.
-     */
-    s->ins_h = s->window[0];
-    UPDATE_HASH(s, s->ins_h, s->window[1]);
-    for (n = 0; n <= length - MIN_MATCH; n++) {
-	INSERT_STRING(s, n, hash_head);
-    }
-    if (hash_head) hash_head = 0;  /* to make compiler happy */
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
-    z_streamp strm;
-{
-    deflate_state *s;
-    
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->total_in = strm->total_out = 0;
-    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-    strm->data_type = Z_UNKNOWN;
-
-    s = (deflate_state *)strm->state;
-    s->pending = 0;
-    s->pending_out = s->pending_buf;
-
-    if (s->noheader < 0) {
-        s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */
-    }
-    s->status = s->noheader ? BUSY_STATE : INIT_STATE;
-    strm->adler = 1;
-    s->last_flush = Z_NO_FLUSH;
-
-    _tr_init(s);
-    lm_init(s);
-
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamp strm;
-    int level;
-    int strategy;
-{
-    deflate_state *s;
-    compress_func func;
-    int err = Z_OK;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-
-    if (level == Z_DEFAULT_COMPRESSION) {
-	level = 6;
-    }
-    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
-	return Z_STREAM_ERROR;
-    }
-    func = configuration_table[s->level].func;
-
-    if (func != configuration_table[level].func && strm->total_in != 0) {
-	/* Flush the last buffer: */
-	err = deflate(strm, Z_PARTIAL_FLUSH);
-    }
-    if (s->level != level) {
-	s->level = level;
-	s->max_lazy_match   = configuration_table[level].max_lazy;
-	s->good_match       = configuration_table[level].good_length;
-	s->nice_match       = configuration_table[level].nice_length;
-	s->max_chain_length = configuration_table[level].max_chain;
-    }
-    s->strategy = strategy;
-    return err;
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
-    deflate_state *s;
-    uInt b;
-{
-    put_byte(s, (Byte)(b >> 8));
-    put_byte(s, (Byte)(b & 0xff));
-}   
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
-    z_streamp strm;
-{
-    unsigned len = strm->state->pending;
-
-    if (len > strm->avail_out) len = strm->avail_out;
-    if (len == 0) return;
-
-    zmemcpy(strm->next_out, strm->state->pending_out, len);
-    strm->next_out  += len;
-    strm->state->pending_out  += len;
-    strm->total_out += len;
-    strm->avail_out  -= len;
-    strm->state->pending -= len;
-    if (strm->state->pending == 0) {
-        strm->state->pending_out = strm->state->pending_buf;
-    }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
-    z_streamp strm;
-    int flush;
-{
-    int old_flush; /* value of flush param for previous deflate call */
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-	flush > Z_FINISH || flush < 0) {
-        return Z_STREAM_ERROR;
-    }
-    s = strm->state;
-
-    if (strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
-	(s->status == FINISH_STATE && flush != Z_FINISH)) {
-        ERR_RETURN(strm, Z_STREAM_ERROR);
-    }
-    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
-    s->strm = strm; /* just in case */
-    old_flush = s->last_flush;
-    s->last_flush = flush;
-
-    /* Write the zlib header */
-    if (s->status == INIT_STATE) {
-
-        uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
-        uInt level_flags = (s->level-1) >> 1;
-
-        if (level_flags > 3) level_flags = 3;
-        header |= (level_flags << 6);
-	if (s->strstart != 0) header |= PRESET_DICT;
-        header += 31 - (header % 31);
-
-        s->status = BUSY_STATE;
-        putShortMSB(s, header);
-
-	/* Save the adler32 of the preset dictionary: */
-	if (s->strstart != 0) {
-	    putShortMSB(s, (uInt)(strm->adler >> 16));
-	    putShortMSB(s, (uInt)(strm->adler & 0xffff));
-	}
-	strm->adler = 1L;
-    }
-
-    /* Flush as much pending output as possible */
-    if (s->pending != 0) {
-        flush_pending(strm);
-        if (strm->avail_out == 0) {
-	    /* Since avail_out is 0, deflate will be called again with
-	     * more output space, but possibly with both pending and
-	     * avail_in equal to zero. There won't be anything to do,
-	     * but this is not an error situation so make sure we
-	     * return OK instead of BUF_ERROR at next call of deflate:
-             */
-	    s->last_flush = -1;
-	    return Z_OK;
-	}
-
-    /* Make sure there is something to do and avoid duplicate consecutive
-     * flushes. For repeated and useless calls with Z_FINISH, we keep
-     * returning Z_STREAM_END instead of Z_BUFF_ERROR.
-     */
-    } else if (strm->avail_in == 0 && flush <= old_flush &&
-	       flush != Z_FINISH) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* User must not provide more input after the first FINISH: */
-    if (s->status == FINISH_STATE && strm->avail_in != 0) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* Start a new block or continue the current one.
-     */
-    if (strm->avail_in != 0 || s->lookahead != 0 ||
-        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
-        block_state bstate;
-
-	bstate = (*(configuration_table[s->level].func))(s, flush);
-
-        if (bstate == finish_started || bstate == finish_done) {
-            s->status = FINISH_STATE;
-        }
-        if (bstate == need_more || bstate == finish_started) {
-	    if (strm->avail_out == 0) {
-	        s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
-	    }
-	    return Z_OK;
-	    /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
-	     * of deflate should use the same flush parameter to make sure
-	     * that the flush is complete. So we don't have to output an
-	     * empty block here, this will be done at next call. This also
-	     * ensures that for a very small output buffer, we emit at most
-	     * one empty block.
-	     */
-	}
-        if (bstate == block_done) {
-            if (flush == Z_PARTIAL_FLUSH) {
-                _tr_align(s);
-            } else { /* FULL_FLUSH or SYNC_FLUSH */
-                _tr_stored_block(s, (char*)0, 0L, 0);
-                /* For a full flush, this empty block will be recognized
-                 * as a special marker by inflate_sync().
-                 */
-                if (flush == Z_FULL_FLUSH) {
-                    CLEAR_HASH(s);             /* forget history */
-                }
-            }
-            flush_pending(strm);
-	    if (strm->avail_out == 0) {
-	      s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
-	      return Z_OK;
-	    }
-        }
-    }
-    Assert(strm->avail_out > 0, "bug2");
-
-    if (flush != Z_FINISH) return Z_OK;
-    if (s->noheader) return Z_STREAM_END;
-
-    /* Write the zlib trailer (adler32) */
-    putShortMSB(s, (uInt)(strm->adler >> 16));
-    putShortMSB(s, (uInt)(strm->adler & 0xffff));
-    flush_pending(strm);
-    /* If avail_out is zero, the application will call deflate again
-     * to flush the rest.
-     */
-    s->noheader = -1; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
-    z_streamp strm;
-{
-    int status;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
-    status = strm->state->status;
-    if (status != INIT_STATE && status != BUSY_STATE &&
-	status != FINISH_STATE) {
-      return Z_STREAM_ERROR;
-    }
-
-    /* Deallocate in reverse order of allocations: */
-    TRY_FREE(strm, strm->state->pending_buf);
-    TRY_FREE(strm, strm->state->head);
-    TRY_FREE(strm, strm->state->prev);
-    TRY_FREE(strm, strm->state->window);
-
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-
-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
-    z_streamp dest;
-    z_streamp source;
-{
-#ifdef MAXSEG_64K
-    return Z_STREAM_ERROR;
-#else
-    deflate_state *ds;
-    deflate_state *ss;
-    ushf *overlay;
-
-
-    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
-        return Z_STREAM_ERROR;
-    }
-
-    ss = source->state;
-
-    *dest = *source;
-
-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
-    if (ds == Z_NULL) return Z_MEM_ERROR;
-    dest->state = (struct internal_state FAR *) ds;
-    *ds = *ss;
-    ds->strm = dest;
-
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
-
-    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
-        ds->pending_buf == Z_NULL) {
-        deflateEnd (dest);
-        return Z_MEM_ERROR;
-    }
-    /* following zmemcpy do not work for 16-bit MSDOS */
-    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
-    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
-    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
-    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
-    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
-    ds->l_desc.dyn_tree = ds->dyn_ltree;
-    ds->d_desc.dyn_tree = ds->dyn_dtree;
-    ds->bl_desc.dyn_tree = ds->bl_tree;
-
-    return Z_OK;
-#endif
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read.  All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
-    z_streamp strm;
-    Bytef *buf;
-    unsigned size;
-{
-    unsigned len = strm->avail_in;
-
-    if (len > size) len = size;
-    if (len == 0) return 0;
-
-    strm->avail_in  -= len;
-
-    if (!strm->state->noheader) {
-        strm->adler = adler32(strm->adler, strm->next_in, len);
-    }
-    zmemcpy(buf, strm->next_in, len);
-    strm->next_in  += len;
-    strm->total_in += len;
-
-    return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
-    deflate_state *s;
-{
-    s->window_size = (ulg)2L*s->w_size;
-
-    CLEAR_HASH(s);
-
-    /* Set the default configuration parameters:
-     */
-    s->max_lazy_match   = configuration_table[s->level].max_lazy;
-    s->good_match       = configuration_table[s->level].good_length;
-    s->nice_match       = configuration_table[s->level].nice_length;
-    s->max_chain_length = configuration_table[s->level].max_chain;
-
-    s->strstart = 0;
-    s->block_start = 0L;
-    s->lookahead = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    s->ins_h = 0;
-#ifdef ASMV
-    match_init(); /* initialize the asm code */
-#endif
-}
-
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-#ifndef FASTEST
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2:
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-
-#else /* FASTEST */
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 only
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    Assert(cur_match < s->strstart, "no future");
-
-    match = s->window + cur_match;
-
-    /* Return failure if the match length is less than 2:
-     */
-    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
-    /* The check at best_len-1 can be removed because it will be made
-     * again later. (This heuristic is not always a win.)
-     * It is not necessary to compare scan[2] and match[2] since they
-     * are always equal when the other bytes match, given that
-     * the hash keys are equal and that HASH_BITS >= 8.
-     */
-    scan += 2, match += 2;
-    Assert(*scan == *match, "match[2]?");
-
-    /* We check for insufficient lookahead only every 8th comparison;
-     * the 256th check will be made at strstart+258.
-     */
-    do {
-    } while (*++scan == *++match && *++scan == *++match &&
-	     *++scan == *++match && *++scan == *++match &&
-	     *++scan == *++match && *++scan == *++match &&
-	     *++scan == *++match && *++scan == *++match &&
-	     scan < strend);
-
-    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-    len = MAX_MATCH - (int)(strend - scan);
-
-    if (len < MIN_MATCH) return MIN_MATCH - 1;
-
-    s->match_start = cur_match;
-    return len <= s->lookahead ? len : s->lookahead;
-}
-#endif /* FASTEST */
-#endif /* ASMV */
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
-    deflate_state *s;
-    IPos start, match;
-    int length;
-{
-    /* check that the match is indeed a match */
-    if (zmemcmp(s->window + match,
-                s->window + start, length) != EQUAL) {
-        fprintf(stderr, " start %u, match %u, length %d\n",
-		start, match, length);
-        do {
-	    fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
-	} while (--length != 0);
-        z_error("invalid match");
-    }
-    if (z_verbose > 1) {
-        fprintf(stderr,"\\[%d,%d]", start-match, length);
-        do { putc(s->window[start++], stderr); } while (--length != 0);
-    }
-}
-#else
-#  define check_match(s, start, match, length)
-#endif
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- *    At least one byte has been read, or avail_in == 0; reads are
- *    performed for at least two bytes (required for the zip translate_eol
- *    option -- not supported here).
- */
-local void fill_window(s)
-    deflate_state *s;
-{
-    register unsigned n, m;
-    register Posf *p;
-    unsigned more;    /* Amount of free space at the end of the window. */
-    uInt wsize = s->w_size;
-
-    do {
-        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
-        /* Deal with !@#$% 64K limit: */
-        if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
-            more = wsize;
-
-        } else if (more == (unsigned)(-1)) {
-            /* Very unlikely, but possible on 16 bit machine if strstart == 0
-             * and lookahead == 1 (input done one byte at time)
-             */
-            more--;
-
-        /* If the window is almost full and there is insufficient lookahead,
-         * move the upper half to the lower one to make room in the upper half.
-         */
-        } else if (s->strstart >= wsize+MAX_DIST(s)) {
-
-            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
-            s->match_start -= wsize;
-            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
-            s->block_start -= (long) wsize;
-
-            /* Slide the hash table (could be avoided with 32 bit values
-               at the expense of memory usage). We slide even when level == 0
-               to keep the hash table consistent if we switch back to level > 0
-               later. (Using level 0 permanently is not an optimal usage of
-               zlib, so we don't care about this pathological case.)
-             */
-	    n = s->hash_size;
-	    p = &s->head[n];
-	    do {
-		m = *--p;
-		*p = (Pos)(m >= wsize ? m-wsize : NIL);
-	    } while (--n);
-
-	    n = wsize;
-#ifndef FASTEST
-	    p = &s->prev[n];
-	    do {
-		m = *--p;
-		*p = (Pos)(m >= wsize ? m-wsize : NIL);
-		/* If n is not on any hash chain, prev[n] is garbage but
-		 * its value will never be used.
-		 */
-	    } while (--n);
-#endif
-            more += wsize;
-        }
-        if (s->strm->avail_in == 0) return;
-
-        /* If there was no sliding:
-         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
-         *    more == window_size - lookahead - strstart
-         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
-         * => more >= window_size - 2*WSIZE + 2
-         * In the BIG_MEM or MMAP case (not yet supported),
-         *   window_size == input_size + MIN_LOOKAHEAD  &&
-         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
-         * Otherwise, window_size == 2*WSIZE so more >= 2.
-         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
-         */
-        Assert(more >= 2, "more < 2");
-
-        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
-        s->lookahead += n;
-
-        /* Initialize the hash value now that we have some input: */
-        if (s->lookahead >= MIN_MATCH) {
-            s->ins_h = s->window[s->strstart];
-            UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-            Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-        }
-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
-         * but this is not important since only literal bytes will be emitted.
-         */
-
-    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
-   _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
-		(ulg)((long)s->strstart - s->block_start), \
-		(eof)); \
-   s->block_start = s->strstart; \
-   flush_pending(s->strm); \
-   Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
-   FLUSH_BLOCK_ONLY(s, eof); \
-   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
-     * to pending_buf_size, and each stored block has a 5 byte header:
-     */
-    ulg max_block_size = 0xffff;
-    ulg max_start;
-
-    if (max_block_size > s->pending_buf_size - 5) {
-        max_block_size = s->pending_buf_size - 5;
-    }
-
-    /* Copy as much as possible from input to output: */
-    for (;;) {
-        /* Fill the window as much as possible: */
-        if (s->lookahead <= 1) {
-
-            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
-		   s->block_start >= (long)s->w_size, "slide too late");
-
-            fill_window(s);
-            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-	Assert(s->block_start >= 0L, "block gone");
-
-	s->strstart += s->lookahead;
-	s->lookahead = 0;
-
-	/* Emit a stored block if pending_buf will be full: */
- 	max_start = s->block_start + max_block_size;
-        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
-	    /* strstart == 0 is possible when wraparound on 16-bit machine */
-	    s->lookahead = (uInt)(s->strstart - max_start);
-	    s->strstart = (uInt)max_start;
-            FLUSH_BLOCK(s, 0);
-	}
-	/* Flush if we may have to slide, otherwise block_start may become
-         * negative and the data will be gone:
-         */
-        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
-            FLUSH_BLOCK(s, 0);
-	}
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL; /* head of the hash chain */
-    int bflush;           /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-	        return need_more;
-	    }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         * At this point we have always match_length < MIN_MATCH
-         */
-        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            if (s->strategy != Z_HUFFMAN_ONLY) {
-                s->match_length = longest_match (s, hash_head);
-            }
-            /* longest_match() sets match_start */
-        }
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->match_start, s->match_length);
-
-            _tr_tally_dist(s, s->strstart - s->match_start,
-                           s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-
-            /* Insert new strings in the hash table only if the match length
-             * is not too large. This saves time but degrades compression.
-             */
-#ifndef FASTEST
-            if (s->match_length <= s->max_insert_length &&
-                s->lookahead >= MIN_MATCH) {
-                s->match_length--; /* string at strstart already in hash table */
-                do {
-                    s->strstart++;
-                    INSERT_STRING(s, s->strstart, hash_head);
-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
-                     * always MIN_MATCH bytes ahead.
-                     */
-                } while (--s->match_length != 0);
-                s->strstart++; 
-            } else
-#endif
-	    {
-                s->strstart += s->match_length;
-                s->match_length = 0;
-                s->ins_h = s->window[s->strstart];
-                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-                Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
-                 * matter since it will be recomputed at next deflate call.
-                 */
-            }
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++; 
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL;    /* head of hash chain */
-    int bflush;              /* set if current block must be flushed */
-
-    /* Process the input block. */
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-	        return need_more;
-	    }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         */
-        s->prev_length = s->match_length, s->prev_match = s->match_start;
-        s->match_length = MIN_MATCH-1;
-
-        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
-            s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            if (s->strategy != Z_HUFFMAN_ONLY) {
-                s->match_length = longest_match (s, hash_head);
-            }
-            /* longest_match() sets match_start */
-
-            if (s->match_length <= 5 && (s->strategy == Z_FILTERED ||
-                 (s->match_length == MIN_MATCH &&
-                  s->strstart - s->match_start > TOO_FAR))) {
-
-                /* If prev_match is also MIN_MATCH, match_start is garbage
-                 * but we will ignore the current match anyway.
-                 */
-                s->match_length = MIN_MATCH-1;
-            }
-        }
-        /* If there was a match at the previous step and the current
-         * match is not better, output the previous match:
-         */
-        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
-            /* Do not insert strings in hash table beyond this. */
-
-            check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
-            _tr_tally_dist(s, s->strstart -1 - s->prev_match,
-			   s->prev_length - MIN_MATCH, bflush);
-
-            /* Insert in hash table all strings up to the end of the match.
-             * strstart-1 and strstart are already inserted. If there is not
-             * enough lookahead, the last two strings are not inserted in
-             * the hash table.
-             */
-            s->lookahead -= s->prev_length-1;
-            s->prev_length -= 2;
-            do {
-                if (++s->strstart <= max_insert) {
-                    INSERT_STRING(s, s->strstart, hash_head);
-                }
-            } while (--s->prev_length != 0);
-            s->match_available = 0;
-            s->match_length = MIN_MATCH-1;
-            s->strstart++;
-
-            if (bflush) FLUSH_BLOCK(s, 0);
-
-        } else if (s->match_available) {
-            /* If there was no match at the previous position, output a
-             * single literal. If there was a match but the current match
-             * is longer, truncate the previous match to a single literal.
-             */
-            Tracevv((stderr,"%c", s->window[s->strstart-1]));
-	    _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-	    if (bflush) {
-                FLUSH_BLOCK_ONLY(s, 0);
-            }
-            s->strstart++;
-            s->lookahead--;
-            if (s->strm->avail_out == 0) return need_more;
-        } else {
-            /* There is no previous match to compare with, wait for
-             * the next step to decide.
-             */
-            s->match_available = 1;
-            s->strstart++;
-            s->lookahead--;
-        }
-    }
-    Assert (flush != Z_NO_FLUSH, "no flush?");
-    if (s->match_available) {
-        Tracevv((stderr,"%c", s->window[s->strstart-1]));
-        _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-        s->match_available = 0;
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
diff -uNrd ircd-hybrid-6.0/zlib/deflate.h ircd-pi1.0a/zlib/deflate.h
--- ircd-hybrid-6.0/zlib/deflate.h	Sat Oct 10 01:00:35 1998
+++ ircd-pi1.0a/zlib/deflate.h	Wed Dec 31 19:00:00 1969
@@ -1,318 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-1998 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: deflate.h,v 1.2 1998/10/10 05:00:35 lusky Exp $ */
-
-#ifndef _DEFLATE_H
-#define _DEFLATE_H
-
-#include "zutil.h"
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE    42
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    int   pending;       /* nb of bytes in the pending buffer */
-    int   noheader;      /* suppress zlib header and adler32 */
-    Byte  data_type;     /* UNKNOWN, BINARY or ASCII */
-    Byte  method;        /* STORED (for zip only) or DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to supress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    int last_eob_len;   /* bit length of EOB code for last block */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-        /* in trees.c */
-void _tr_init         OF((deflate_state *s));
-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-			  int eof));
-void _tr_align        OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch _length_code[];
-  extern uch _dist_code[];
-#else
-  extern const uch _length_code[];
-  extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length) 
-#endif
-
-#endif
diff -uNrd ircd-hybrid-6.0/zlib/example.c ircd-pi1.0a/zlib/example.c
--- ircd-hybrid-6.0/zlib/example.c	Sat Oct 10 01:00:35 1998
+++ ircd-pi1.0a/zlib/example.c	Wed Dec 31 19:00:00 1969
@@ -1,556 +0,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: example.c,v 1.2 1998/10/10 05:00:35 lusky Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#else
-   extern void exit  OF((int));
-#endif
-
-#if defined(VMS) || defined(RISCOS)
-#  define TESTFILE "foo-gz"
-#else
-#  define TESTFILE "foo.gz"
-#endif
-
-#define CHECK_ERR(err, msg) { \
-    if (err != Z_OK) { \
-        fprintf(stderr, "%s error: %d\n", msg, err); \
-        exit(1); \
-    } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress      OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-void test_gzio          OF((const char *out, const char *in, 
-		            Byte *uncompr, int uncomprLen));
-void test_deflate       OF((Byte *compr, uLong comprLen));
-void test_inflate       OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-void test_flush         OF((Byte *compr, uLong *comprLen));
-void test_sync          OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-		            Byte *uncompr, uLong uncomprLen));
-int  main               OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    uLong len = strlen(hello)+1;
-
-    err = compress(compr, &comprLen, (const Bytef*)hello, len);
-    CHECK_ERR(err, "compress");
-
-    strcpy((char*)uncompr, "garbage");
-
-    err = uncompress(uncompr, &uncomprLen, compr, comprLen);
-    CHECK_ERR(err, "uncompress");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad uncompress\n");
-	exit(1);
-    } else {
-        printf("uncompress(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(out, in, uncompr, uncomprLen)
-    const char *out; /* compressed output file */
-    const char *in;  /* compressed input file */
-    Byte *uncompr;
-    int  uncomprLen;
-{
-    int err;
-    int len = strlen(hello)+1;
-    gzFile file;
-    z_off_t pos;
-
-    file = gzopen(out, "wb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    gzputc(file, 'h');
-    if (gzputs(file, "ello") != 4) {
-        fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-	exit(1);
-    }
-    if (gzprintf(file, ", %s!", "hello") != 8) {
-        fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-	exit(1);
-    }
-    gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-    gzclose(file);
-
-    file = gzopen(in, "rb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-    }
-    strcpy((char*)uncompr, "garbage");
-
-    uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);
-    if (uncomprLen != len) {
-        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-	exit(1);
-    }
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-	exit(1);
-    } else {
-        printf("gzread(): %s\n", (char *)uncompr);
-    }
-
-    pos = gzseek(file, -8L, SEEK_CUR);
-    if (pos != 6 || gztell(file) != pos) {
-	fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-		(long)pos, (long)gztell(file));
-	exit(1);
-    }
-
-    if (gzgetc(file) != ' ') {
-	fprintf(stderr, "gzgetc error\n");
-	exit(1);
-    }
-
-    gzgets(file, (char*)uncompr, uncomprLen);
-    uncomprLen = strlen((char*)uncompr);
-    if (uncomprLen != 6) { /* "hello!" */
-        fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-	exit(1);
-    }
-    if (strcmp((char*)uncompr, hello+7)) {
-        fprintf(stderr, "bad gzgets after gzseek\n");
-	exit(1);
-    } else {
-        printf("gzgets() after gzseek: %s\n", (char *)uncompr);
-    }
-
-    gzclose(file);
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    int len = strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-
-    while (c_stream.total_in != (uLong)len && c_stream.total_out < comprLen) {
-        c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
-        err = deflate(&c_stream, Z_NO_FLUSH);
-        CHECK_ERR(err, "deflate");
-    }
-    /* Finish the stream, still forcing small buffers: */
-    for (;;) {
-        c_stream.avail_out = 1;
-        err = deflate(&c_stream, Z_FINISH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "deflate");
-    }
-
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 0;
-    d_stream.next_out = uncompr;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
-        d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate\n");
-	exit(1);
-    } else {
-        printf("inflate(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_SPEED);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    /* At this point, uncompr is still mostly zeroes, so it should compress
-     * very well:
-     */
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-    if (c_stream.avail_in != 0) {
-        fprintf(stderr, "deflate not greedy\n");
-	exit(1);
-    }
-
-    /* Feed in already compressed data and switch to no compression: */
-    deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-    c_stream.next_in = compr;
-    c_stream.avail_in = (uInt)comprLen/2;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    /* Switch back to compressing mode: */
-    deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-	exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    for (;;) {
-        d_stream.next_out = uncompr;            /* discard the output */
-	d_stream.avail_out = (uInt)uncomprLen;
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "large inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-        fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-	exit(1);
-    } else {
-        printf("large_inflate(): OK\n");
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
-    Byte *compr;
-    uLong *comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    int len = strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-    c_stream.avail_in = 3;
-    c_stream.avail_out = (uInt)*comprLen;
-    err = deflate(&c_stream, Z_FULL_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    compr[3]++; /* force an error in first compressed block */
-    c_stream.avail_in = len - 3;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        CHECK_ERR(err, "deflate");
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-
-    *comprLen = c_stream.total_out;
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 2; /* just read the zlib header */
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    inflate(&d_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "inflate");
-
-    d_stream.avail_in = (uInt)comprLen-2;   /* read all compressed data */
-    err = inflateSync(&d_stream);           /* but skip the damaged part */
-    CHECK_ERR(err, "inflateSync");
-
-    err = inflate(&d_stream, Z_FINISH);
-    if (err != Z_DATA_ERROR) {
-        fprintf(stderr, "inflate should report DATA_ERROR\n");
-        /* Because of incorrect adler32 */
-	exit(1);
-    }
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    printf("after inflateSync(): hel%s\n", (char *)uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    err = deflateSetDictionary(&c_stream,
-			       (const Bytef*)dictionary, sizeof(dictionary));
-    CHECK_ERR(err, "deflateSetDictionary");
-
-    dictId = c_stream.adler;
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    c_stream.next_in = (Bytef*)hello;
-    c_stream.avail_in = (uInt)strlen(hello)+1;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-	exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    for (;;) {
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-	if (err == Z_NEED_DICT) {
-	    if (d_stream.adler != dictId) {
-		fprintf(stderr, "unexpected dictionary");
-		exit(1);
-	    }
-	    err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-				       sizeof(dictionary));
-	}
-        CHECK_ERR(err, "inflate with dict");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate with dict\n");
-	exit(1);
-    } else {
-        printf("inflate with dictionary: %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Usage:  example [output.gz  [input.gz]]
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    Byte *compr, *uncompr;
-    uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
-    uLong uncomprLen = comprLen;
-    static const char* myVersion = ZLIB_VERSION;
-
-    if (zlibVersion()[0] != myVersion[0]) {
-        fprintf(stderr, "incompatible zlib version\n");
-        exit(1);
-
-    } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
-        fprintf(stderr, "warning: different zlib version\n");
-    }
-
-    compr    = (Byte*)calloc((uInt)comprLen, 1);
-    uncompr  = (Byte*)calloc((uInt)uncomprLen, 1);
-    /* compr and uncompr are cleared to avoid reading uninitialized
-     * data and to ensure that uncompr compresses well.
-     */
-    if (compr == Z_NULL || uncompr == Z_NULL) {
-        printf("out of memory\n");
-	exit(1);
-    }
-    test_compress(compr, comprLen, uncompr, uncomprLen);
-
-    test_gzio((argc > 1 ? argv[1] : TESTFILE),
-              (argc > 2 ? argv[2] : TESTFILE),
-	      uncompr, (int)uncomprLen);
-
-    test_deflate(compr, comprLen);
-    test_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-    test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_flush(compr, &comprLen);
-    test_sync(compr, comprLen, uncompr, uncomprLen);
-    comprLen = uncomprLen;
-
-    test_dict_deflate(compr, comprLen);
-    test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    exit(0);
-    return 0; /* to avoid warning */
-}
diff -uNrd ircd-hybrid-6.0/zlib/gzio.c ircd-pi1.0a/zlib/gzio.c
--- ircd-hybrid-6.0/zlib/gzio.c	Sat Oct 10 01:00:36 1998
+++ ircd-pi1.0a/zlib/gzio.c	Wed Dec 31 19:00:00 1969
@@ -1,875 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_DEFLATE to avoid the compression code.
- */
-
-/* @(#) $Id: gzio.c,v 1.2 1998/10/10 05:00:36 lusky Exp $ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-struct internal_state {int dummy;}; /* for buggy compilers */
-
-#ifndef Z_BUFSIZE
-#  ifdef MAXSEG_64K
-#    define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-#  else
-#    define Z_BUFSIZE 16384
-#  endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-#  define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME    0x08 /* bit 3 set: original file name present */
-#define COMMENT      0x10 /* bit 4 set: file comment present */
-#define RESERVED     0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
-    z_stream stream;
-    int      z_err;   /* error code for last stream operation */
-    int      z_eof;   /* set if end of input file */
-    FILE     *file;   /* .gz file */
-    Byte     *inbuf;  /* input buffer */
-    Byte     *outbuf; /* output buffer */
-    uLong    crc;     /* crc32 of uncompressed data */
-    char     *msg;    /* error message */
-    char     *path;   /* path name for debugging only */
-    int      transparent; /* 1 if input file is not a .gz file */
-    char     mode;    /* 'w' or 'r' */
-    long     startpos; /* start of compressed data in file (header skipped) */
-} gz_stream;
-
-
-local gzFile gz_open      OF((const char *path, const char *mode, int  fd));
-local int do_flush        OF((gzFile file, int flush));
-local int    get_byte     OF((gz_stream *s));
-local void   check_header OF((gz_stream *s));
-local int    destroy      OF((gz_stream *s));
-local void   putLong      OF((FILE *file, uLong x));
-local uLong  getLong      OF((gz_stream *s));
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb"). The file is given either by file descriptor
-   or path name (if fd == -1).
-     gz_open return NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
-    const char *path;
-    const char *mode;
-    int  fd;
-{
-    int err;
-    int level = Z_DEFAULT_COMPRESSION; /* compression level */
-    int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
-    char *p = (char*)mode;
-    gz_stream *s;
-    char fmode[80]; /* copy of mode, without the compression level */
-    char *m = fmode;
-
-    if (!path || !mode) return Z_NULL;
-
-    s = (gz_stream *)ALLOC(sizeof(gz_stream));
-    if (!s) return Z_NULL;
-
-    s->stream.zalloc = (alloc_func)0;
-    s->stream.zfree = (free_func)0;
-    s->stream.opaque = (voidpf)0;
-    s->stream.next_in = s->inbuf = Z_NULL;
-    s->stream.next_out = s->outbuf = Z_NULL;
-    s->stream.avail_in = s->stream.avail_out = 0;
-    s->file = NULL;
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->crc = crc32(0L, Z_NULL, 0);
-    s->msg = NULL;
-    s->transparent = 0;
-
-    s->path = (char*)ALLOC(strlen(path)+1);
-    if (s->path == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    strcpy(s->path, path); /* do this early for debugging */
-
-    s->mode = '\0';
-    do {
-        if (*p == 'r') s->mode = 'r';
-        if (*p == 'w' || *p == 'a') s->mode = 'w';
-        if (*p >= '0' && *p <= '9') {
-	    level = *p - '0';
-	} else if (*p == 'f') {
-	  strategy = Z_FILTERED;
-	} else if (*p == 'h') {
-	  strategy = Z_HUFFMAN_ONLY;
-	} else {
-	    *m++ = *p; /* copy the mode */
-	}
-    } while (*p++ && m != fmode + sizeof(fmode));
-    if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-    
-    if (s->mode == 'w') {
-#ifdef NO_DEFLATE
-        err = Z_STREAM_ERROR;
-#else
-        err = deflateInit2(&(s->stream), level,
-                           Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
-        /* windowBits is passed < 0 to suppress zlib header */
-
-        s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
-        if (err != Z_OK || s->outbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    } else {
-        s->stream.next_in  = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
-        err = inflateInit2(&(s->stream), -MAX_WBITS);
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
-         * present after the compressed stream.
-         */
-        if (err != Z_OK || s->inbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    }
-    s->stream.avail_out = Z_BUFSIZE;
-
-    errno = 0;
-    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
-    if (s->file == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    if (s->mode == 'w') {
-        /* Write a very simple .gz header:
-         */
-        fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
-             Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
-	s->startpos = 10L;
-	/* We use 10L instead of ftell(s->file) to because ftell causes an
-         * fflush on some systems. This version of the library doesn't use
-         * startpos anyway in write mode, so this initialization is not
-         * necessary.
-         */
-    } else {
-	check_header(s); /* skip the .gz header */
-	s->startpos = (ftell(s->file) - s->stream.avail_in);
-    }
-    
-    return (gzFile)s;
-}
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile ZEXPORT gzopen (path, mode)
-    const char *path;
-    const char *mode;
-{
-    return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
-     Associate a gzFile with the file descriptor fd. fd is not dup'ed here
-   to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
-    int fd;
-    const char *mode;
-{
-    char name[20];
-
-    if (fd < 0) return (gzFile)Z_NULL;
-    sprintf(name, "<fd:%d>", fd); /* for debugging */
-
-    return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
-    gzFile file;
-    int level;
-    int strategy;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    /* Make room to allow flushing */
-    if (s->stream.avail_out == 0) {
-
-	s->stream.next_out = s->outbuf;
-	if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-	    s->z_err = Z_ERRNO;
-	}
-	s->stream.avail_out = Z_BUFSIZE;
-    }
-
-    return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
-    gz_stream *s;
-{
-    if (s->z_eof) return EOF;
-    if (s->stream.avail_in == 0) {
-	errno = 0;
-	s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-	if (s->stream.avail_in == 0) {
-	    s->z_eof = 1;
-	    if (ferror(s->file)) s->z_err = Z_ERRNO;
-	    return EOF;
-	}
-	s->stream.next_in = s->inbuf;
-    }
-    s->stream.avail_in--;
-    return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
-      Check the gzip header of a gz_stream opened for reading. Set the stream
-    mode to transparent if the gzip magic header is not present; set s->err
-    to Z_DATA_ERROR if the magic header is present but the rest of the header
-    is incorrect.
-    IN assertion: the stream s has already been created sucessfully;
-       s->stream.avail_in is zero for the first time, but may be non-zero
-       for concatenated .gz files.
-*/
-local void check_header(s)
-    gz_stream *s;
-{
-    int method; /* method byte */
-    int flags;  /* flags byte */
-    uInt len;
-    int c;
-
-    /* Check the gzip magic header */
-    for (len = 0; len < 2; len++) {
-	c = get_byte(s);
-	if (c != gz_magic[len]) {
-	    if (len != 0) s->stream.avail_in++, s->stream.next_in--;
-	    if (c != EOF) {
-		s->stream.avail_in++, s->stream.next_in--;
-		s->transparent = 1;
-	    }
-	    s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
-	    return;
-	}
-    }
-    method = get_byte(s);
-    flags = get_byte(s);
-    if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-	s->z_err = Z_DATA_ERROR;
-	return;
-    }
-
-    /* Discard time, xflags and OS code: */
-    for (len = 0; len < 6; len++) (void)get_byte(s);
-
-    if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-	len  =  (uInt)get_byte(s);
-	len += ((uInt)get_byte(s))<<8;
-	/* len is garbage if EOF but the loop below will quit anyway */
-	while (len-- != 0 && get_byte(s) != EOF) ;
-    }
-    if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-	while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-	while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-	for (len = 0; len < 2; len++) (void)get_byte(s);
-    }
-    s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
-   Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
-    gz_stream *s;
-{
-    int err = Z_OK;
-
-    if (!s) return Z_STREAM_ERROR;
-
-    TRYFREE(s->msg);
-
-    if (s->stream.state != NULL) {
-	if (s->mode == 'w') {
-#ifdef NO_DEFLATE
-	    err = Z_STREAM_ERROR;
-#else
-	    err = deflateEnd(&(s->stream));
-#endif
-	} else if (s->mode == 'r') {
-	    err = inflateEnd(&(s->stream));
-	}
-    }
-    if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
-	if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
-	    err = Z_ERRNO;
-    }
-    if (s->z_err < 0) err = s->z_err;
-
-    TRYFREE(s->inbuf);
-    TRYFREE(s->outbuf);
-    TRYFREE(s->path);
-    TRYFREE(s);
-    return err;
-}
-
-/* ===========================================================================
-     Reads the given number of uncompressed bytes from the compressed file.
-   gzread returns the number of bytes actually read (0 for end of file).
-*/
-int ZEXPORT gzread (file, buf, len)
-    gzFile file;
-    voidp buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-    Bytef *start = (Bytef*)buf; /* starting point for crc computation */
-    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
-    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
-    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
-    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */
-
-    next_out = (Byte*)buf;
-    s->stream.next_out = (Bytef*)buf;
-    s->stream.avail_out = len;
-
-    while (s->stream.avail_out != 0) {
-
-	if (s->transparent) {
-	    /* Copy first the lookahead bytes: */
-	    uInt n = s->stream.avail_in;
-	    if (n > s->stream.avail_out) n = s->stream.avail_out;
-	    if (n > 0) {
-		zmemcpy(s->stream.next_out, s->stream.next_in, n);
-		next_out += n;
-		s->stream.next_out = next_out;
-		s->stream.next_in   += n;
-		s->stream.avail_out -= n;
-		s->stream.avail_in  -= n;
-	    }
-	    if (s->stream.avail_out > 0) {
-		s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,
-					     s->file);
-	    }
-	    len -= s->stream.avail_out;
-	    s->stream.total_in  += (uLong)len;
-	    s->stream.total_out += (uLong)len;
-            if (len == 0) s->z_eof = 1;
-	    return (int)len;
-	}
-        if (s->stream.avail_in == 0 && !s->z_eof) {
-
-            errno = 0;
-            s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-            if (s->stream.avail_in == 0) {
-                s->z_eof = 1;
-		if (ferror(s->file)) {
-		    s->z_err = Z_ERRNO;
-		    break;
-		}
-            }
-            s->stream.next_in = s->inbuf;
-        }
-        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-
-	if (s->z_err == Z_STREAM_END) {
-	    /* Check CRC and original size */
-	    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-	    start = s->stream.next_out;
-
-	    if (getLong(s) != s->crc) {
-		s->z_err = Z_DATA_ERROR;
-	    } else {
-	        (void)getLong(s);
-                /* The uncompressed length returned by above getlong() may
-                 * be different from s->stream.total_out) in case of
-		 * concatenated .gz files. Check for such files:
-		 */
-		check_header(s);
-		if (s->z_err == Z_OK) {
-		    uLong total_in = s->stream.total_in;
-		    uLong total_out = s->stream.total_out;
-
-		    inflateReset(&(s->stream));
-		    s->stream.total_in = total_in;
-		    s->stream.total_out = total_out;
-		    s->crc = crc32(0L, Z_NULL, 0);
-		}
-	    }
-	}
-	if (s->z_err != Z_OK || s->z_eof) break;
-    }
-    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
-    return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
-    gzFile file;
-{
-    unsigned char c;
-
-    return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
-      Reads bytes from the compressed file until len-1 characters are
-   read, or a newline character is read and transferred to buf, or an
-   end-of-file condition is encountered.  The string is then terminated
-   with a null character.
-      gzgets returns buf, or Z_NULL in case of error.
-
-      The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
-    gzFile file;
-    char *buf;
-    int len;
-{
-    char *b = buf;
-    if (buf == Z_NULL || len <= 0) return Z_NULL;
-
-    while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
-    *buf = '\0';
-    return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_DEFLATE
-/* ===========================================================================
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
-    gzFile file;
-    const voidp buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.next_in = (Bytef*)buf;
-    s->stream.avail_in = len;
-
-    while (s->stream.avail_in != 0) {
-
-        if (s->stream.avail_out == 0) {
-
-            s->stream.next_out = s->outbuf;
-            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-                s->z_err = Z_ERRNO;
-                break;
-            }
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
-        if (s->z_err != Z_OK) break;
-    }
-    s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
-    return (int)(len - s->stream.avail_in);
-}
-
-/* ===========================================================================
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    va_list va;
-    int len;
-
-    va_start(va, format);
-#ifdef HAS_vsnprintf
-    (void)vsnprintf(buf, sizeof(buf), format, va);
-#else
-    (void)vsprintf(buf, format, va);
-#endif
-    va_end(va);
-    len = strlen(buf); /* some *sprintf don't return the nb of bytes written */
-    if (len <= 0) return 0;
-
-    return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-	               a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-    gzFile file;
-    const char *format;
-    int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-	a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    int len;
-
-#ifdef HAS_snprintf
-    snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-	     a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#else
-    sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-	    a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#endif
-    len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */
-    if (len <= 0) return 0;
-
-    return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
-    gzFile file;
-    int c;
-{
-    unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
-    return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
-    gzFile file;
-    const char *s;
-{
-    return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
-    gzFile file;
-    int flush;
-{
-    uInt len;
-    int done = 0;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.avail_in = 0; /* should be zero already anyway */
-
-    for (;;) {
-        len = Z_BUFSIZE - s->stream.avail_out;
-
-        if (len != 0) {
-            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
-                s->z_err = Z_ERRNO;
-                return Z_ERRNO;
-            }
-            s->stream.next_out = s->outbuf;
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        if (done) break;
-        s->z_err = deflate(&(s->stream), flush);
-
-	/* Ignore the second of two consecutive flushes: */
-	if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
-        /* deflate has finished flushing only when it hasn't used up
-         * all the available space in the output buffer: 
-         */
-        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
- 
-        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
-    }
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
-     gzFile file;
-     int flush;
-{
-    gz_stream *s = (gz_stream*)file;
-    int err = do_flush (file, flush);
-
-    if (err) return err;
-    fflush(s->file);
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_DEFLATE */
-
-/* ===========================================================================
-      Sets the starting position for the next gzread or gzwrite on the given
-   compressed file. The offset represents a number of bytes in the
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error.
-      SEEK_END is not implemented, returns error.
-      In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
-    gzFile file;
-    z_off_t offset;
-    int whence;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || whence == SEEK_END ||
-	s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-	return -1L;
-    }
-    
-    if (s->mode == 'w') {
-#ifdef NO_DEFLATE
-	return -1L;
-#else
-	if (whence == SEEK_SET) {
-	    offset -= s->stream.total_in;
-	}
-	if (offset < 0) return -1L;
-
-	/* At this point, offset is the number of zero bytes to write. */
-	if (s->inbuf == Z_NULL) {
-	    s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-	    zmemzero(s->inbuf, Z_BUFSIZE);
-	}
-	while (offset > 0)  {
-	    uInt size = Z_BUFSIZE;
-	    if (offset < Z_BUFSIZE) size = (uInt)offset;
-
-	    size = gzwrite(file, s->inbuf, size);
-	    if (size == 0) return -1L;
-
-	    offset -= size;
-	}
-	return (z_off_t)s->stream.total_in;
-#endif
-    }
-    /* Rest of function is for reading only */
-
-    /* compute absolute position */
-    if (whence == SEEK_CUR) {
-	offset += s->stream.total_out;
-    }
-    if (offset < 0) return -1L;
-
-    if (s->transparent) {
-	/* map to fseek */
-	s->stream.avail_in = 0;
-	s->stream.next_in = s->inbuf;
-        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
-	s->stream.total_in = s->stream.total_out = (uLong)offset;
-	return offset;
-    }
-
-    /* For a negative seek, rewind and use positive seek */
-    if ((uLong)offset >= s->stream.total_out) {
-	offset -= s->stream.total_out;
-    } else if (gzrewind(file) < 0) {
-	return -1L;
-    }
-    /* offset is now the number of bytes to skip. */
-
-    if (offset != 0 && s->outbuf == Z_NULL) {
-	s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-    }
-    while (offset > 0)  {
-	int size = Z_BUFSIZE;
-	if (offset < Z_BUFSIZE) size = (int)offset;
-
-	size = gzread(file, s->outbuf, (uInt)size);
-	if (size <= 0) return -1L;
-	offset -= size;
-    }
-    return (z_off_t)s->stream.total_out;
-}
-
-/* ===========================================================================
-     Rewinds input file. 
-*/
-int ZEXPORT gzrewind (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-    
-    if (s == NULL || s->mode != 'r') return -1;
-
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->stream.avail_in = 0;
-    s->stream.next_in = s->inbuf;
-    s->crc = crc32(0L, Z_NULL, 0);
-	
-    if (s->startpos == 0) { /* not a compressed file */
-	rewind(s->file);
-	return 0;
-    }
-
-    (void) inflateReset(&s->stream);
-    return fseek(s->file, s->startpos, SEEK_SET);
-}
-
-/* ===========================================================================
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
-    gzFile file;
-{
-    return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-    
-    return (s == NULL || s->mode != 'r') ? 0 : s->z_eof;
-}
-
-/* ===========================================================================
-   Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
-    FILE *file;
-    uLong x;
-{
-    int n;
-    for (n = 0; n < 4; n++) {
-        fputc((int)(x & 0xff), file);
-        x >>= 8;
-    }
-}
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets z_err in case
-   of error.
-*/
-local uLong getLong (s)
-    gz_stream *s;
-{
-    uLong x = (uLong)get_byte(s);
-    int c;
-
-    x += ((uLong)get_byte(s))<<8;
-    x += ((uLong)get_byte(s))<<16;
-    c = get_byte(s);
-    if (c == EOF) s->z_err = Z_DATA_ERROR;
-    x += ((uLong)c)<<24;
-    return x;
-}
-
-/* ===========================================================================
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state.
-*/
-int ZEXPORT gzclose (file)
-    gzFile file;
-{
-    int err;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return Z_STREAM_ERROR;
-
-    if (s->mode == 'w') {
-#ifdef NO_DEFLATE
-	return Z_STREAM_ERROR;
-#else
-        err = do_flush (file, Z_FINISH);
-        if (err != Z_OK) return destroy((gz_stream*)file);
-
-        putLong (s->file, s->crc);
-        putLong (s->file, s->stream.total_in);
-#endif
-    }
-    return destroy((gz_stream*)file);
-}
-
-/* ===========================================================================
-     Returns the error message for the last error which occured on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occured in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-const char*  ZEXPORT gzerror (file, errnum)
-    gzFile file;
-    int *errnum;
-{
-    char *m;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) {
-        *errnum = Z_STREAM_ERROR;
-        return (const char*)ERR_MSG(Z_STREAM_ERROR);
-    }
-    *errnum = s->z_err;
-    if (*errnum == Z_OK) return (const char*)"";
-
-    m =  (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
-    if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
-    TRYFREE(s->msg);
-    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
-    strcpy(s->msg, s->path);
-    strcat(s->msg, ": ");
-    strcat(s->msg, m);
-    return (const char*)s->msg;
-}
diff -uNrd ircd-hybrid-6.0/zlib/infblock.c ircd-pi1.0a/zlib/infblock.c
--- ircd-hybrid-6.0/zlib/infblock.c	Sat Oct 10 01:00:37 1998
+++ ircd-pi1.0a/zlib/infblock.c	Wed Dec 31 19:00:00 1969
@@ -1,398 +0,0 @@
-/* infblock.c -- interpret and process block types to last block
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "infblock.h"
-#include "inftrees.h"
-#include "infcodes.h"
-#include "infutil.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* Table for deflate from PKZIP's appnote.txt. */
-local const uInt border[] = { /* Order of the bit length code lengths */
-        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-/*
-   Notes beyond the 1.93a appnote.txt:
-
-   1. Distance pointers never point before the beginning of the output
-      stream.
-   2. Distance pointers can point back across blocks, up to 32k away.
-   3. There is an implied maximum of 7 bits for the bit length table and
-      15 bits for the actual data.
-   4. If only one code exists, then it is encoded using one bit.  (Zero
-      would be more efficient, but perhaps a little confusing.)  If two
-      codes exist, they are coded using one bit each (0 and 1).
-   5. There is no way of sending zero distance codes--a dummy must be
-      sent if there are none.  (History: a pre 2.0 version of PKZIP would
-      store blocks with no distance codes, but this was discovered to be
-      too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow
-      zero distance codes, which is sent as one code of zero bits in
-      length.
-   6. There are up to 286 literal/length codes.  Code 256 represents the
-      end-of-block.  Note however that the static length tree defines
-      288 codes just to fill out the Huffman codes.  Codes 286 and 287
-      cannot be used though, since there is no length base or extra bits
-      defined for them.  Similarily, there are up to 30 distance codes.
-      However, static trees define 32 codes (all 5 bits) to fill out the
-      Huffman codes, but the last two had better not show up in the data.
-   7. Unzip can check dynamic Huffman blocks for complete code sets.
-      The exception is that a single code would not be complete (see #4).
-   8. The five bits following the block type is really the number of
-      literal codes sent minus 257.
-   9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
-      (1+6+6).  Therefore, to output three times the length, you output
-      three codes (1+1+1), whereas to output four times the same length,
-      you only need two codes (1+3).  Hmm.
-  10. In the tree reconstruction algorithm, Code = Code + Increment
-      only if BitLength(i) is not zero.  (Pretty obvious.)
-  11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)
-  12. Note: length code 284 can represent 227-258, but length code 285
-      really is 258.  The last length deserves its own, short code
-      since it gets used a lot in very redundant files.  The length
-      258 is special since 258 - 3 (the min match length) is 255.
-  13. The literal/length and distance code bit lengths are read as a
-      single stream of lengths.  It is possible (and advantageous) for
-      a repeat code (16, 17, or 18) to go across the boundary between
-      the two sets of lengths.
- */
-
-
-void inflate_blocks_reset(s, z, c)
-inflate_blocks_statef *s;
-z_streamp z;
-uLongf *c;
-{
-  if (c != Z_NULL)
-    *c = s->check;
-  if (s->mode == BTREE || s->mode == DTREE)
-    ZFREE(z, s->sub.trees.blens);
-  if (s->mode == CODES)
-    inflate_codes_free(s->sub.decode.codes, z);
-  s->mode = TYPE;
-  s->bitk = 0;
-  s->bitb = 0;
-  s->read = s->write = s->window;
-  if (s->checkfn != Z_NULL)
-    z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0);
-  Tracev((stderr, "inflate:   blocks reset\n"));
-}
-
-
-inflate_blocks_statef *inflate_blocks_new(z, c, w)
-z_streamp z;
-check_func c;
-uInt w;
-{
-  inflate_blocks_statef *s;
-
-  if ((s = (inflate_blocks_statef *)ZALLOC
-       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
-    return s;
-  if ((s->hufts =
-       (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)
-  {
-    ZFREE(z, s);
-    return Z_NULL;
-  }
-  if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
-  {
-    ZFREE(z, s->hufts);
-    ZFREE(z, s);
-    return Z_NULL;
-  }
-  s->end = s->window + w;
-  s->checkfn = c;
-  s->mode = TYPE;
-  Tracev((stderr, "inflate:   blocks allocated\n"));
-  inflate_blocks_reset(s, z, Z_NULL);
-  return s;
-}
-
-
-int inflate_blocks(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
-  uInt t;               /* temporary storage */
-  uLong b;              /* bit buffer */
-  uInt k;               /* bits in bit buffer */
-  Bytef *p;             /* input data pointer */
-  uInt n;               /* bytes available there */
-  Bytef *q;             /* output window write pointer */
-  uInt m;               /* bytes to end of window or read pointer */
-
-  /* copy input/output information to locals (UPDATE macro restores) */
-  LOAD
-
-  /* process input based on current state */
-  while (1) switch (s->mode)
-  {
-    case TYPE:
-      NEEDBITS(3)
-      t = (uInt)b & 7;
-      s->last = t & 1;
-      switch (t >> 1)
-      {
-        case 0:                         /* stored */
-          Tracev((stderr, "inflate:     stored block%s\n",
-                 s->last ? " (last)" : ""));
-          DUMPBITS(3)
-          t = k & 7;                    /* go to byte boundary */
-          DUMPBITS(t)
-          s->mode = LENS;               /* get length of stored block */
-          break;
-        case 1:                         /* fixed */
-          Tracev((stderr, "inflate:     fixed codes block%s\n",
-                 s->last ? " (last)" : ""));
-          {
-            uInt bl, bd;
-            inflate_huft *tl, *td;
-
-            inflate_trees_fixed(&bl, &bd, &tl, &td, z);
-            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
-            if (s->sub.decode.codes == Z_NULL)
-            {
-              r = Z_MEM_ERROR;
-              LEAVE
-            }
-          }
-          DUMPBITS(3)
-          s->mode = CODES;
-          break;
-        case 2:                         /* dynamic */
-          Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                 s->last ? " (last)" : ""));
-          DUMPBITS(3)
-          s->mode = TABLE;
-          break;
-        case 3:                         /* illegal */
-          DUMPBITS(3)
-          s->mode = BAD;
-          z->msg = (char*)"invalid block type";
-          r = Z_DATA_ERROR;
-          LEAVE
-      }
-      break;
-    case LENS:
-      NEEDBITS(32)
-      if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
-      {
-        s->mode = BAD;
-        z->msg = (char*)"invalid stored block lengths";
-        r = Z_DATA_ERROR;
-        LEAVE
-      }
-      s->sub.left = (uInt)b & 0xffff;
-      b = k = 0;                      /* dump bits */
-      Tracev((stderr, "inflate:       stored length %u\n", s->sub.left));
-      s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);
-      break;
-    case STORED:
-      if (n == 0)
-        LEAVE
-      NEEDOUT
-      t = s->sub.left;
-      if (t > n) t = n;
-      if (t > m) t = m;
-      zmemcpy(q, p, t);
-      p += t;  n -= t;
-      q += t;  m -= t;
-      if ((s->sub.left -= t) != 0)
-        break;
-      Tracev((stderr, "inflate:       stored end, %lu total out\n",
-              z->total_out + (q >= s->read ? q - s->read :
-              (s->end - s->read) + (q - s->window))));
-      s->mode = s->last ? DRY : TYPE;
-      break;
-    case TABLE:
-      NEEDBITS(14)
-      s->sub.trees.table = t = (uInt)b & 0x3fff;
-#ifndef PKZIP_BUG_WORKAROUND
-      if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
-      {
-        s->mode = BAD;
-        z->msg = (char*)"too many length or distance symbols";
-        r = Z_DATA_ERROR;
-        LEAVE
-      }
-#endif
-      t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
-      if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
-      {
-        r = Z_MEM_ERROR;
-        LEAVE
-      }
-      DUMPBITS(14)
-      s->sub.trees.index = 0;
-      Tracev((stderr, "inflate:       table sizes ok\n"));
-      s->mode = BTREE;
-    case BTREE:
-      while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
-      {
-        NEEDBITS(3)
-        s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
-        DUMPBITS(3)
-      }
-      while (s->sub.trees.index < 19)
-        s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
-      s->sub.trees.bb = 7;
-      t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
-                             &s->sub.trees.tb, s->hufts, z);
-      if (t != Z_OK)
-      {
-        ZFREE(z, s->sub.trees.blens);
-        r = t;
-        if (r == Z_DATA_ERROR)
-          s->mode = BAD;
-        LEAVE
-      }
-      s->sub.trees.index = 0;
-      Tracev((stderr, "inflate:       bits tree ok\n"));
-      s->mode = DTREE;
-    case DTREE:
-      while (t = s->sub.trees.table,
-             s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
-      {
-        inflate_huft *h;
-        uInt i, j, c;
-
-        t = s->sub.trees.bb;
-        NEEDBITS(t)
-        h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
-        t = h->bits;
-        c = h->base;
-        if (c < 16)
-        {
-          DUMPBITS(t)
-          s->sub.trees.blens[s->sub.trees.index++] = c;
-        }
-        else /* c == 16..18 */
-        {
-          i = c == 18 ? 7 : c - 14;
-          j = c == 18 ? 11 : 3;
-          NEEDBITS(t + i)
-          DUMPBITS(t)
-          j += (uInt)b & inflate_mask[i];
-          DUMPBITS(i)
-          i = s->sub.trees.index;
-          t = s->sub.trees.table;
-          if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
-              (c == 16 && i < 1))
-          {
-            ZFREE(z, s->sub.trees.blens);
-            s->mode = BAD;
-            z->msg = (char*)"invalid bit length repeat";
-            r = Z_DATA_ERROR;
-            LEAVE
-          }
-          c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
-          do {
-            s->sub.trees.blens[i++] = c;
-          } while (--j);
-          s->sub.trees.index = i;
-        }
-      }
-      s->sub.trees.tb = Z_NULL;
-      {
-        uInt bl, bd;
-        inflate_huft *tl, *td;
-        inflate_codes_statef *c;
-
-        bl = 9;         /* must be <= 9 for lookahead assumptions */
-        bd = 6;         /* must be <= 9 for lookahead assumptions */
-        t = s->sub.trees.table;
-        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
-                                  s->sub.trees.blens, &bl, &bd, &tl, &td,
-                                  s->hufts, z);
-        ZFREE(z, s->sub.trees.blens);
-        if (t != Z_OK)
-        {
-          if (t == (uInt)Z_DATA_ERROR)
-            s->mode = BAD;
-          r = t;
-          LEAVE
-        }
-        Tracev((stderr, "inflate:       trees ok\n"));
-        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
-        {
-          r = Z_MEM_ERROR;
-          LEAVE
-        }
-        s->sub.decode.codes = c;
-      }
-      s->mode = CODES;
-    case CODES:
-      UPDATE
-      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
-        return inflate_flush(s, z, r);
-      r = Z_OK;
-      inflate_codes_free(s->sub.decode.codes, z);
-      LOAD
-      Tracev((stderr, "inflate:       codes end, %lu total out\n",
-              z->total_out + (q >= s->read ? q - s->read :
-              (s->end - s->read) + (q - s->window))));
-      if (!s->last)
-      {
-        s->mode = TYPE;
-        break;
-      }
-      s->mode = DRY;
-    case DRY:
-      FLUSH
-      if (s->read != s->write)
-        LEAVE
-      s->mode = DONE;
-    case DONE:
-      r = Z_STREAM_END;
-      LEAVE
-    case BAD:
-      r = Z_DATA_ERROR;
-      LEAVE
-    default:
-      r = Z_STREAM_ERROR;
-      LEAVE
-  }
-}
-
-
-int inflate_blocks_free(s, z)
-inflate_blocks_statef *s;
-z_streamp z;
-{
-  inflate_blocks_reset(s, z, Z_NULL);
-  ZFREE(z, s->window);
-  ZFREE(z, s->hufts);
-  ZFREE(z, s);
-  Tracev((stderr, "inflate:   blocks freed\n"));
-  return Z_OK;
-}
-
-
-void inflate_set_dictionary(s, d, n)
-inflate_blocks_statef *s;
-const Bytef *d;
-uInt  n;
-{
-  zmemcpy(s->window, d, n);
-  s->read = s->write = s->window + n;
-}
-
-
-/* Returns true if inflate is currently at the end of a block generated
- * by Z_SYNC_FLUSH or Z_FULL_FLUSH. 
- * IN assertion: s != Z_NULL
- */
-int inflate_blocks_sync_point(s)
-inflate_blocks_statef *s;
-{
-  return s->mode == LENS;
-}
diff -uNrd ircd-hybrid-6.0/zlib/infblock.h ircd-pi1.0a/zlib/infblock.h
--- ircd-hybrid-6.0/zlib/infblock.h	Tue Oct  6 00:51:21 1998
+++ ircd-pi1.0a/zlib/infblock.h	Wed Dec 31 19:00:00 1969
@@ -1,39 +0,0 @@
-/* infblock.h -- header to use infblock.c
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_blocks_state;
-typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-
-extern inflate_blocks_statef * inflate_blocks_new OF((
-    z_streamp z,
-    check_func c,               /* check function */
-    uInt w));                   /* window size */
-
-extern int inflate_blocks OF((
-    inflate_blocks_statef *,
-    z_streamp ,
-    int));                      /* initial return code */
-
-extern void inflate_blocks_reset OF((
-    inflate_blocks_statef *,
-    z_streamp ,
-    uLongf *));                  /* check value on output */
-
-extern int inflate_blocks_free OF((
-    inflate_blocks_statef *,
-    z_streamp));
-
-extern void inflate_set_dictionary OF((
-    inflate_blocks_statef *s,
-    const Bytef *d,  /* dictionary */
-    uInt  n));       /* dictionary length */
-
-extern int inflate_blocks_sync_point OF((
-    inflate_blocks_statef *s));
diff -uNrd ircd-hybrid-6.0/zlib/infcodes.c ircd-pi1.0a/zlib/infcodes.c
--- ircd-hybrid-6.0/zlib/infcodes.c	Sat Oct 10 01:00:38 1998
+++ ircd-pi1.0a/zlib/infcodes.c	Wed Dec 31 19:00:00 1969
@@ -1,257 +0,0 @@
-/* infcodes.c -- process literals and length/distance pairs
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "infblock.h"
-#include "infcodes.h"
-#include "infutil.h"
-#include "inffast.h"
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-typedef enum {        /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
-      START,    /* x: set up for LEN */
-      LEN,      /* i: get length/literal/eob next */
-      LENEXT,   /* i: getting length extra (have base) */
-      DIST,     /* i: get distance next */
-      DISTEXT,  /* i: getting distance extra */
-      COPY,     /* o: copying bytes in window, waiting for space */
-      LIT,      /* o: got literal, waiting for output space */
-      WASH,     /* o: got eob, possibly still output waiting */
-      END,      /* x: got eob and all data flushed */
-      BADCODE}  /* x: got error */
-inflate_codes_mode;
-
-/* inflate codes private state */
-struct inflate_codes_state {
-
-  /* mode */
-  inflate_codes_mode mode;      /* current inflate_codes mode */
-
-  /* mode dependent information */
-  uInt len;
-  union {
-    struct {
-      inflate_huft *tree;       /* pointer into tree */
-      uInt need;                /* bits needed */
-    } code;             /* if LEN or DIST, where in tree */
-    uInt lit;           /* if LIT, literal */
-    struct {
-      uInt get;                 /* bits to get for extra */
-      uInt dist;                /* distance back to copy from */
-    } copy;             /* if EXT or COPY, where and how much */
-  } sub;                /* submode */
-
-  /* mode independent information */
-  Byte lbits;           /* ltree bits decoded per branch */
-  Byte dbits;           /* dtree bits decoder per branch */
-  inflate_huft *ltree;          /* literal/length/eob tree */
-  inflate_huft *dtree;          /* distance tree */
-
-};
-
-
-inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-z_streamp z;
-{
-  inflate_codes_statef *c;
-
-  if ((c = (inflate_codes_statef *)
-       ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)
-  {
-    c->mode = START;
-    c->lbits = (Byte)bl;
-    c->dbits = (Byte)bd;
-    c->ltree = tl;
-    c->dtree = td;
-    Tracev((stderr, "inflate:       codes new\n"));
-  }
-  return c;
-}
-
-
-int inflate_codes(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
-  uInt j;               /* temporary storage */
-  inflate_huft *t;      /* temporary pointer */
-  uInt e;               /* extra bits or operation */
-  uLong b;              /* bit buffer */
-  uInt k;               /* bits in bit buffer */
-  Bytef *p;             /* input data pointer */
-  uInt n;               /* bytes available there */
-  Bytef *q;             /* output window write pointer */
-  uInt m;               /* bytes to end of window or read pointer */
-  Bytef *f;             /* pointer to copy strings from */
-  inflate_codes_statef *c = s->sub.decode.codes;  /* codes state */
-
-  /* copy input/output information to locals (UPDATE macro restores) */
-  LOAD
-
-  /* process input and output based on current state */
-  while (1) switch (c->mode)
-  {             /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
-    case START:         /* x: set up for LEN */
-#ifndef SLOW
-      if (m >= 258 && n >= 10)
-      {
-        UPDATE
-        r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);
-        LOAD
-        if (r != Z_OK)
-        {
-          c->mode = r == Z_STREAM_END ? WASH : BADCODE;
-          break;
-        }
-      }
-#endif /* !SLOW */
-      c->sub.code.need = c->lbits;
-      c->sub.code.tree = c->ltree;
-      c->mode = LEN;
-    case LEN:           /* i: get length/literal/eob next */
-      j = c->sub.code.need;
-      NEEDBITS(j)
-      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
-      DUMPBITS(t->bits)
-      e = (uInt)(t->exop);
-      if (e == 0)               /* literal */
-      {
-        c->sub.lit = t->base;
-        Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
-                 "inflate:         literal '%c'\n" :
-                 "inflate:         literal 0x%02x\n", t->base));
-        c->mode = LIT;
-        break;
-      }
-      if (e & 16)               /* length */
-      {
-        c->sub.copy.get = e & 15;
-        c->len = t->base;
-        c->mode = LENEXT;
-        break;
-      }
-      if ((e & 64) == 0)        /* next table */
-      {
-        c->sub.code.need = e;
-        c->sub.code.tree = t + t->base;
-        break;
-      }
-      if (e & 32)               /* end of block */
-      {
-        Tracevv((stderr, "inflate:         end of block\n"));
-        c->mode = WASH;
-        break;
-      }
-      c->mode = BADCODE;        /* invalid code */
-      z->msg = (char*)"invalid literal/length code";
-      r = Z_DATA_ERROR;
-      LEAVE
-    case LENEXT:        /* i: getting length extra (have base) */
-      j = c->sub.copy.get;
-      NEEDBITS(j)
-      c->len += (uInt)b & inflate_mask[j];
-      DUMPBITS(j)
-      c->sub.code.need = c->dbits;
-      c->sub.code.tree = c->dtree;
-      Tracevv((stderr, "inflate:         length %u\n", c->len));
-      c->mode = DIST;
-    case DIST:          /* i: get distance next */
-      j = c->sub.code.need;
-      NEEDBITS(j)
-      t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
-      DUMPBITS(t->bits)
-      e = (uInt)(t->exop);
-      if (e & 16)               /* distance */
-      {
-        c->sub.copy.get = e & 15;
-        c->sub.copy.dist = t->base;
-        c->mode = DISTEXT;
-        break;
-      }
-      if ((e & 64) == 0)        /* next table */
-      {
-        c->sub.code.need = e;
-        c->sub.code.tree = t + t->base;
-        break;
-      }
-      c->mode = BADCODE;        /* invalid code */
-      z->msg = (char*)"invalid distance code";
-      r = Z_DATA_ERROR;
-      LEAVE
-    case DISTEXT:       /* i: getting distance extra */
-      j = c->sub.copy.get;
-      NEEDBITS(j)
-      c->sub.copy.dist += (uInt)b & inflate_mask[j];
-      DUMPBITS(j)
-      Tracevv((stderr, "inflate:         distance %u\n", c->sub.copy.dist));
-      c->mode = COPY;
-    case COPY:          /* o: copying bytes in window, waiting for space */
-#ifndef __TURBOC__ /* Turbo C bug for following expression */
-      f = (uInt)(q - s->window) < c->sub.copy.dist ?
-          s->end - (c->sub.copy.dist - (q - s->window)) :
-          q - c->sub.copy.dist;
-#else
-      f = q - c->sub.copy.dist;
-      if ((uInt)(q - s->window) < c->sub.copy.dist)
-        f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
-#endif
-      while (c->len)
-      {
-        NEEDOUT
-        OUTBYTE(*f++)
-        if (f == s->end)
-          f = s->window;
-        c->len--;
-      }
-      c->mode = START;
-      break;
-    case LIT:           /* o: got literal, waiting for output space */
-      NEEDOUT
-      OUTBYTE(c->sub.lit)
-      c->mode = START;
-      break;
-    case WASH:          /* o: got eob, possibly more output */
-      if (k > 7)        /* return unused byte, if any */
-      {
-        Assert(k < 16, "inflate_codes grabbed too many bytes")
-        k -= 8;
-        n++;
-        p--;            /* can always return one */
-      }
-      FLUSH
-      if (s->read != s->write)
-        LEAVE
-      c->mode = END;
-    case END:
-      r = Z_STREAM_END;
-      LEAVE
-    case BADCODE:       /* x: got error */
-      r = Z_DATA_ERROR;
-      LEAVE
-    default:
-      r = Z_STREAM_ERROR;
-      LEAVE
-  }
-#ifdef NEED_DUMMY_RETURN
-  return Z_STREAM_ERROR;  /* Some dumb compilers complain without this */
-#endif
-}
-
-
-void inflate_codes_free(c, z)
-inflate_codes_statef *c;
-z_streamp z;
-{
-  ZFREE(z, c);
-  Tracev((stderr, "inflate:       codes free\n"));
-}
diff -uNrd ircd-hybrid-6.0/zlib/infcodes.h ircd-pi1.0a/zlib/infcodes.h
--- ircd-hybrid-6.0/zlib/infcodes.h	Tue Oct  6 00:51:22 1998
+++ ircd-pi1.0a/zlib/infcodes.h	Wed Dec 31 19:00:00 1969
@@ -1,27 +0,0 @@
-/* infcodes.h -- header to use infcodes.c
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_codes_state;
-typedef struct inflate_codes_state FAR inflate_codes_statef;
-
-extern inflate_codes_statef *inflate_codes_new OF((
-    uInt, uInt,
-    inflate_huft *, inflate_huft *,
-    z_streamp ));
-
-extern int inflate_codes OF((
-    inflate_blocks_statef *,
-    z_streamp ,
-    int));
-
-extern void inflate_codes_free OF((
-    inflate_codes_statef *,
-    z_streamp ));
-
diff -uNrd ircd-hybrid-6.0/zlib/inffast.c ircd-pi1.0a/zlib/inffast.c
--- ircd-hybrid-6.0/zlib/inffast.c	Tue Oct  6 00:51:23 1998
+++ ircd-pi1.0a/zlib/inffast.c	Wed Dec 31 19:00:00 1969
@@ -1,170 +0,0 @@
-/* inffast.c -- process literals and length/distance pairs fast
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "infblock.h"
-#include "infcodes.h"
-#include "infutil.h"
-#include "inffast.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* macros for bit input with no checking and for returning unused bytes */
-#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define UNGRAB {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}
-
-/* Called with number of bytes left to write in window at least 258
-   (the maximum string length) and number of input bytes available
-   at least ten.  The ten bytes are six bytes for the longest length/
-   distance pair plus four bytes for overloading the bit buffer. */
-
-int inflate_fast(bl, bd, tl, td, s, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-inflate_blocks_statef *s;
-z_streamp z;
-{
-  inflate_huft *t;      /* temporary pointer */
-  uInt e;               /* extra bits or operation */
-  uLong b;              /* bit buffer */
-  uInt k;               /* bits in bit buffer */
-  Bytef *p;             /* input data pointer */
-  uInt n;               /* bytes available there */
-  Bytef *q;             /* output window write pointer */
-  uInt m;               /* bytes to end of window or read pointer */
-  uInt ml;              /* mask for literal/length tree */
-  uInt md;              /* mask for distance tree */
-  uInt c;               /* bytes to copy */
-  uInt d;               /* distance back to copy from */
-  Bytef *r;             /* copy source pointer */
-
-  /* load input, output, bit values */
-  LOAD
-
-  /* initialize masks */
-  ml = inflate_mask[bl];
-  md = inflate_mask[bd];
-
-  /* do until not enough input or output space for fast loop */
-  do {                          /* assume called with m >= 258 && n >= 10 */
-    /* get literal/length code */
-    GRABBITS(20)                /* max bits for literal/length code */
-    if ((e = (t = tl + ((uInt)b & ml))->exop) == 0)
-    {
-      DUMPBITS(t->bits)
-      Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
-                "inflate:         * literal '%c'\n" :
-                "inflate:         * literal 0x%02x\n", t->base));
-      *q++ = (Byte)t->base;
-      m--;
-      continue;
-    }
-    do {
-      DUMPBITS(t->bits)
-      if (e & 16)
-      {
-        /* get extra bits for length */
-        e &= 15;
-        c = t->base + ((uInt)b & inflate_mask[e]);
-        DUMPBITS(e)
-        Tracevv((stderr, "inflate:         * length %u\n", c));
-
-        /* decode distance base of block to copy */
-        GRABBITS(15);           /* max bits for distance code */
-        e = (t = td + ((uInt)b & md))->exop;
-        do {
-          DUMPBITS(t->bits)
-          if (e & 16)
-          {
-            /* get extra bits to add to distance base */
-            e &= 15;
-            GRABBITS(e)         /* get extra bits (up to 13) */
-            d = t->base + ((uInt)b & inflate_mask[e]);
-            DUMPBITS(e)
-            Tracevv((stderr, "inflate:         * distance %u\n", d));
-
-            /* do the copy */
-            m -= c;
-            if ((uInt)(q - s->window) >= d)     /* offset before dest */
-            {                                   /*  just copy */
-              r = q - d;
-              *q++ = *r++;  c--;        /* minimum count is three, */
-              *q++ = *r++;  c--;        /*  so unroll loop a little */
-            }
-            else                        /* else offset after destination */
-            {
-              e = d - (uInt)(q - s->window); /* bytes from offset to end */
-              r = s->end - e;           /* pointer to offset */
-              if (c > e)                /* if source crosses, */
-              {
-                c -= e;                 /* copy to end of window */
-                do {
-                  *q++ = *r++;
-                } while (--e);
-                r = s->window;          /* copy rest from start of window */
-              }
-            }
-            do {                        /* copy all or what's left */
-              *q++ = *r++;
-            } while (--c);
-            break;
-          }
-          else if ((e & 64) == 0)
-          {
-            t += t->base;
-            e = (t += ((uInt)b & inflate_mask[e]))->exop;
-          }
-          else
-          {
-            z->msg = (char*)"invalid distance code";
-            UNGRAB
-            UPDATE
-            return Z_DATA_ERROR;
-          }
-        } while (1);
-        break;
-      }
-      if ((e & 64) == 0)
-      {
-        t += t->base;
-        if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0)
-        {
-          DUMPBITS(t->bits)
-          Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
-                    "inflate:         * literal '%c'\n" :
-                    "inflate:         * literal 0x%02x\n", t->base));
-          *q++ = (Byte)t->base;
-          m--;
-          break;
-        }
-      }
-      else if (e & 32)
-      {
-        Tracevv((stderr, "inflate:         * end of block\n"));
-        UNGRAB
-        UPDATE
-        return Z_STREAM_END;
-      }
-      else
-      {
-        z->msg = (char*)"invalid literal/length code";
-        UNGRAB
-        UPDATE
-        return Z_DATA_ERROR;
-      }
-    } while (1);
-  } while (m >= 258 && n >= 10);
-
-  /* not enough input or output--restore pointers and return */
-  UNGRAB
-  UPDATE
-  return Z_OK;
-}
diff -uNrd ircd-hybrid-6.0/zlib/inffast.h ircd-pi1.0a/zlib/inffast.h
--- ircd-hybrid-6.0/zlib/inffast.h	Tue Oct  6 00:51:23 1998
+++ ircd-pi1.0a/zlib/inffast.h	Wed Dec 31 19:00:00 1969
@@ -1,17 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-extern int inflate_fast OF((
-    uInt,
-    uInt,
-    inflate_huft *,
-    inflate_huft *,
-    inflate_blocks_statef *,
-    z_streamp ));
diff -uNrd ircd-hybrid-6.0/zlib/inffixed.h ircd-pi1.0a/zlib/inffixed.h
--- ircd-hybrid-6.0/zlib/inffixed.h	Sat Oct 10 01:00:38 1998
+++ ircd-pi1.0a/zlib/inffixed.h	Wed Dec 31 19:00:00 1969
@@ -1,151 +0,0 @@
-/* inffixed.h -- table for decoding fixed codes
- * Generated automatically by the maketree.c program
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-local uInt fixed_bl = 9;
-local uInt fixed_bd = 5;
-local inflate_huft fixed_tl[] = {
-    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},
-    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192},
-    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160},
-    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224},
-    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144},
-    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208},
-    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176},
-    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240},
-    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},
-    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200},
-    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168},
-    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232},
-    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152},
-    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216},
-    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184},
-    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248},
-    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},
-    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196},
-    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164},
-    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228},
-    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148},
-    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212},
-    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180},
-    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244},
-    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},
-    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204},
-    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172},
-    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236},
-    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156},
-    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220},
-    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188},
-    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252},
-    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},
-    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194},
-    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162},
-    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226},
-    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146},
-    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210},
-    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178},
-    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242},
-    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},
-    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202},
-    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170},
-    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234},
-    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154},
-    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218},
-    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186},
-    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250},
-    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},
-    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198},
-    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166},
-    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230},
-    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150},
-    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214},
-    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182},
-    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246},
-    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},
-    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206},
-    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174},
-    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238},
-    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158},
-    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222},
-    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190},
-    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254},
-    {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},
-    {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193},
-    {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161},
-    {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225},
-    {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145},
-    {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209},
-    {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177},
-    {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241},
-    {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},
-    {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201},
-    {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169},
-    {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233},
-    {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153},
-    {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217},
-    {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185},
-    {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249},
-    {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},
-    {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197},
-    {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165},
-    {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229},
-    {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149},
-    {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213},
-    {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181},
-    {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245},
-    {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},
-    {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205},
-    {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173},
-    {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237},
-    {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157},
-    {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221},
-    {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189},
-    {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253},
-    {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},
-    {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195},
-    {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163},
-    {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227},
-    {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147},
-    {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211},
-    {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179},
-    {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243},
-    {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},
-    {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203},
-    {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171},
-    {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235},
-    {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155},
-    {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219},
-    {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187},
-    {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251},
-    {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},
-    {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199},
-    {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167},
-    {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231},
-    {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151},
-    {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215},
-    {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183},
-    {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247},
-    {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},
-    {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207},
-    {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175},
-    {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239},
-    {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159},
-    {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223},
-    {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191},
-    {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255}
-  };
-local inflate_huft fixed_td[] = {
-    {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},
-    {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},
-    {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},
-    {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577},
-    {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145},
-    {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577},
-    {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289},
-    {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}
-  };
diff -uNrd ircd-hybrid-6.0/zlib/inflate.c ircd-pi1.0a/zlib/inflate.c
--- ircd-hybrid-6.0/zlib/inflate.c	Tue Oct  6 00:51:24 1998
+++ ircd-pi1.0a/zlib/inflate.c	Wed Dec 31 19:00:00 1969
@@ -1,366 +0,0 @@
-/* inflate.c -- zlib interface to inflate modules
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "infblock.h"
-
-struct inflate_blocks_state {int dummy;}; /* for buggy compilers */
-
-typedef enum {
-      METHOD,   /* waiting for method byte */
-      FLAG,     /* waiting for flag byte */
-      DICT4,    /* four dictionary check bytes to go */
-      DICT3,    /* three dictionary check bytes to go */
-      DICT2,    /* two dictionary check bytes to go */
-      DICT1,    /* one dictionary check byte to go */
-      DICT0,    /* waiting for inflateSetDictionary */
-      BLOCKS,   /* decompressing blocks */
-      CHECK4,   /* four check bytes to go */
-      CHECK3,   /* three check bytes to go */
-      CHECK2,   /* two check bytes to go */
-      CHECK1,   /* one check byte to go */
-      DONE,     /* finished check, done */
-      BAD}      /* got an error--stay here */
-inflate_mode;
-
-/* inflate private state */
-struct internal_state {
-
-  /* mode */
-  inflate_mode  mode;   /* current inflate mode */
-
-  /* mode dependent information */
-  union {
-    uInt method;        /* if FLAGS, method byte */
-    struct {
-      uLong was;                /* computed check value */
-      uLong need;               /* stream check value */
-    } check;            /* if CHECK, check values to compare */
-    uInt marker;        /* if BAD, inflateSync's marker bytes count */
-  } sub;        /* submode */
-
-  /* mode independent information */
-  int  nowrap;          /* flag for no wrapper */
-  uInt wbits;           /* log2(window size)  (8..15, defaults to 15) */
-  inflate_blocks_statef 
-    *blocks;            /* current inflate_blocks state */
-
-};
-
-
-int ZEXPORT inflateReset(z)
-z_streamp z;
-{
-  if (z == Z_NULL || z->state == Z_NULL)
-    return Z_STREAM_ERROR;
-  z->total_in = z->total_out = 0;
-  z->msg = Z_NULL;
-  z->state->mode = z->state->nowrap ? BLOCKS : METHOD;
-  inflate_blocks_reset(z->state->blocks, z, Z_NULL);
-  Tracev((stderr, "inflate: reset\n"));
-  return Z_OK;
-}
-
-
-int ZEXPORT inflateEnd(z)
-z_streamp z;
-{
-  if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
-    return Z_STREAM_ERROR;
-  if (z->state->blocks != Z_NULL)
-    inflate_blocks_free(z->state->blocks, z);
-  ZFREE(z, z->state);
-  z->state = Z_NULL;
-  Tracev((stderr, "inflate: end\n"));
-  return Z_OK;
-}
-
-
-int ZEXPORT inflateInit2_(z, w, version, stream_size)
-z_streamp z;
-int w;
-const char *version;
-int stream_size;
-{
-  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-      stream_size != sizeof(z_stream))
-      return Z_VERSION_ERROR;
-
-  /* initialize state */
-  if (z == Z_NULL)
-    return Z_STREAM_ERROR;
-  z->msg = Z_NULL;
-  if (z->zalloc == Z_NULL)
-  {
-    z->zalloc = zcalloc;
-    z->opaque = (voidpf)0;
-  }
-  if (z->zfree == Z_NULL) z->zfree = zcfree;
-  if ((z->state = (struct internal_state FAR *)
-       ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)
-    return Z_MEM_ERROR;
-  z->state->blocks = Z_NULL;
-
-  /* handle undocumented nowrap option (no zlib header or check) */
-  z->state->nowrap = 0;
-  if (w < 0)
-  {
-    w = - w;
-    z->state->nowrap = 1;
-  }
-
-  /* set window size */
-  if (w < 8 || w > 15)
-  {
-    inflateEnd(z);
-    return Z_STREAM_ERROR;
-  }
-  z->state->wbits = (uInt)w;
-
-  /* create inflate_blocks state */
-  if ((z->state->blocks =
-      inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))
-      == Z_NULL)
-  {
-    inflateEnd(z);
-    return Z_MEM_ERROR;
-  }
-  Tracev((stderr, "inflate: allocated\n"));
-
-  /* reset state */
-  inflateReset(z);
-  return Z_OK;
-}
-
-
-int ZEXPORT inflateInit_(z, version, stream_size)
-z_streamp z;
-const char *version;
-int stream_size;
-{
-  return inflateInit2_(z, DEF_WBITS, version, stream_size);
-}
-
-
-#define NEEDBYTE {if(z->avail_in==0)return r;r=f;}
-#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
-
-int ZEXPORT inflate(z, f)
-z_streamp z;
-int f;
-{
-  int r;
-  uInt b;
-
-  if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)
-    return Z_STREAM_ERROR;
-  f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
-  r = Z_BUF_ERROR;
-  while (1) switch (z->state->mode)
-  {
-    case METHOD:
-      NEEDBYTE
-      if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED)
-      {
-        z->state->mode = BAD;
-        z->msg = (char*)"unknown compression method";
-        z->state->sub.marker = 5;       /* can't try inflateSync */
-        break;
-      }
-      if ((z->state->sub.method >> 4) + 8 > z->state->wbits)
-      {
-        z->state->mode = BAD;
-        z->msg = (char*)"invalid window size";
-        z->state->sub.marker = 5;       /* can't try inflateSync */
-        break;
-      }
-      z->state->mode = FLAG;
-    case FLAG:
-      NEEDBYTE
-      b = NEXTBYTE;
-      if (((z->state->sub.method << 8) + b) % 31)
-      {
-        z->state->mode = BAD;
-        z->msg = (char*)"incorrect header check";
-        z->state->sub.marker = 5;       /* can't try inflateSync */
-        break;
-      }
-      Tracev((stderr, "inflate: zlib header ok\n"));
-      if (!(b & PRESET_DICT))
-      {
-        z->state->mode = BLOCKS;
-        break;
-      }
-      z->state->mode = DICT4;
-    case DICT4:
-      NEEDBYTE
-      z->state->sub.check.need = (uLong)NEXTBYTE << 24;
-      z->state->mode = DICT3;
-    case DICT3:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE << 16;
-      z->state->mode = DICT2;
-    case DICT2:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE << 8;
-      z->state->mode = DICT1;
-    case DICT1:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE;
-      z->adler = z->state->sub.check.need;
-      z->state->mode = DICT0;
-      return Z_NEED_DICT;
-    case DICT0:
-      z->state->mode = BAD;
-      z->msg = (char*)"need dictionary";
-      z->state->sub.marker = 0;       /* can try inflateSync */
-      return Z_STREAM_ERROR;
-    case BLOCKS:
-      r = inflate_blocks(z->state->blocks, z, r);
-      if (r == Z_DATA_ERROR)
-      {
-        z->state->mode = BAD;
-        z->state->sub.marker = 0;       /* can try inflateSync */
-        break;
-      }
-      if (r == Z_OK)
-        r = f;
-      if (r != Z_STREAM_END)
-        return r;
-      r = f;
-      inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
-      if (z->state->nowrap)
-      {
-        z->state->mode = DONE;
-        break;
-      }
-      z->state->mode = CHECK4;
-    case CHECK4:
-      NEEDBYTE
-      z->state->sub.check.need = (uLong)NEXTBYTE << 24;
-      z->state->mode = CHECK3;
-    case CHECK3:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE << 16;
-      z->state->mode = CHECK2;
-    case CHECK2:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE << 8;
-      z->state->mode = CHECK1;
-    case CHECK1:
-      NEEDBYTE
-      z->state->sub.check.need += (uLong)NEXTBYTE;
-
-      if (z->state->sub.check.was != z->state->sub.check.need)
-      {
-        z->state->mode = BAD;
-        z->msg = (char*)"incorrect data check";
-        z->state->sub.marker = 5;       /* can't try inflateSync */
-        break;
-      }
-      Tracev((stderr, "inflate: zlib check ok\n"));
-      z->state->mode = DONE;
-    case DONE:
-      return Z_STREAM_END;
-    case BAD:
-      return Z_DATA_ERROR;
-    default:
-      return Z_STREAM_ERROR;
-  }
-#ifdef NEED_DUMMY_RETURN
-  return Z_STREAM_ERROR;  /* Some dumb compilers complain without this */
-#endif
-}
-
-
-int ZEXPORT inflateSetDictionary(z, dictionary, dictLength)
-z_streamp z;
-const Bytef *dictionary;
-uInt  dictLength;
-{
-  uInt length = dictLength;
-
-  if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0)
-    return Z_STREAM_ERROR;
-
-  if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR;
-  z->adler = 1L;
-
-  if (length >= ((uInt)1<<z->state->wbits))
-  {
-    length = (1<<z->state->wbits)-1;
-    dictionary += dictLength - length;
-  }
-  inflate_set_dictionary(z->state->blocks, dictionary, length);
-  z->state->mode = BLOCKS;
-  return Z_OK;
-}
-
-
-int ZEXPORT inflateSync(z)
-z_streamp z;
-{
-  uInt n;       /* number of bytes to look at */
-  Bytef *p;     /* pointer to bytes */
-  uInt m;       /* number of marker bytes found in a row */
-  uLong r, w;   /* temporaries to save total_in and total_out */
-
-  /* set up */
-  if (z == Z_NULL || z->state == Z_NULL)
-    return Z_STREAM_ERROR;
-  if (z->state->mode != BAD)
-  {
-    z->state->mode = BAD;
-    z->state->sub.marker = 0;
-  }
-  if ((n = z->avail_in) == 0)
-    return Z_BUF_ERROR;
-  p = z->next_in;
-  m = z->state->sub.marker;
-
-  /* search */
-  while (n && m < 4)
-  {
-    static const Byte mark[4] = {0, 0, 0xff, 0xff};
-    if (*p == mark[m])
-      m++;
-    else if (*p)
-      m = 0;
-    else
-      m = 4 - m;
-    p++, n--;
-  }
-
-  /* restore */
-  z->total_in += p - z->next_in;
-  z->next_in = p;
-  z->avail_in = n;
-  z->state->sub.marker = m;
-
-  /* return no joy or set up to restart on a new block */
-  if (m != 4)
-    return Z_DATA_ERROR;
-  r = z->total_in;  w = z->total_out;
-  inflateReset(z);
-  z->total_in = r;  z->total_out = w;
-  z->state->mode = BLOCKS;
-  return Z_OK;
-}
-
-
-/* Returns true if inflate is currently at the end of a block generated
- * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
- * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH
- * but removes the length bytes of the resulting empty stored block. When
- * decompressing, PPP checks that at the end of input packet, inflate is
- * waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(z)
-z_streamp z;
-{
-  if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL)
-    return Z_STREAM_ERROR;
-  return inflate_blocks_sync_point(z->state->blocks);
-}
diff -uNrd ircd-hybrid-6.0/zlib/inftrees.c ircd-pi1.0a/zlib/inftrees.c
--- ircd-hybrid-6.0/zlib/inftrees.c	Sat Oct 10 01:00:39 1998
+++ ircd-pi1.0a/zlib/inftrees.c	Wed Dec 31 19:00:00 1969
@@ -1,455 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#if !defined(BUILDFIXED) && !defined(STDC)
-#  define BUILDFIXED   /* non ANSI compilers may not accept inffixed.h */
-#endif
-
-const char inflate_copyright[] =
-   " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-struct internal_state  {int dummy;}; /* for buggy compilers */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-
-local int huft_build OF((
-    uIntf *,            /* code lengths in bits */
-    uInt,               /* number of codes */
-    uInt,               /* number of "simple" codes */
-    const uIntf *,      /* list of base values for non-simple codes */
-    const uIntf *,      /* list of extra bits for non-simple codes */
-    inflate_huft * FAR*,/* result: starting table */
-    uIntf *,            /* maximum lookup bits (returns actual) */
-    inflate_huft *,     /* space for trees */
-    uInt *,             /* hufts used in space */
-    uIntf * ));         /* space for values */
-
-/* Tables for deflate from PKZIP's appnote.txt. */
-local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
-        /* see note #13 above about 258 */
-local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
-        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
-        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */
-local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577};
-local const uInt cpdext[30] = { /* Extra bits for distance codes */
-        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
-        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
-        12, 12, 13, 13};
-
-/*
-   Huffman code decoding is performed using a multi-level table lookup.
-   The fastest way to decode is to simply build a lookup table whose
-   size is determined by the longest code.  However, the time it takes
-   to build this table can also be a factor if the data being decoded
-   is not very long.  The most common codes are necessarily the
-   shortest codes, so those codes dominate the decoding time, and hence
-   the speed.  The idea is you can have a shorter table that decodes the
-   shorter, more probable codes, and then point to subsidiary tables for
-   the longer codes.  The time it costs to decode the longer codes is
-   then traded against the time it takes to make longer tables.
-
-   This results of this trade are in the variables lbits and dbits
-   below.  lbits is the number of bits the first level table for literal/
-   length codes can decode in one step, and dbits is the same thing for
-   the distance codes.  Subsequent tables are also less than or equal to
-   those sizes.  These values may be adjusted either when all of the
-   codes are shorter than that, in which case the longest code length in
-   bits is used, or when the shortest code is *longer* than the requested
-   table size, in which case the length of the shortest code in bits is
-   used.
-
-   There are two different values for the two tables, since they code a
-   different number of possibilities each.  The literal/length table
-   codes 286 possible values, or in a flat code, a little over eight
-   bits.  The distance table codes 30 possible values, or a little less
-   than five bits, flat.  The optimum values for speed end up being
-   about one bit more than those, so lbits is 8+1 and dbits is 5+1.
-   The optimum values may differ though from machine to machine, and
-   possibly even between compilers.  Your mileage may vary.
- */
-
-
-/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
-#define BMAX 15         /* maximum bit length of any code */
-
-local int huft_build(b, n, s, d, e, t, m, hp, hn, v)
-uIntf *b;               /* code lengths in bits (all assumed <= BMAX) */
-uInt n;                 /* number of codes (assumed <= 288) */
-uInt s;                 /* number of simple-valued codes (0..s-1) */
-const uIntf *d;         /* list of base values for non-simple codes */
-const uIntf *e;         /* list of extra bits for non-simple codes */
-inflate_huft * FAR *t;  /* result: starting table */
-uIntf *m;               /* maximum lookup bits, returns actual */
-inflate_huft *hp;       /* space for trees */
-uInt *hn;               /* hufts used in space */
-uIntf *v;               /* working area: values in order of bit length */
-/* Given a list of code lengths and a maximum table size, make a set of
-   tables to decode that set of codes.  Return Z_OK on success, Z_BUF_ERROR
-   if the given code set is incomplete (the tables are still built in this
-   case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
-   lengths), or Z_MEM_ERROR if not enough memory. */
-{
-
-  uInt a;                       /* counter for codes of length k */
-  uInt c[BMAX+1];               /* bit length count table */
-  uInt f;                       /* i repeats in table every f entries */
-  int g;                        /* maximum code length */
-  int h;                        /* table level */
-  register uInt i;              /* counter, current code */
-  register uInt j;              /* counter */
-  register int k;               /* number of bits in current code */
-  int l;                        /* bits per table (returned in m) */
-  uInt mask;                    /* (1 << w) - 1, to avoid cc -O bug on HP */
-  register uIntf *p;            /* pointer into c[], b[], or v[] */
-  inflate_huft *q;              /* points to current table */
-  struct inflate_huft_s r;      /* table entry for structure assignment */
-  inflate_huft *u[BMAX];        /* table stack */
-  register int w;               /* bits before this table == (l * h) */
-  uInt x[BMAX+1];               /* bit offsets, then code stack */
-  uIntf *xp;                    /* pointer into x */
-  int y;                        /* number of dummy codes added */
-  uInt z;                       /* number of entries in current table */
-
-
-  /* Generate counts for each bit length */
-  p = c;
-#define C0 *p++ = 0;
-#define C2 C0 C0 C0 C0
-#define C4 C2 C2 C2 C2
-  C4                            /* clear c[]--assume BMAX+1 is 16 */
-  p = b;  i = n;
-  do {
-    c[*p++]++;                  /* assume all entries <= BMAX */
-  } while (--i);
-  if (c[0] == n)                /* null input--all zero length codes */
-  {
-    *t = (inflate_huft *)Z_NULL;
-    *m = 0;
-    return Z_OK;
-  }
-
-
-  /* Find minimum and maximum length, bound *m by those */
-  l = *m;
-  for (j = 1; j <= BMAX; j++)
-    if (c[j])
-      break;
-  k = j;                        /* minimum code length */
-  if ((uInt)l < j)
-    l = j;
-  for (i = BMAX; i; i--)
-    if (c[i])
-      break;
-  g = i;                        /* maximum code length */
-  if ((uInt)l > i)
-    l = i;
-  *m = l;
-
-
-  /* Adjust last length count to fill out codes, if needed */
-  for (y = 1 << j; j < i; j++, y <<= 1)
-    if ((y -= c[j]) < 0)
-      return Z_DATA_ERROR;
-  if ((y -= c[i]) < 0)
-    return Z_DATA_ERROR;
-  c[i] += y;
-
-
-  /* Generate starting offsets into the value table for each length */
-  x[1] = j = 0;
-  p = c + 1;  xp = x + 2;
-  while (--i) {                 /* note that i == g from above */
-    *xp++ = (j += *p++);
-  }
-
-
-  /* Make a table of values in order of bit lengths */
-  p = b;  i = 0;
-  do {
-    if ((j = *p++) != 0)
-      v[x[j]++] = i;
-  } while (++i < n);
-  n = x[g];                     /* set n to length of v */
-
-
-  /* Generate the Huffman codes and for each, make the table entries */
-  x[0] = i = 0;                 /* first Huffman code is zero */
-  p = v;                        /* grab values in bit order */
-  h = -1;                       /* no tables yet--level -1 */
-  w = -l;                       /* bits decoded == (l * h) */
-  u[0] = (inflate_huft *)Z_NULL;        /* just to keep compilers happy */
-  q = (inflate_huft *)Z_NULL;   /* ditto */
-  z = 0;                        /* ditto */
-
-  /* go through the bit lengths (k already is bits in shortest code) */
-  for (; k <= g; k++)
-  {
-    a = c[k];
-    while (a--)
-    {
-      /* here i is the Huffman code of length k bits for value *p */
-      /* make tables up to required level */
-      while (k > w + l)
-      {
-        h++;
-        w += l;                 /* previous table always l bits */
-
-        /* compute minimum size table less than or equal to l bits */
-        z = g - w;
-        z = z > (uInt)l ? l : z;        /* table size upper limit */
-        if ((f = 1 << (j = k - w)) > a + 1)     /* try a k-w bit table */
-        {                       /* too few codes for k-w bit table */
-          f -= a + 1;           /* deduct codes from patterns left */
-          xp = c + k;
-          if (j < z)
-            while (++j < z)     /* try smaller tables up to z bits */
-            {
-              if ((f <<= 1) <= *++xp)
-                break;          /* enough codes to use up j bits */
-              f -= *xp;         /* else deduct codes from patterns */
-            }
-        }
-        z = 1 << j;             /* table entries for j-bit table */
-
-        /* allocate new table */
-        if (*hn + z > MANY)     /* (note: doesn't matter for fixed) */
-          return Z_MEM_ERROR;   /* not enough memory */
-        u[h] = q = hp + *hn;
-        *hn += z;
-
-        /* connect to last table, if there is one */
-        if (h)
-        {
-          x[h] = i;             /* save pattern for backing up */
-          r.bits = (Byte)l;     /* bits to dump before this table */
-          r.exop = (Byte)j;     /* bits in this table */
-          j = i >> (w - l);
-          r.base = (uInt)(q - u[h-1] - j);   /* offset to this table */
-          u[h-1][j] = r;        /* connect to last table */
-        }
-        else
-          *t = q;               /* first table is returned result */
-      }
-
-      /* set up table entry in r */
-      r.bits = (Byte)(k - w);
-      if (p >= v + n)
-        r.exop = 128 + 64;      /* out of values--invalid code */
-      else if (*p < s)
-      {
-        r.exop = (Byte)(*p < 256 ? 0 : 32 + 64);     /* 256 is end-of-block */
-        r.base = *p++;          /* simple code is just the value */
-      }
-      else
-      {
-        r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */
-        r.base = d[*p++ - s];
-      }
-
-      /* fill code-like entries with r */
-      f = 1 << (k - w);
-      for (j = i >> w; j < z; j += f)
-        q[j] = r;
-
-      /* backwards increment the k-bit code i */
-      for (j = 1 << (k - 1); i & j; j >>= 1)
-        i ^= j;
-      i ^= j;
-
-      /* backup over finished tables */
-      mask = (1 << w) - 1;      /* needed on HP, cc -O bug */
-      while ((i & mask) != x[h])
-      {
-        h--;                    /* don't need to update q */
-        w -= l;
-        mask = (1 << w) - 1;
-      }
-    }
-  }
-
-
-  /* Return Z_BUF_ERROR if we were given an incomplete table */
-  return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;
-}
-
-
-int inflate_trees_bits(c, bb, tb, hp, z)
-uIntf *c;               /* 19 code lengths */
-uIntf *bb;              /* bits tree desired/actual depth */
-inflate_huft * FAR *tb; /* bits tree result */
-inflate_huft *hp;       /* space for trees */
-z_streamp z;            /* for messages */
-{
-  int r;
-  uInt hn = 0;          /* hufts used in space */
-  uIntf *v;             /* work area for huft_build */
-
-  if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL)
-    return Z_MEM_ERROR;
-  r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL,
-                 tb, bb, hp, &hn, v);
-  if (r == Z_DATA_ERROR)
-    z->msg = (char*)"oversubscribed dynamic bit lengths tree";
-  else if (r == Z_BUF_ERROR || *bb == 0)
-  {
-    z->msg = (char*)"incomplete dynamic bit lengths tree";
-    r = Z_DATA_ERROR;
-  }
-  ZFREE(z, v);
-  return r;
-}
-
-
-int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z)
-uInt nl;                /* number of literal/length codes */
-uInt nd;                /* number of distance codes */
-uIntf *c;               /* that many (total) code lengths */
-uIntf *bl;              /* literal desired/actual bit depth */
-uIntf *bd;              /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-inflate_huft *hp;       /* space for trees */
-z_streamp z;            /* for messages */
-{
-  int r;
-  uInt hn = 0;          /* hufts used in space */
-  uIntf *v;             /* work area for huft_build */
-
-  /* allocate work area */
-  if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)
-    return Z_MEM_ERROR;
-
-  /* build literal/length tree */
-  r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v);
-  if (r != Z_OK || *bl == 0)
-  {
-    if (r == Z_DATA_ERROR)
-      z->msg = (char*)"oversubscribed literal/length tree";
-    else if (r != Z_MEM_ERROR)
-    {
-      z->msg = (char*)"incomplete literal/length tree";
-      r = Z_DATA_ERROR;
-    }
-    ZFREE(z, v);
-    return r;
-  }
-
-  /* build distance tree */
-  r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v);
-  if (r != Z_OK || (*bd == 0 && nl > 257))
-  {
-    if (r == Z_DATA_ERROR)
-      z->msg = (char*)"oversubscribed distance tree";
-    else if (r == Z_BUF_ERROR) {
-#ifdef PKZIP_BUG_WORKAROUND
-      r = Z_OK;
-    }
-#else
-      z->msg = (char*)"incomplete distance tree";
-      r = Z_DATA_ERROR;
-    }
-    else if (r != Z_MEM_ERROR)
-    {
-      z->msg = (char*)"empty distance tree with lengths";
-      r = Z_DATA_ERROR;
-    }
-    ZFREE(z, v);
-    return r;
-#endif
-  }
-
-  /* done */
-  ZFREE(z, v);
-  return Z_OK;
-}
-
-
-/* build fixed tables only once--keep them here */
-#ifdef BUILDFIXED
-local int fixed_built = 0;
-#define FIXEDH 544      /* number of hufts used by fixed tables */
-local inflate_huft fixed_mem[FIXEDH];
-local uInt fixed_bl;
-local uInt fixed_bd;
-local inflate_huft *fixed_tl;
-local inflate_huft *fixed_td;
-#else
-#include "inffixed.h"
-#endif
-
-
-int inflate_trees_fixed(bl, bd, tl, td, z)
-uIntf *bl;               /* literal desired/actual bit depth */
-uIntf *bd;               /* distance desired/actual bit depth */
-inflate_huft * FAR *tl;  /* literal/length tree result */
-inflate_huft * FAR *td;  /* distance tree result */
-z_streamp z;             /* for memory allocation */
-{
-#ifdef BUILDFIXED
-  /* build fixed tables if not already */
-  if (!fixed_built)
-  {
-    int k;              /* temporary variable */
-    uInt f = 0;         /* number of hufts used in fixed_mem */
-    uIntf *c;           /* length list for huft_build */
-    uIntf *v;           /* work area for huft_build */
-
-    /* allocate memory */
-    if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)
-      return Z_MEM_ERROR;
-    if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)
-    {
-      ZFREE(z, c);
-      return Z_MEM_ERROR;
-    }
-
-    /* literal table */
-    for (k = 0; k < 144; k++)
-      c[k] = 8;
-    for (; k < 256; k++)
-      c[k] = 9;
-    for (; k < 280; k++)
-      c[k] = 7;
-    for (; k < 288; k++)
-      c[k] = 8;
-    fixed_bl = 9;
-    huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl,
-               fixed_mem, &f, v);
-
-    /* distance table */
-    for (k = 0; k < 30; k++)
-      c[k] = 5;
-    fixed_bd = 5;
-    huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd,
-               fixed_mem, &f, v);
-
-    /* done */
-    ZFREE(z, v);
-    ZFREE(z, c);
-    fixed_built = 1;
-  }
-#endif
-  *bl = fixed_bl;
-  *bd = fixed_bd;
-  *tl = fixed_tl;
-  *td = fixed_td;
-  return Z_OK;
-}
diff -uNrd ircd-hybrid-6.0/zlib/inftrees.h ircd-pi1.0a/zlib/inftrees.h
--- ircd-hybrid-6.0/zlib/inftrees.h	Tue Oct  6 00:51:25 1998
+++ ircd-pi1.0a/zlib/inftrees.h	Wed Dec 31 19:00:00 1969
@@ -1,58 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Huffman code lookup table entry--this entry is four bytes for machines
-   that have 16-bit pointers (e.g. PC's in the small or medium model). */
-
-typedef struct inflate_huft_s FAR inflate_huft;
-
-struct inflate_huft_s {
-  union {
-    struct {
-      Byte Exop;        /* number of extra bits or operation */
-      Byte Bits;        /* number of bits in this code or subcode */
-    } what;
-    uInt pad;           /* pad structure to a power of 2 (4 bytes for */
-  } word;               /*  16-bit, 8 bytes for 32-bit int's) */
-  uInt base;            /* literal, length base, distance base,
-                           or table offset */
-};
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1004 huft structures (850 for length/literals
-   and 154 for distances, the latter actually the result of an
-   exhaustive search).  The actual maximum is not known, but the
-   value below is more than safe. */
-#define MANY 1440
-
-extern int inflate_trees_bits OF((
-    uIntf *,                    /* 19 code lengths */
-    uIntf *,                    /* bits tree desired/actual depth */
-    inflate_huft * FAR *,       /* bits tree result */
-    inflate_huft *,             /* space for trees */
-    z_streamp));                /* for messages */
-
-extern int inflate_trees_dynamic OF((
-    uInt,                       /* number of literal/length codes */
-    uInt,                       /* number of distance codes */
-    uIntf *,                    /* that many (total) code lengths */
-    uIntf *,                    /* literal desired/actual bit depth */
-    uIntf *,                    /* distance desired/actual bit depth */
-    inflate_huft * FAR *,       /* literal/length tree result */
-    inflate_huft * FAR *,       /* distance tree result */
-    inflate_huft *,             /* space for trees */
-    z_streamp));                /* for messages */
-
-extern int inflate_trees_fixed OF((
-    uIntf *,                    /* literal desired/actual bit depth */
-    uIntf *,                    /* distance desired/actual bit depth */
-    inflate_huft * FAR *,       /* literal/length tree result */
-    inflate_huft * FAR *,       /* distance tree result */
-    z_streamp));                /* for memory allocation */
diff -uNrd ircd-hybrid-6.0/zlib/infutil.c ircd-pi1.0a/zlib/infutil.c
--- ircd-hybrid-6.0/zlib/infutil.c	Tue Oct  6 00:51:26 1998
+++ ircd-pi1.0a/zlib/infutil.c	Wed Dec 31 19:00:00 1969
@@ -1,87 +0,0 @@
-/* inflate_util.c -- data and routines common to blocks and codes
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-#include "zutil.h"
-#include "infblock.h"
-#include "inftrees.h"
-#include "infcodes.h"
-#include "infutil.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* And'ing with mask[n] masks the lower n bits */
-uInt inflate_mask[17] = {
-    0x0000,
-    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
-    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
-};
-
-
-/* copy as much as possible from the sliding window to the output area */
-int inflate_flush(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
-  uInt n;
-  Bytef *p;
-  Bytef *q;
-
-  /* local copies of source and destination pointers */
-  p = z->next_out;
-  q = s->read;
-
-  /* compute number of bytes to copy as far as end of window */
-  n = (uInt)((q <= s->write ? s->write : s->end) - q);
-  if (n > z->avail_out) n = z->avail_out;
-  if (n && r == Z_BUF_ERROR) r = Z_OK;
-
-  /* update counters */
-  z->avail_out -= n;
-  z->total_out += n;
-
-  /* update check information */
-  if (s->checkfn != Z_NULL)
-    z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
-  /* copy as far as end of window */
-  zmemcpy(p, q, n);
-  p += n;
-  q += n;
-
-  /* see if more to copy at beginning of window */
-  if (q == s->end)
-  {
-    /* wrap pointers */
-    q = s->window;
-    if (s->write == s->end)
-      s->write = s->window;
-
-    /* compute bytes to copy */
-    n = (uInt)(s->write - q);
-    if (n > z->avail_out) n = z->avail_out;
-    if (n && r == Z_BUF_ERROR) r = Z_OK;
-
-    /* update counters */
-    z->avail_out -= n;
-    z->total_out += n;
-
-    /* update check information */
-    if (s->checkfn != Z_NULL)
-      z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
-    /* copy */
-    zmemcpy(p, q, n);
-    p += n;
-    q += n;
-  }
-
-  /* update pointers */
-  z->next_out = p;
-  s->read = q;
-
-  /* done */
-  return r;
-}
diff -uNrd ircd-hybrid-6.0/zlib/infutil.h ircd-pi1.0a/zlib/infutil.h
--- ircd-hybrid-6.0/zlib/infutil.h	Tue Oct  6 00:51:27 1998
+++ ircd-pi1.0a/zlib/infutil.h	Wed Dec 31 19:00:00 1969
@@ -1,98 +0,0 @@
-/* infutil.h -- types and macros common to blocks and codes
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-#ifndef _INFUTIL_H
-#define _INFUTIL_H
-
-typedef enum {
-      TYPE,     /* get type bits (3, including end bit) */
-      LENS,     /* get lengths for stored */
-      STORED,   /* processing stored block */
-      TABLE,    /* get table lengths */
-      BTREE,    /* get bit lengths tree for a dynamic block */
-      DTREE,    /* get length, distance trees for a dynamic block */
-      CODES,    /* processing fixed or dynamic block */
-      DRY,      /* output remaining window bytes */
-      DONE,     /* finished last block, done */
-      BAD}      /* got a data error--stuck here */
-inflate_block_mode;
-
-/* inflate blocks semi-private state */
-struct inflate_blocks_state {
-
-  /* mode */
-  inflate_block_mode  mode;     /* current inflate_block mode */
-
-  /* mode dependent information */
-  union {
-    uInt left;          /* if STORED, bytes left to copy */
-    struct {
-      uInt table;               /* table lengths (14 bits) */
-      uInt index;               /* index into blens (or border) */
-      uIntf *blens;             /* bit lengths of codes */
-      uInt bb;                  /* bit length tree depth */
-      inflate_huft *tb;         /* bit length decoding tree */
-    } trees;            /* if DTREE, decoding info for trees */
-    struct {
-      inflate_codes_statef 
-         *codes;
-    } decode;           /* if CODES, current state */
-  } sub;                /* submode */
-  uInt last;            /* true if this block is the last block */
-
-  /* mode independent information */
-  uInt bitk;            /* bits in bit buffer */
-  uLong bitb;           /* bit buffer */
-  inflate_huft *hufts;  /* single malloc for tree space */
-  Bytef *window;        /* sliding window */
-  Bytef *end;           /* one byte after sliding window */
-  Bytef *read;          /* window read pointer */
-  Bytef *write;         /* window write pointer */
-  check_func checkfn;   /* check function */
-  uLong check;          /* check on output */
-
-};
-
-
-/* defines for inflate input/output */
-/*   update pointers and return */
-#define UPDBITS {s->bitb=b;s->bitk=k;}
-#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
-#define UPDOUT {s->write=q;}
-#define UPDATE {UPDBITS UPDIN UPDOUT}
-#define LEAVE {UPDATE return inflate_flush(s,z,r);}
-/*   get bytes and bits */
-#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
-#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}
-#define NEXTBYTE (n--,*p++)
-#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define DUMPBITS(j) {b>>=(j);k-=(j);}
-/*   output bytes */
-#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)
-#define LOADOUT {q=s->write;m=(uInt)WAVAIL;}
-#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
-#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
-#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
-#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
-/*   load local pointers */
-#define LOAD {LOADIN LOADOUT}
-
-/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
-extern uInt inflate_mask[17];
-
-/* copy as much as possible from the sliding window to the output area */
-extern int inflate_flush OF((
-    inflate_blocks_statef *,
-    z_streamp ,
-    int));
-
-struct internal_state      {int dummy;}; /* for buggy compilers */
-
-#endif
diff -uNrd ircd-hybrid-6.0/zlib/maketree.c ircd-pi1.0a/zlib/maketree.c
--- ircd-hybrid-6.0/zlib/maketree.c	Sat Oct 10 01:00:40 1998
+++ ircd-pi1.0a/zlib/maketree.c	Wed Dec 31 19:00:00 1969
@@ -1,85 +0,0 @@
-/* maketree.c -- make inffixed.h table for decoding fixed codes
- * Copyright (C) 1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* This program is included in the distribution for completeness.
-   You do not need to compile or run this program since inffixed.h
-   is already included in the distribution.  To use this program
-   you need to compile zlib with BUILDFIXED defined and then compile
-   and link this program with the zlib library.  Then the output of
-   this program can be piped to inffixed.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "zutil.h"
-#include "inftrees.h"
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* generate initialization table for an inflate_huft structure array */
-void maketree(uInt b, inflate_huft *t)
-{
-  int i, e;
-
-  i = 0;
-  while (1)
-  {
-    e = t[i].exop;
-    if (e && (e & (16+64)) == 0)        /* table pointer */
-    {
-      fprintf(stderr, "maketree: cannot initialize sub-tables!\n");
-      exit(1);
-    }
-    if (i % 4 == 0)
-      printf("\n   ");
-    printf(" {{{%u,%u}},%u}", t[i].exop, t[i].bits, t[i].base);
-    if (++i == (1<<b))
-      break;
-    putchar(',');
-  }
-  puts("");
-}
-
-/* create the fixed tables in C initialization syntax */
-void main(void)
-{
-  int r;
-  uInt bl, bd;
-  inflate_huft *tl, *td;
-  z_stream z;
-
-  z.zalloc = zcalloc;
-  z.opaque = (voidpf)0;
-  z.zfree = zcfree;
-  r = inflate_trees_fixed(&bl, &bd, &tl, &td, &z);
-  if (r)
-  {
-    fprintf(stderr, "inflate_trees_fixed error %d\n", r);
-    return;
-  }
-  puts("/* inffixed.h -- table for decoding fixed codes");
-  puts(" * Generated automatically by the maketree.c program");
-  puts(" */");
-  puts("");
-  puts("/* WARNING: this file should *not* be used by applications. It is");
-  puts("   part of the implementation of the compression library and is");
-  puts("   subject to change. Applications should only use zlib.h.");
-  puts(" */");
-  puts("");
-  printf("local uInt fixed_bl = %d;\n", bl);
-  printf("local uInt fixed_bd = %d;\n", bd);
-  printf("local inflate_huft fixed_tl[] = {");
-  maketree(bl, tl);
-  puts("  };");
-  printf("local inflate_huft fixed_td[] = {");
-  maketree(bd, td);
-  puts("  };");
-}
diff -uNrd ircd-hybrid-6.0/zlib/minigzip.c ircd-pi1.0a/zlib/minigzip.c
--- ircd-hybrid-6.0/zlib/minigzip.c	Sat Oct 10 01:00:40 1998
+++ ircd-pi1.0a/zlib/minigzip.c	Wed Dec 31 19:00:00 1969
@@ -1,320 +0,0 @@
-/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/*
- * minigzip is a minimal implementation of the gzip utility. This is
- * only an example of using zlib and isn't meant to replace the
- * full-featured gzip. No attempt is made to deal with file systems
- * limiting names to 14 or 8+3 characters, etc... Error checking is
- * very limited. So use minigzip only for testing; use gzip for the
- * real thing. On MSDOS, use only on file names without extension
- * or in pipe mode.
- */
-
-/* @(#) $Id: minigzip.c,v 1.2 1998/10/10 05:00:40 lusky Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#else
-   extern void exit  OF((int));
-#endif
-
-#ifdef USE_MMAP
-#  include <sys/types.h>
-#  include <sys/mman.h>
-#  include <sys/stat.h>
-#endif
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32)
-#  include <fcntl.h>
-#  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#  define SET_BINARY_MODE(file)
-#endif
-
-#ifdef VMS
-#  define unlink delete
-#  define GZ_SUFFIX "-gz"
-#endif
-#ifdef RISCOS
-#  define unlink remove
-#  define GZ_SUFFIX "-gz"
-#  define fileno(file) file->__file
-#endif
-#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#  include <unix.h> /* for fileno */
-#endif
-
-#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
-  extern int unlink OF((const char *));
-#endif
-
-#ifndef GZ_SUFFIX
-#  define GZ_SUFFIX ".gz"
-#endif
-#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)
-
-#define BUFLEN      16384
-#define MAX_NAME_LEN 1024
-
-#ifdef MAXSEG_64K
-#  define local static
-   /* Needed for systems with limitation on stack size. */
-#else
-#  define local
-#endif
-
-char *prog;
-
-void error            OF((const char *msg));
-void gz_compress      OF((FILE   *in, gzFile out));
-#ifdef USE_MMAP
-int  gz_compress_mmap OF((FILE   *in, gzFile out));
-#endif
-void gz_uncompress    OF((gzFile in, FILE   *out));
-void file_compress    OF((char  *file, char *mode));
-void file_uncompress  OF((char  *file));
-int  main             OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Display error message and exit
- */
-void error(msg)
-    const char *msg;
-{
-    fprintf(stderr, "%s: %s\n", prog, msg);
-    exit(1);
-}
-
-/* ===========================================================================
- * Compress input to output then close both files.
- */
-
-void gz_compress(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-#ifdef USE_MMAP
-    /* Try first compressing with mmap. If mmap fails (minigzip used in a
-     * pipe), use the normal fread loop.
-     */
-    if (gz_compress_mmap(in, out) == Z_OK) return;
-#endif
-    for (;;) {
-        len = fread(buf, 1, sizeof(buf), in);
-        if (ferror(in)) {
-            perror("fread");
-            exit(1);
-        }
-        if (len == 0) break;
-
-        if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
-    }
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-}
-
-#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */
-
-/* Try compressing the input file at once using mmap. Return Z_OK if
- * if success, Z_ERRNO otherwise.
- */
-int gz_compress_mmap(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    int len;
-    int err;
-    int ifd = fileno(in);
-    caddr_t buf;    /* mmap'ed buffer for the entire input file */
-    off_t buf_len;  /* length of the input file */
-    struct stat sb;
-
-    /* Determine the size of the file, needed for mmap: */
-    if (fstat(ifd, &sb) < 0) return Z_ERRNO;
-    buf_len = sb.st_size;
-    if (buf_len <= 0) return Z_ERRNO;
-
-    /* Now do the actual mmap: */
-    buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); 
-    if (buf == (caddr_t)(-1)) return Z_ERRNO;
-
-    /* Compress the whole file at once: */
-    len = gzwrite(out, (char *)buf, (unsigned)buf_len);
-
-    if (len != (int)buf_len) error(gzerror(out, &err));
-
-    munmap(buf, buf_len);
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-    return Z_OK;
-}
-#endif /* USE_MMAP */
-
-/* ===========================================================================
- * Uncompress input to output then close both files.
- */
-void gz_uncompress(in, out)
-    gzFile in;
-    FILE   *out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-    for (;;) {
-        len = gzread(in, buf, sizeof(buf));
-        if (len < 0) error (gzerror(in, &err));
-        if (len == 0) break;
-
-        if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-	    error("failed fwrite");
-	}
-    }
-    if (fclose(out)) error("failed fclose");
-
-    if (gzclose(in) != Z_OK) error("failed gzclose");
-}
-
-
-/* ===========================================================================
- * Compress the given file: create a corresponding .gz file and remove the
- * original.
- */
-void file_compress(file, mode)
-    char  *file;
-    char  *mode;
-{
-    local char outfile[MAX_NAME_LEN];
-    FILE  *in;
-    gzFile out;
-
-    strcpy(outfile, file);
-    strcat(outfile, GZ_SUFFIX);
-
-    in = fopen(file, "rb");
-    if (in == NULL) {
-        perror(file);
-        exit(1);
-    }
-    out = gzopen(outfile, mode);
-    if (out == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-        exit(1);
-    }
-    gz_compress(in, out);
-
-    unlink(file);
-}
-
-
-/* ===========================================================================
- * Uncompress the given file and remove the original.
- */
-void file_uncompress(file)
-    char  *file;
-{
-    local char buf[MAX_NAME_LEN];
-    char *infile, *outfile;
-    FILE  *out;
-    gzFile in;
-    int len = strlen(file);
-
-    strcpy(buf, file);
-
-    if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
-        infile = file;
-        outfile = buf;
-        outfile[len-3] = '\0';
-    } else {
-        outfile = file;
-        infile = buf;
-        strcat(infile, GZ_SUFFIX);
-    }
-    in = gzopen(infile, "rb");
-    if (in == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-        exit(1);
-    }
-    out = fopen(outfile, "wb");
-    if (out == NULL) {
-        perror(file);
-        exit(1);
-    }
-
-    gz_uncompress(in, out);
-
-    unlink(infile);
-}
-
-
-/* ===========================================================================
- * Usage:  minigzip [-d] [-f] [-h] [-1 to -9] [files...]
- *   -d : decompress
- *   -f : compress with Z_FILTERED
- *   -h : compress with Z_HUFFMAN_ONLY
- *   -1 to -9 : compression level
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    int uncompr = 0;
-    gzFile file;
-    char outmode[20];
-
-    strcpy(outmode, "wb6 ");
-
-    prog = argv[0];
-    argc--, argv++;
-
-    while (argc > 0) {
-      if (strcmp(*argv, "-d") == 0)
-	uncompr = 1;
-      else if (strcmp(*argv, "-f") == 0)
-	outmode[3] = 'f';
-      else if (strcmp(*argv, "-h") == 0)
-	outmode[3] = 'h';
-      else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-	       (*argv)[2] == 0)
-	outmode[2] = (*argv)[1];
-      else
-	break;
-      argc--, argv++;
-    }
-    if (argc == 0) {
-        SET_BINARY_MODE(stdin);
-        SET_BINARY_MODE(stdout);
-        if (uncompr) {
-            file = gzdopen(fileno(stdin), "rb");
-            if (file == NULL) error("can't gzdopen stdin");
-            gz_uncompress(file, stdout);
-        } else {
-            file = gzdopen(fileno(stdout), outmode);
-            if (file == NULL) error("can't gzdopen stdout");
-            gz_compress(stdin, file);
-        }
-    } else {
-        do {
-            if (uncompr) {
-                file_uncompress(*argv);
-            } else {
-                file_compress(*argv, outmode);
-            }
-        } while (argv++, --argc);
-    }
-    exit(0);
-    return 0; /* to avoid warning */
-}
diff -uNrd ircd-hybrid-6.0/zlib/setup.h.in ircd-pi1.0a/zlib/setup.h.in
--- ircd-hybrid-6.0/zlib/setup.h.in	Sat Oct 10 01:03:55 1998
+++ ircd-pi1.0a/zlib/setup.h.in	Wed Dec 31 19:00:00 1969
@@ -1,13 +0,0 @@
-/* Define if you have mmap() */
-#undef USE_MMAP
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <errno.h> header file.  */
-#undef HAVE_ERRNO_H
-
-#ifndef HAVE_ERRNO_H
-#define NO_ERRNO_H
-#endif
-
diff -uNrd ircd-hybrid-6.0/zlib/trees.c ircd-pi1.0a/zlib/trees.c
--- ircd-hybrid-6.0/zlib/trees.c	Sat Oct 10 01:00:41 1998
+++ ircd-pi1.0a/zlib/trees.c	Wed Dec 31 19:00:00 1969
@@ -1,1214 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-1998 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process uses several Huffman trees. The more
- *      common source values are represented by shorter bit sequences.
- *
- *      Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values).  The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- *      Storer, James A.
- *          Data Compression:  Methods and Theory, pp. 49-50.
- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.
- *
- *      Sedgewick, R.
- *          Algorithms, p290.
- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id: trees.c,v 1.2 1998/10/10 05:00:41 lusky Exp $ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6      16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10    17
-/* repeat a zero length 3-10 times  (3 bits of repeat count) */
-
-#define REPZ_11_138  18
-/* repeat a zero length 11-138 times  (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN  512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-#  include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
-    const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
-    int     extra_base;          /* base index for extra_bits */
-    int     elems;               /* max number of elements in the tree */
-    int     max_length;          /* max bit length for the codes */
-};
-
-local static_tree_desc  static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc  static_d_desc =
-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
-
-local static_tree_desc  static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block     OF((deflate_state *s));
-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));
-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree     OF((deflate_state *s, tree_desc *desc));
-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local int  build_bl_tree  OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
-                              int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
-                              ct_data *dtree));
-local void set_data_type  OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup      OF((deflate_state *s));
-local void bi_flush       OF((deflate_state *s));
-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
-                              int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-   /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-#  define send_code(s, c, tree) \
-     { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-       send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
-    put_byte(s, (uch)((w) & 0xff)); \
-    put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits      OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
-    deflate_state *s;
-    int value;  /* value to send */
-    int length; /* number of bits */
-{
-    Tracevv((stderr," l %2d v %4x ", length, value));
-    Assert(length > 0 && length <= 15, "invalid length");
-    s->bits_sent += (ulg)length;
-
-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
-     * unused bits in value.
-     */
-    if (s->bi_valid > (int)Buf_size - length) {
-        s->bi_buf |= (value << s->bi_valid);
-        put_short(s, s->bi_buf);
-        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
-        s->bi_valid += length - Buf_size;
-    } else {
-        s->bi_buf |= value << s->bi_valid;
-        s->bi_valid += length;
-    }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
-  if (s->bi_valid > (int)Buf_size - len) {\
-    int val = value;\
-    s->bi_buf |= (val << s->bi_valid);\
-    put_short(s, s->bi_buf);\
-    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
-    s->bi_valid += len - Buf_size;\
-  } else {\
-    s->bi_buf |= (value) << s->bi_valid;\
-    s->bi_valid += len;\
-  }\
-}
-#endif /* DEBUG */
-
-
-#define MAX(a,b) (a >= b ? a : b)
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
-    static int static_init_done = 0;
-    int n;        /* iterates over tree elements */
-    int bits;     /* bit counter */
-    int length;   /* length value */
-    int code;     /* code value */
-    int dist;     /* distance index */
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    if (static_init_done) return;
-
-    /* For some embedded targets, global variables are not initialized: */
-    static_l_desc.static_tree = static_ltree;
-    static_l_desc.extra_bits = extra_lbits;
-    static_d_desc.static_tree = static_dtree;
-    static_d_desc.extra_bits = extra_dbits;
-    static_bl_desc.extra_bits = extra_blbits;
-
-    /* Initialize the mapping length (0..255) -> length code (0..28) */
-    length = 0;
-    for (code = 0; code < LENGTH_CODES-1; code++) {
-        base_length[code] = length;
-        for (n = 0; n < (1<<extra_lbits[code]); n++) {
-            _length_code[length++] = (uch)code;
-        }
-    }
-    Assert (length == 256, "tr_static_init: length != 256");
-    /* Note that the length 255 (match length 258) can be represented
-     * in two different ways: code 284 + 5 bits or code 285, so we
-     * overwrite length_code[255] to use the best encoding:
-     */
-    _length_code[length-1] = (uch)code;
-
-    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
-    dist = 0;
-    for (code = 0 ; code < 16; code++) {
-        base_dist[code] = dist;
-        for (n = 0; n < (1<<extra_dbits[code]); n++) {
-            _dist_code[dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: dist != 256");
-    dist >>= 7; /* from now on, all distances are divided by 128 */
-    for ( ; code < D_CODES; code++) {
-        base_dist[code] = dist << 7;
-        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
-            _dist_code[256 + dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
-    /* Construct the codes of the static literal tree */
-    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
-    n = 0;
-    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
-    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
-    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
-    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
-    /* Codes 286 and 287 do not exist, but we must include them in the
-     * tree construction to get a canonical Huffman tree (longest code
-     * all ones)
-     */
-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
-    /* The static distance tree is trivial: */
-    for (n = 0; n < D_CODES; n++) {
-        static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
-    }
-    static_init_done = 1;
-
-#  ifdef GEN_TREES_H
-    gen_trees_header();
-#  endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-#  ifndef DEBUG
-#    include <stdio.h>
-#  endif
-
-#  define SEPARATOR(i, last, width) \
-      ((i) == (last)? "\n};\n\n" :    \
-       ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
-    FILE *header = fopen("trees.h", "w");
-    int i;
-
-    Assert (header != NULL, "Can't open trees.h");
-    fprintf(header,
-	    "/* header created automatically with -DGEN_TREES_H */\n\n");
-
-    fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
-    for (i = 0; i < L_CODES+2; i++) {
-	fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
-		static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
-    }
-
-    fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-	fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
-		static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
-    }
-
-    fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
-    for (i = 0; i < DIST_CODE_LEN; i++) {
-	fprintf(header, "%2u%s", _dist_code[i],
-		SEPARATOR(i, DIST_CODE_LEN-1, 20));
-    }
-
-    fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
-    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
-	fprintf(header, "%2u%s", _length_code[i],
-		SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
-    }
-
-    fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
-    for (i = 0; i < LENGTH_CODES; i++) {
-	fprintf(header, "%1u%s", base_length[i],
-		SEPARATOR(i, LENGTH_CODES-1, 20));
-    }
-
-    fprintf(header, "local const int base_dist[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-	fprintf(header, "%5u%s", base_dist[i],
-		SEPARATOR(i, D_CODES-1, 10));
-    }
-
-    fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
-    deflate_state *s;
-{
-    tr_static_init();
-
-    s->l_desc.dyn_tree = s->dyn_ltree;
-    s->l_desc.stat_desc = &static_l_desc;
-
-    s->d_desc.dyn_tree = s->dyn_dtree;
-    s->d_desc.stat_desc = &static_d_desc;
-
-    s->bl_desc.dyn_tree = s->bl_tree;
-    s->bl_desc.stat_desc = &static_bl_desc;
-
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
-    s->compressed_len = 0L;
-    s->bits_sent = 0L;
-#endif
-
-    /* Initialize the first block of the first file: */
-    init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
-    deflate_state *s;
-{
-    int n; /* iterates over tree elements */
-
-    /* Initialize the trees. */
-    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
-    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
-    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
-    s->dyn_ltree[END_BLOCK].Freq = 1;
-    s->opt_len = s->static_len = 0L;
-    s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
-    top = s->heap[SMALLEST]; \
-    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
-    pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
-   (tree[n].Freq < tree[m].Freq || \
-   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
-    deflate_state *s;
-    ct_data *tree;  /* the tree to restore */
-    int k;               /* node to move down */
-{
-    int v = s->heap[k];
-    int j = k << 1;  /* left son of k */
-    while (j <= s->heap_len) {
-        /* Set j to the smallest of the two sons: */
-        if (j < s->heap_len &&
-            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
-            j++;
-        }
-        /* Exit if v is smaller than both sons */
-        if (smaller(tree, v, s->heap[j], s->depth)) break;
-
-        /* Exchange v with the smallest son */
-        s->heap[k] = s->heap[j];  k = j;
-
-        /* And continue down the tree, setting j to the left son of k */
-        j <<= 1;
-    }
-    s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- *    above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- *     array bl_count contains the frequencies for each bit length.
- *     The length opt_len is updated; static_len is also updated if stree is
- *     not null.
- */
-local void gen_bitlen(s, desc)
-    deflate_state *s;
-    tree_desc *desc;    /* the tree descriptor */
-{
-    ct_data *tree        = desc->dyn_tree;
-    int max_code         = desc->max_code;
-    const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
-    int base             = desc->stat_desc->extra_base;
-    int max_length       = desc->stat_desc->max_length;
-    int h;              /* heap index */
-    int n, m;           /* iterate over the tree elements */
-    int bits;           /* bit length */
-    int xbits;          /* extra bits */
-    ush f;              /* frequency */
-    int overflow = 0;   /* number of elements with bit length too large */
-
-    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
-    /* In a first pass, compute the optimal bit lengths (which may
-     * overflow in the case of the bit length tree).
-     */
-    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
-    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
-        n = s->heap[h];
-        bits = tree[tree[n].Dad].Len + 1;
-        if (bits > max_length) bits = max_length, overflow++;
-        tree[n].Len = (ush)bits;
-        /* We overwrite tree[n].Dad which is no longer needed */
-
-        if (n > max_code) continue; /* not a leaf node */
-
-        s->bl_count[bits]++;
-        xbits = 0;
-        if (n >= base) xbits = extra[n-base];
-        f = tree[n].Freq;
-        s->opt_len += (ulg)f * (bits + xbits);
-        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
-    }
-    if (overflow == 0) return;
-
-    Trace((stderr,"\nbit length overflow\n"));
-    /* This happens for example on obj2 and pic of the Calgary corpus */
-
-    /* Find the first bit length which could increase: */
-    do {
-        bits = max_length-1;
-        while (s->bl_count[bits] == 0) bits--;
-        s->bl_count[bits]--;      /* move one leaf down the tree */
-        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
-        s->bl_count[max_length]--;
-        /* The brother of the overflow item also moves one step up,
-         * but this does not affect bl_count[max_length]
-         */
-        overflow -= 2;
-    } while (overflow > 0);
-
-    /* Now recompute all bit lengths, scanning in increasing frequency.
-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
-     * lengths instead of fixing only the wrong ones. This idea is taken
-     * from 'ar' written by Haruhiko Okumura.)
-     */
-    for (bits = max_length; bits != 0; bits--) {
-        n = s->bl_count[bits];
-        while (n != 0) {
-            m = s->heap[--h];
-            if (m > max_code) continue;
-            if (tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
-                s->opt_len += ((long)bits - (long)tree[m].Len)
-                              *(long)tree[m].Freq;
-                tree[m].Len = (ush)bits;
-            }
-            n--;
-        }
-    }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- *     zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
-    ct_data *tree;             /* the tree to decorate */
-    int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
-{
-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
-    ush code = 0;              /* running code value */
-    int bits;                  /* bit index */
-    int n;                     /* code index */
-
-    /* The distribution counts are first used to generate the code values
-     * without bit reversal.
-     */
-    for (bits = 1; bits <= MAX_BITS; bits++) {
-        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
-    }
-    /* Check that the bit counts in bl_count are consistent. The last code
-     * must be all ones.
-     */
-    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
-            "inconsistent bit counts");
-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
-    for (n = 0;  n <= max_code; n++) {
-        int len = tree[n].Len;
-        if (len == 0) continue;
-        /* Now reverse the bits */
-        tree[n].Code = bi_reverse(next_code[len]++, len);
-
-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
-    }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- *     and corresponding code. The length opt_len is updated; static_len is
- *     also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
-    deflate_state *s;
-    tree_desc *desc; /* the tree descriptor */
-{
-    ct_data *tree         = desc->dyn_tree;
-    const ct_data *stree  = desc->stat_desc->static_tree;
-    int elems             = desc->stat_desc->elems;
-    int n, m;          /* iterate over heap elements */
-    int max_code = -1; /* largest code with non zero frequency */
-    int node;          /* new node being created */
-
-    /* Construct the initial heap, with least frequent element in
-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
-     * heap[0] is not used.
-     */
-    s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
-    for (n = 0; n < elems; n++) {
-        if (tree[n].Freq != 0) {
-            s->heap[++(s->heap_len)] = max_code = n;
-            s->depth[n] = 0;
-        } else {
-            tree[n].Len = 0;
-        }
-    }
-
-    /* The pkzip format requires that at least one distance code exists,
-     * and that at least one bit should be sent even if there is only one
-     * possible code. So to avoid special checks later on we force at least
-     * two codes of non zero frequency.
-     */
-    while (s->heap_len < 2) {
-        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
-        tree[node].Freq = 1;
-        s->depth[node] = 0;
-        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
-        /* node is 0 or 1 so it does not have extra bits */
-    }
-    desc->max_code = max_code;
-
-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
-     * establish sub-heaps of increasing lengths:
-     */
-    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
-    /* Construct the Huffman tree by repeatedly combining the least two
-     * frequent nodes.
-     */
-    node = elems;              /* next internal node of the tree */
-    do {
-        pqremove(s, tree, n);  /* n = node of least frequency */
-        m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
-        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
-        s->heap[--(s->heap_max)] = m;
-
-        /* Create a new node father of n and m */
-        tree[node].Freq = tree[n].Freq + tree[m].Freq;
-        s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1);
-        tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
-        if (tree == s->bl_tree) {
-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
-        }
-#endif
-        /* and insert the new node in the heap */
-        s->heap[SMALLEST] = node++;
-        pqdownheap(s, tree, SMALLEST);
-
-    } while (s->heap_len >= 2);
-
-    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
-    /* At this point, the fields freq and dad are set. We can now
-     * generate the bit lengths.
-     */
-    gen_bitlen(s, (tree_desc *)desc);
-
-    /* The field len is now set, we can generate the bit codes */
-    gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree;   /* the tree to be scanned */
-    int max_code;    /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    if (nextlen == 0) max_count = 138, min_count = 3;
-    tree[max_code+1].Len = (ush)0xffff; /* guard */
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            s->bl_tree[curlen].Freq += count;
-        } else if (curlen != 0) {
-            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
-            s->bl_tree[REP_3_6].Freq++;
-        } else if (count <= 10) {
-            s->bl_tree[REPZ_3_10].Freq++;
-        } else {
-            s->bl_tree[REPZ_11_138].Freq++;
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree; /* the tree to be scanned */
-    int max_code;       /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    /* tree[max_code+1].Len = -1; */  /* guard already set */
-    if (nextlen == 0) max_count = 138, min_count = 3;
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
-        } else if (curlen != 0) {
-            if (curlen != prevlen) {
-                send_code(s, curlen, s->bl_tree); count--;
-            }
-            Assert(count >= 3 && count <= 6, " 3_6?");
-            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
-        } else if (count <= 10) {
-            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
-        } else {
-            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
-    deflate_state *s;
-{
-    int max_blindex;  /* index of last bit length code of non zero freq */
-
-    /* Determine the bit length frequencies for literal and distance trees */
-    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
-    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
-    /* Build the bit length tree: */
-    build_tree(s, (tree_desc *)(&(s->bl_desc)));
-    /* opt_len now includes the length of the tree representations, except
-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
-     */
-
-    /* Determine the number of bit length codes to send. The pkzip format
-     * requires that at least 4 bit length codes be sent. (appnote.txt says
-     * 3 but the actual value used is 4.)
-     */
-    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
-        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
-    }
-    /* Update opt_len to include the bit length tree and counts */
-    s->opt_len += 3*(max_blindex+1) + 5+5+4;
-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
-            s->opt_len, s->static_len));
-
-    return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
-    deflate_state *s;
-    int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
-    int rank;                    /* index in bl_order */
-
-    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
-    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
-            "too many codes");
-    Tracev((stderr, "\nbl counts: "));
-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
-    send_bits(s, dcodes-1,   5);
-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
-    for (rank = 0; rank < blcodes; rank++) {
-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
-        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
-    }
-    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
-    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
-    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
-#ifdef DEBUG
-    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
-    s->compressed_len += (stored_len + 4) << 3;
-#endif
-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
-    deflate_state *s;
-{
-    send_bits(s, STATIC_TREES<<1, 3);
-    send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
-    bi_flush(s);
-    /* Of the 10 bits for the empty block, we have already sent
-     * (10 - bi_valid) bits. The lookahead for the last real code (before
-     * the EOB of the previous block) was thus at least one plus the length
-     * of the EOB plus what we have just sent of the empty static block.
-     */
-    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
-        send_bits(s, STATIC_TREES<<1, 3);
-        send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-        s->compressed_len += 10L;
-#endif
-        bi_flush(s);
-    }
-    s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void _tr_flush_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
-    int max_blindex = 0;  /* index of last bit length code of non zero freq */
-
-    /* Build the Huffman trees unless a stored block is forced */
-    if (s->level > 0) {
-
-	 /* Check if the file is ascii or binary */
-	if (s->data_type == Z_UNKNOWN) set_data_type(s);
-
-	/* Construct the literal and distance trees */
-	build_tree(s, (tree_desc *)(&(s->l_desc)));
-	Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
-		s->static_len));
-
-	build_tree(s, (tree_desc *)(&(s->d_desc)));
-	Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
-		s->static_len));
-	/* At this point, opt_len and static_len are the total bit lengths of
-	 * the compressed block data, excluding the tree representations.
-	 */
-
-	/* Build the bit length tree for the above two trees, and get the index
-	 * in bl_order of the last bit length code to send.
-	 */
-	max_blindex = build_bl_tree(s);
-
-	/* Determine the best encoding. Compute first the block length in bytes*/
-	opt_lenb = (s->opt_len+3+7)>>3;
-	static_lenb = (s->static_len+3+7)>>3;
-
-	Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
-		opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
-		s->last_lit));
-
-	if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
-    } else {
-        Assert(buf != (char*)0, "lost buf");
-	opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
-    }
-
-#ifdef FORCE_STORED
-    if (buf != (char*)0) { /* force stored block */
-#else
-    if (stored_len+4 <= opt_lenb && buf != (char*)0) {
-                       /* 4: two words for the lengths */
-#endif
-        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
-         * Otherwise we can't have processed more than WSIZE input bytes since
-         * the last block flush, because compression would have been
-         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
-         * transform a block into a stored block.
-         */
-        _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
-    } else if (static_lenb >= 0) { /* force static trees */
-#else
-    } else if (static_lenb == opt_lenb) {
-#endif
-        send_bits(s, (STATIC_TREES<<1)+eof, 3);
-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->static_len;
-#endif
-    } else {
-        send_bits(s, (DYN_TREES<<1)+eof, 3);
-        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
-                       max_blindex+1);
-        compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->opt_len;
-#endif
-    }
-    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-    /* The above check is made mod 2^32, for files larger than 512 MB
-     * and uLong implemented on 32 bits.
-     */
-    init_block(s);
-
-    if (eof) {
-        bi_windup(s);
-#ifdef DEBUG
-        s->compressed_len += 7;  /* align on byte boundary */
-#endif
-    }
-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*eof));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
-    deflate_state *s;
-    unsigned dist;  /* distance of matched string */
-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
-    s->d_buf[s->last_lit] = (ush)dist;
-    s->l_buf[s->last_lit++] = (uch)lc;
-    if (dist == 0) {
-        /* lc is the unmatched char */
-        s->dyn_ltree[lc].Freq++;
-    } else {
-        s->matches++;
-        /* Here, lc is the match length - MIN_MATCH */
-        dist--;             /* dist = match distance - 1 */
-        Assert((ush)dist < (ush)MAX_DIST(s) &&
-               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
-               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
-
-        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
-        s->dyn_dtree[d_code(dist)].Freq++;
-    }
-
-#ifdef TRUNCATE_BLOCK
-    /* Try to guess if it is profitable to stop the current block here */
-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
-        /* Compute an upper bound for the compressed length */
-        ulg out_length = (ulg)s->last_lit*8L;
-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
-        int dcode;
-        for (dcode = 0; dcode < D_CODES; dcode++) {
-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
-                (5L+extra_dbits[dcode]);
-        }
-        out_length >>= 3;
-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-               s->last_lit, in_length, out_length,
-               100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
-    }
-#endif
-    return (s->last_lit == s->lit_bufsize-1);
-    /* We avoid equality with lit_bufsize because of wraparound at 64K
-     * on 16 bit machines and because stored blocks are restricted to
-     * 64K-1 bytes.
-     */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
-    deflate_state *s;
-    ct_data *ltree; /* literal tree */
-    ct_data *dtree; /* distance tree */
-{
-    unsigned dist;      /* distance of matched string */
-    int lc;             /* match length or unmatched char (if dist == 0) */
-    unsigned lx = 0;    /* running index in l_buf */
-    unsigned code;      /* the code to send */
-    int extra;          /* number of extra bits to send */
-
-    if (s->last_lit != 0) do {
-        dist = s->d_buf[lx];
-        lc = s->l_buf[lx++];
-        if (dist == 0) {
-            send_code(s, lc, ltree); /* send a literal byte */
-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
-        } else {
-            /* Here, lc is the match length - MIN_MATCH */
-            code = _length_code[lc];
-            send_code(s, code+LITERALS+1, ltree); /* send the length code */
-            extra = extra_lbits[code];
-            if (extra != 0) {
-                lc -= base_length[code];
-                send_bits(s, lc, extra);       /* send the extra length bits */
-            }
-            dist--; /* dist is now the match distance - 1 */
-            code = d_code(dist);
-            Assert (code < D_CODES, "bad d_code");
-
-            send_code(s, code, dtree);       /* send the distance code */
-            extra = extra_dbits[code];
-            if (extra != 0) {
-                dist -= base_dist[code];
-                send_bits(s, dist, extra);   /* send the extra distance bits */
-            }
-        } /* literal or match pair ? */
-
-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
-        Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
-
-    } while (lx < s->last_lit);
-
-    send_code(s, END_BLOCK, ltree);
-    s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to ASCII or BINARY, using a crude approximation:
- * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise.
- * IN assertion: the fields freq of dyn_ltree are set and the total of all
- * frequencies does not exceed 64K (to fit in an int on 16 bit machines).
- */
-local void set_data_type(s)
-    deflate_state *s;
-{
-    int n = 0;
-    unsigned ascii_freq = 0;
-    unsigned bin_freq = 0;
-    while (n < 7)        bin_freq += s->dyn_ltree[n++].Freq;
-    while (n < 128)    ascii_freq += s->dyn_ltree[n++].Freq;
-    while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;
-    s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII);
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
-    unsigned code; /* the value to invert */
-    int len;       /* its bit length */
-{
-    register unsigned res = 0;
-    do {
-        res |= code & 1;
-        code >>= 1, res <<= 1;
-    } while (--len > 0);
-    return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
-    deflate_state *s;
-{
-    if (s->bi_valid == 16) {
-        put_short(s, s->bi_buf);
-        s->bi_buf = 0;
-        s->bi_valid = 0;
-    } else if (s->bi_valid >= 8) {
-        put_byte(s, (Byte)s->bi_buf);
-        s->bi_buf >>= 8;
-        s->bi_valid -= 8;
-    }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
-    deflate_state *s;
-{
-    if (s->bi_valid > 8) {
-        put_short(s, s->bi_buf);
-    } else if (s->bi_valid > 0) {
-        put_byte(s, (Byte)s->bi_buf);
-    }
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
-    deflate_state *s;
-    charf    *buf;    /* the input data */
-    unsigned len;     /* its length */
-    int      header;  /* true if block header must be written */
-{
-    bi_windup(s);        /* align on byte boundary */
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-
-    if (header) {
-        put_short(s, (ush)len);   
-        put_short(s, (ush)~len);
-#ifdef DEBUG
-        s->bits_sent += 2*16;
-#endif
-    }
-#ifdef DEBUG
-    s->bits_sent += (ulg)len<<3;
-#endif
-    while (len--) {
-        put_byte(s, *buf++);
-    }
-}
diff -uNrd ircd-hybrid-6.0/zlib/trees.h ircd-pi1.0a/zlib/trees.h
--- ircd-hybrid-6.0/zlib/trees.h	Tue Oct  6 00:51:29 1998
+++ ircd-pi1.0a/zlib/trees.h	Wed Dec 31 19:00:00 1969
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
diff -uNrd ircd-hybrid-6.0/zlib/uncompr.c ircd-pi1.0a/zlib/uncompr.c
--- ircd-hybrid-6.0/zlib/uncompr.c	Sat Oct 10 01:00:42 1998
+++ ircd-pi1.0a/zlib/uncompr.c	Wed Dec 31 19:00:00 1969
@@ -1,58 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: uncompr.c,v 1.2 1998/10/10 05:00:42 lusky Exp $ */
-
-#include "zlib.h"
-
-/* ===========================================================================
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-
-    err = inflateInit(&stream);
-    if (err != Z_OK) return err;
-
-    err = inflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        inflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = inflateEnd(&stream);
-    return err;
-}
diff -uNrd ircd-hybrid-6.0/zlib/zconf.h ircd-pi1.0a/zlib/zconf.h
--- ircd-hybrid-6.0/zlib/zconf.h	Sat Oct 10 01:00:42 1998
+++ ircd-pi1.0a/zlib/zconf.h	Wed Dec 31 19:00:00 1969
@@ -1,281 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: zconf.h,v 1.2 1998/10/10 05:00:42 lusky Exp $ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-#include "setup.h"	/* generated by ircd configure */
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_	z_deflateInit_
-#  define deflate	z_deflate
-#  define deflateEnd	z_deflateEnd
-#  define inflateInit_ 	z_inflateInit_
-#  define inflate	z_inflate
-#  define inflateEnd	z_inflateEnd
-#  define deflateInit2_	z_deflateInit2_
-#  define deflateSetDictionary z_deflateSetDictionary
-#  define deflateCopy	z_deflateCopy
-#  define deflateReset	z_deflateReset
-#  define deflateParams	z_deflateParams
-#  define inflateInit2_	z_inflateInit2_
-#  define inflateSetDictionary z_inflateSetDictionary
-#  define inflateSync	z_inflateSync
-#  define inflateSyncPoint z_inflateSyncPoint
-#  define inflateReset	z_inflateReset
-#  define compress	z_compress
-#  define compress2	z_compress2
-#  define uncompress	z_uncompress
-#  define adler32	z_adler32
-#  define crc32		z_crc32
-#  define get_crc_table z_get_crc_table
-
-#  define Byte		z_Byte
-#  define uInt		z_uInt
-#  define uLong		z_uLong
-#  define Bytef	        z_Bytef
-#  define charf		z_charf
-#  define intf		z_intf
-#  define uIntf		z_uIntf
-#  define uLongf	z_uLongf
-#  define voidpf	z_voidpf
-#  define voidp		z_voidp
-#endif
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-#  define WIN32
-#endif
-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
-#  ifndef __32BIT__
-#    define __32BIT__
-#  endif
-#endif
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#if defined(MSDOS) && !defined(__32BIT__)
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
-#  define STDC
-#endif
-#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
-#  ifndef STDC
-#    define STDC
-#  endif
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Old Borland C incorrectly complains about missing returns: */
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
-#  define NEED_DUMMY_RETURN
-#endif
-
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
-   /* MSC small or medium model */
-#  define SMALL_MEDIUM
-#  ifdef _MSC_VER
-#    define FAR _far
-#  else
-#    define FAR far
-#  endif
-#endif
-#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-#  ifndef __32BIT__
-#    define SMALL_MEDIUM
-#    define FAR _far
-#  endif
-#endif
-
-/* Compile with -DZLIB_DLL for Windows DLL support */
-#if defined(ZLIB_DLL)
-#  if defined(_WINDOWS) || defined(WINDOWS)
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-#    define ZEXPORT  WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA  WINAPIV
-#    else
-#      define ZEXPORTVA  FAR _cdecl _export
-#    endif
-#  endif
-#  if defined (__BORLANDC__)
-#    if (__BORLANDC__ >= 0x0500) && defined (WIN32)
-#      include <windows.h>
-#      define ZEXPORT __declspec(dllexport) WINAPI
-#      define ZEXPORTRVA __declspec(dllexport) WINAPIV
-#    else
-#      if defined (_Windows) && defined (__DLL__)
-#        define ZEXPORT _export
-#        define ZEXPORTVA _export
-#      endif
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  if defined (ZLIB_DLL)
-#    define ZEXTERN extern __declspec(dllexport)
-#  else
-#    define ZEXTERN extern __declspec(dllimport)
-#  endif
-#endif
-
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-
-#ifndef FAR
-#   define FAR
-#endif
-
-#if !defined(MACOS) && !defined(TARGET_OS_MAC)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void FAR *voidpf;
-   typedef void     *voidp;
-#else
-   typedef Byte FAR *voidpf;
-   typedef Byte     *voidp;
-#endif
-
-#ifdef HAVE_UNISTD_H
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  define z_off_t  off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define  z_off_t long
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(inflate_blocks,"INBL")
-#   pragma map(inflate_blocks_new,"INBLNE")
-#   pragma map(inflate_blocks_free,"INBLFR")
-#   pragma map(inflate_blocks_reset,"INBLRE")
-#   pragma map(inflate_codes_free,"INCOFR")
-#   pragma map(inflate_codes,"INCO")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_flush,"INFLU")
-#   pragma map(inflate_mask,"INMA")
-#   pragma map(inflate_set_dictionary,"INSEDI2")
-#   pragma map(inflate_copyright,"INCOPY")
-#   pragma map(inflate_trees_bits,"INTRBI")
-#   pragma map(inflate_trees_dynamic,"INTRDY")
-#   pragma map(inflate_trees_fixed,"INTRFI")
-#   pragma map(inflate_trees_free,"INTRFR")
-#endif
-
-#endif /* _ZCONF_H */
diff -uNrd ircd-hybrid-6.0/zlib/zlib.3 ircd-pi1.0a/zlib/zlib.3
--- ircd-hybrid-6.0/zlib/zlib.3	Sat Oct 10 01:00:43 1998
+++ ircd-pi1.0a/zlib/zlib.3	Wed Dec 31 19:00:00 1969
@@ -1,107 +0,0 @@
-.TH ZLIB 3 "9 July 1998"
-.SH NAME
-zlib \- compression/decompression library
-.SH SYNOPSIS
-[see
-.I zlib.h
-for full description]
-.SH DESCRIPTION
-The
-.I zlib
-library is a general purpose data compression library.
-The code is thread safe.
-It provides in-memory compression and decompression functions,
-including integrity checks of the uncompressed data.
-This version of the library supports only one compression method (deflation)
-but other algorithms will be added later and will have the same stream interface.
-.LP
-Compression can be done in a single step if the buffers are large enough
-(for example if an input file is mmap'ed),
-or can be done by repeated calls of the compression function.
-In the latter case,
-the application must provide more input and/or consume the output
-(providing more output space) before each call.
-.LP
-The library also supports reading and writing files in
-.I gzip
-(.gz) format
-with an interface similar to that of stdio.
-.LP
-The library does not install any signal handler. The decoder checks
-the consistency of the compressed data, so the library should never
-crash even in case of corrupted input.
-.LP
-All functions of the compression library are documented in the file
-.IR zlib.h.
-The distribution source includes examples of use of the library
-the files
-.I example.c
-and
-.IR minigzip.c .
-.LP
-A Java implementation of
-.IR zlib
-is available in the Java Development Kit 1.1
-.IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-.LP
-A Perl interface to
-.IR zlib ,
-written by Paul Marquess (pmarquess@bfsec.bt.co.uk)
-is available at CPAN (Comprehensive Perl Archive Network) sites,
-such as:
-.IP
-ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib*
-.LP
-A Python interface to
-.IR zlib
-written by A.M. Kuchling <amk@magnet.com>
-is available from the Python Software Association sites, such as:
-.IP
-ftp://ftp.python.org/pub/python/contrib/Encoding/zlib*.tar.gz
-.SH "SEE ALSO"
-Questions about zlib should be sent to:
-.IP
-zlib@quest.jpl.nasa.gov
-or, if this fails, to the author addresses given below.
-The zlib home page is:
-.IP
-http://www.cdrom.com/pub/infozip/zlib/
-.LP
-The data format used by the zlib library is described by RFC
-(Request for Comments) 1950 to 1952 in the files: 
-.IP
-ftp://ds.internic.net/rfc/rfc1950.txt (zlib format)
-.br
-rfc1951.txt (deflate format)
-.br
-rfc1952.txt (gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-.SH AUTHORS
-Version 1.1.3
-Copyright (C) 1995-1998 Jean-loup Gailly (jloup@gzip.org)
-and Mark Adler (madler@alumni.caltech.edu).
-.LP
-This software is provided "as-is,"
-without any express or implied warranty.
-In no event will the authors be held liable for any damages
-arising from the use of this software.
-See the distribution directory with respect to requirements
-governing redistribution.
-The deflate format used by
-.I zlib
-was defined by Phil Katz.
-The deflate and
-.I zlib
-specifications were written by L. Peter Deutsch.
-Thanks to all the people who reported problems and suggested various
-improvements in
-.IR zlib ;
-who are too numerous to cite here.
-.LP
-UNIX manual page by R. P. C. Rodgers,
-U.S. National Library of Medicine (rodgers@nlm.nih.gov).
-.\" end of man page
diff -uNrd ircd-hybrid-6.0/zlib/zlib.h ircd-pi1.0a/zlib/zlib.h
--- ircd-hybrid-6.0/zlib/zlib.h	Sat Oct 10 01:00:44 1998
+++ ircd-pi1.0a/zlib/zlib.h	Wed Dec 31 19:00:00 1969
@@ -1,893 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.1.3, July 9th, 1998
-
-  Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.1.3"
-
-/* 
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: ascii or binary */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_ASCII    1
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/* 
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  the compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out).
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-  
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  0.1% larger than avail_in plus 12 bytes.  If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update data_type if it can make a good guess about
-  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero).
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/* 
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may some
-  introduce some output latency (reading input without producing any output)
-  except when forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
-  output as possible to the output buffer. The flushing behavior of inflate is
-  not specified for values of the flush parameter other than Z_SYNC_FLUSH
-  and Z_FINISH, but the current implementation actually flushes as much output
-  as possible anyway.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster routine
-  may be used for the single inflate() call.
-
-     If a preset dictionary is needed at this point (see inflateSetDictionary
-  below), inflate sets strm-adler to the adler32 checksum of the
-  dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise 
-  it sets strm->adler to the adler32 checksum of all output produced
-  so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or
-  an error code as described below. At the end of the stream, inflate()
-  checks that its computed adler32 checksum is equal to that saved by the
-  compressor and returns Z_STREAM_END only if the checksum is correct.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect
-  adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent
-  (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not
-  enough memory, Z_BUF_ERROR if no progress is possible or if there was not
-  enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR
-  case, the application may then call inflateSync to look for a good
-  compression block.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*   
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match).  Filtered data consists mostly of small values with a
-   somewhat random distribution. In this case, the compression algorithm is
-   tuned to compress them better. The effect of Z_FILTERED is to force more
-   Huffman coding and less string matching; it is somewhat intermediate
-   between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
-   the compression ratio but not the correctness of the compressed output even
-   if it is not set appropriately.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-                            
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.
-
-     Upon return of this function, strm->adler is set to the Adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The Adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.)
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-				      int level,
-				      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-/*   
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. If a compressed stream with a larger window size is given as
-   input, inflate() will return with the error code Z_DATA_ERROR instead of
-   trying to allocate a larger window.
-
-      inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
-   memLevel). msg is set to null if there is no error message.  inflateInit2
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by inflate(). (So next_in and avail_in may be
-   modified, but next_out and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate
-   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the Adler32 value returned by this call of
-   inflate. The compressor and decompressor must use exactly the same
-   dictionary (see deflateSetDictionary).
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect Adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/* 
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least 0.1% larger than
-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h". (See the description
-   of deflateInit2 for more information about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file, 
-				   const voidp buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-				      z_off_t offset, int whence));
-/* 
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int err));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZLIB_H */
diff -uNrd ircd-hybrid-6.0/zlib/zutil.c ircd-pi1.0a/zlib/zutil.c
--- ircd-hybrid-6.0/zlib/zutil.c	Sat Oct 10 01:00:45 1998
+++ ircd-pi1.0a/zlib/zutil.c	Wed Dec 31 19:00:00 1969
@@ -1,225 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: zutil.c,v 1.2 1998/10/10 05:00:45 lusky Exp $ */
-
-#include "zutil.h"
-
-struct internal_state      {int dummy;}; /* for buggy compilers */
-
-#ifndef STDC
-extern void exit OF((int));
-#endif
-
-const char *z_errmsg[10] = {
-"need dictionary",     /* Z_NEED_DICT       2  */
-"stream end",          /* Z_STREAM_END      1  */
-"",                    /* Z_OK              0  */
-"file error",          /* Z_ERRNO         (-1) */
-"stream error",        /* Z_STREAM_ERROR  (-2) */
-"data error",          /* Z_DATA_ERROR    (-3) */
-"insufficient memory", /* Z_MEM_ERROR     (-4) */
-"buffer error",        /* Z_BUF_ERROR     (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
-    return ZLIB_VERSION;
-}
-
-#ifdef DEBUG
-
-#  ifndef verbose
-#    define verbose 0
-#  endif
-int z_verbose = verbose;
-
-void z_error (m)
-    char *m;
-{
-    fprintf(stderr, "%s\n", m);
-    exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
-    int err;
-{
-    return ERR_MSG(err);
-}
-
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
-    Bytef* dest;
-    const Bytef* source;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = *source++; /* ??? to be unrolled */
-    } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
-    const Bytef* s1;
-    const Bytef* s2;
-    uInt  len;
-{
-    uInt j;
-
-    for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
-    }
-    return 0;
-}
-
-void zmemzero(dest, len)
-    Bytef* dest;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = 0;  /* ??? to be unrolled */
-    } while (--len != 0);
-}
-#endif
-
-#ifdef __TURBOC__
-#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__)
-/* Small and medium model in Turbo C are for now limited to near allocation
- * with reduced MAX_WBITS and MAX_MEM_LEVEL
- */
-#  define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
-    voidpf org_ptr;
-    voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    voidpf buf = opaque; /* just to make some compilers happy */
-    ulg bsize = (ulg)items*size;
-
-    /* If we allocate less than 65520 bytes, we assume that farmalloc
-     * will return a usable pointer which doesn't have to be normalized.
-     */
-    if (bsize < 65520L) {
-        buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
-    } else {
-        buf = farmalloc(bsize + 16L);
-    }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
-    table[next_ptr].org_ptr = buf;
-
-    /* Normalize the pointer to seg:0 */
-    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
-    *(ush*)&buf = 0;
-    table[next_ptr++].new_ptr = buf;
-    return buf;
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    int n;
-    if (*(ush*)&ptr != 0) { /* object < 64K */
-        farfree(ptr);
-        return;
-    }
-    /* Find the original pointer */
-    for (n = 0; n < next_ptr; n++) {
-        if (ptr != table[n].new_ptr) continue;
-
-        farfree(table[n].org_ptr);
-        while (++n < next_ptr) {
-            table[n-1] = table[n];
-        }
-        next_ptr--;
-        return;
-    }
-    ptr = opaque; /* just to make some compilers happy */
-    Assert(0, "zcfree: ptr not found");
-}
-#endif
-#endif /* __TURBOC__ */
-
-
-#if defined(M_I86) && !defined(__32BIT__)
-/* Microsoft C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-#  define _halloc  halloc
-#  define _hfree   hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    return _halloc((long)items, size);
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    _hfree(ptr);
-}
-
-#endif /* MSC */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp  calloc OF((uInt items, uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
-    voidpf opaque;
-    unsigned items;
-    unsigned size;
-{
-    if (opaque) items += size - size; /* make compiler happy */
-    return (voidpf)calloc(items, size);
-}
-
-void  zcfree (opaque, ptr)
-    voidpf opaque;
-    voidpf ptr;
-{
-    free(ptr);
-    if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
diff -uNrd ircd-hybrid-6.0/zlib/zutil.h ircd-pi1.0a/zlib/zutil.h
--- ircd-hybrid-6.0/zlib/zutil.h	Sat Oct 10 01:00:46 1998
+++ ircd-pi1.0a/zlib/zutil.h	Wed Dec 31 19:00:00 1969
@@ -1,220 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 1.2 1998/10/10 05:00:46 lusky Exp $ */
-
-#ifndef _Z_UTIL_H
-#define _Z_UTIL_H
-
-#include "zlib.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#ifdef MSDOS
-#  define OS_CODE  0x00
-#  if defined(__TURBOC__) || defined(__BORLANDC__)
-#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-       /* Allow compilation with ANSI keywords only enabled */
-       void _Cdecl farfree( void *block );
-       void *_Cdecl farmalloc( unsigned long nbytes );
-#    else
-#     include <alloc.h>
-#    endif
-#  else /* MSC or DJGPP */
-#    include <malloc.h>
-#  endif
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#endif
-
-#ifdef WIN32 /* Window 95 & Windows NT */
-#  define OS_CODE  0x0b
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#    include <unix.h> /* for fdopen */
-#  else
-#    ifndef fdopen
-#      define fdopen(fd,mode) NULL /* No fdopen() */
-#    endif
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0F
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-#  define fdopen(fd,type)  _fdopen(fd,type)
-#endif
-
-
-        /* Common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#ifdef HAVE_STRERROR
-   extern char *strerror OF((int));
-#  define zstrerror(errnum) strerror(errnum)
-#else
-#  define zstrerror(errnum) ""
-#endif
-
-#if defined(pyr)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-   extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int z_verbose;
-   extern void z_error    OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-
-typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
-				       uInt len));
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void   zcfree  OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* _Z_UTIL_H */
