diff -uNrd ircd-hybrid-7.0rc9/ConfSetup.sh ircd-hybrid-7.0rc9+mpb-rm/ConfSetup.sh
--- ircd-hybrid-7.0rc9/ConfSetup.sh	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/ConfSetup.sh	Thu Feb 20 13:29:24 2003
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# ConfSetup.sh - Hybrid7+mpb - Michael P. Bramel
+# Sh script to generate a working configuraton
+# for ircd-hybrid7+mpb (prolly works for non+mpb too)
+#
+echo ""
+echo "ConfSetup - Hybrid configuration setup utility 0.01"
+echo "---------------------------------------------------"
+echo "This utility is incomplete and should not yet be used."
+echo ""
+
diff -uNrd ircd-hybrid-7.0rc9/OldSetup.sh ircd-hybrid-7.0rc9+mpb-rm/OldSetup.sh
--- ircd-hybrid-7.0rc9/OldSetup.sh	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/OldSetup.sh	Thu Feb 20 13:29:34 2003
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# OldSetup.sh - Michael P. Bramel - mbramel@fuse.net - Hybrid7+mpb
+# A very tiny script to prepare hybrid7+mpb versions beyond release I for old-style configuration.
+# The new Setup.sh script allows configuration and compiling via just one script, OldSetup.sh
+# simply prepares the files that aren't already in place for old-style.
+#
+echo ""
+echo "Old-style setup utility for Hybrid-7+mpb"
+echo ""
+while [ "$LOCATINGSOURCE" != "done" ]
+do
+  echo "Attempting to locate source files..."
+  if test -f doc/mpb.txt
+  then
+    SHOWPWD=`pwd`
+    echo "OldSetup has detected setup files in $SHOWPWD"
+    echo "OldSetup will install from this directory."
+    echo ""
+    INSTALLSOURCE=$SHOWPWD
+    LOCATINGSOURCE="done"
+  else
+    while [ "$ASKINGSOURCE" != "done" ]
+    do
+      echo "OldSetup was unable to locate the Hybrid7+Mpb source code on this system"
+      echo "please enter the directory to install from."
+      echo "Example: $HOME/ircd-hybrid-7rc6+mpb-ri"
+      read INSTALLSOURCEINPUT
+      if test -f $INSTALLSOURCEINPUT/doc/mpb.txt
+      then
+        echo "Source has been located in the directory specified:"
+        echo "$INSTALLSOURCEINPUT, installing from there."
+        echo ""
+        INSTALLSOURCE=$INSTALLSOURCEINPUT
+        cd $INSTALLSOURCE
+        LOCATINGSOURCE="done"
+        ASKINGSOURCE="done"
+      else
+        echo "The source code was not located in the directory specified."
+        echo ""
+      fi
+    done
+  fi  
+done
+if test -f include/config.h
+then
+  echo "include/config.h is already in place, to revert to"
+  echo "the original simply replace it with include/config.h.in"
+else
+  echo "Restoring default config.h"
+  cp include/config.h.dist include/config.h
+fi
+
+echo ""
+echo "Old-style setup utility completed, Hybrid7 us prepared for the old setup methods."
+echo ""
+
diff -uNrd ircd-hybrid-7.0rc9/Setup.sh ircd-hybrid-7.0rc9+mpb-rm/Setup.sh
--- ircd-hybrid-7.0rc9/Setup.sh	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/Setup.sh	Tue Apr 15 16:35:29 2003
@@ -0,0 +1,1934 @@
+#!/bin/sh
+#
+# Setup.sh, Hybrid7+mpb - Michael P. Bramel mbramel@fuse.net
+# This is the beginnings of my setup script. It will use the sh command interpreter.
+# In it's earliest stages it will be included with the hybrid mpb release, but will
+# not be listed as a feature until i'm satisfied that it's been completed.
+# For now be weary when you use it, as it may or may not work correctly.
+#
+# Step 1 - Gather precompile information from the user.
+# Here we get the variables required to pass to the configure command line
+# We also get some information to put our config.h together.
+#
+echo ""
+echo "Hybrid7+MPB Setup Utility version 1.01 Running."
+echo "------------------------------------------------------"
+echo "This lil program semi-automates several things. First"
+echo "and foremost it creates a config.h with options based"
+echo "on user input. It will also proceed through the configure"
+echo "make and make install steps. This file will obviously"
+echo "see a great deal of revision before +MPB's first major"
+echo "release, nevertheless it's a good start."
+echo ""
+echo "If you wish to use the old install method, and modify"
+echo "config.h, and run the building steps yourself, simply"
+echo "run the OldSetup.sh script. It will prepare the files"
+echo "for the old style of configuration and building Hybrid."
+echo ""
+echo "Preparing..."
+while [ "$LOCATINGSOURCE" != "done" ]
+do
+  echo "Attempting to locate source files..."
+  if test -f doc/mpb.txt
+  then
+    SHOWPWD=`pwd`
+    echo "Setup has detected setup files in $SHOWPWD"
+    echo "Setup will install from this directory."
+    echo ""
+    INSTALLSOURCE=$SHOWPWD
+    LOCATINGSOURCE="done"
+  else
+    while [ "$ASKINGSOURCE" != "done" ]
+    do
+      echo "Setup was unable to locate the Hybrid7+Mpb source code on this system"
+      echo "please enter the directory to install from."
+      echo "Example: $HOME/ircd-hybrid-7rc6+mpb-ri"
+      read INSTALLSOURCEINPUT
+      if test -f $INSTALLSOURCEINPUT/doc/mpb.txt
+      then
+        echo "Source has been located in the directory specified:"
+        echo "$INSTALLSOURCEINPUT, installing from there."
+        echo ""
+        INSTALLSOURCE=$INSTALLSOURCEINPUT
+        cd $INSTALLSOURCE
+        LOCATINGSOURCE="done"
+        ASKINGSOURCE="done"
+      else
+        echo "The source code was not located in the directory specified."
+        echo ""
+      fi
+    done
+  fi
+done
+echo "Cleaning up..."
+if test -f include/config.h
+then
+  echo "Setup has detected the existance of config.h, removing."
+  rm -f include/config.h
+fi
+if test -f Makefile
+then
+  echo "Setup has detected the existance of Makefile, removing."
+  rm -f Makefile
+fi
+if test -f src/Makefile
+then
+  echo "Setup has detected the existance of src/Makefile, removing."
+  rm -f src/Makefile
+fi
+if test -f tools/Makefile
+then
+  echo "Setup has detected the existance of tools/Makefile, removing."
+  rm -f tools/Makefile
+fi
+if test -f servlink/Makefile
+then
+  echo "Setup has detected the existance of servlink/Makefile, removing."
+  rm -f servlink/Makefile
+fi
+if test -f modules/Makefile
+then
+  echo "Setup has detected the existance of modules/Makefile, removing."
+  rm -f modules/Makefile
+fi
+if test -f messages/Makefile
+then
+  echo "Setup has detected the existance of messages/Makefile, removing."
+  rm -f messages/Makefile
+fi
+if test -f include/Makefile
+then
+  echo "Setup has detected the existance of include/Makefile, removing."
+  rm -f include/Makefile
+fi
+if test -f iauth/Makefile
+then
+  echo "Setup has detected the existance of iauth/Makefile, removing."
+  rm -f iauth/Makefile
+fi
+if test -f iauth/source/Makefile
+then
+  echo "Setup has detected the existance of iauth/source/Makefile, removing."
+  rm -f iauth/source/Makefile
+fi
+if test -f help/Makefile
+then
+  echo "Setup has detected the existance of help/Makefile, removing."
+  rm -f help/Makefile
+fi
+if test -f doc/Makefile
+then
+  echo "Setup has detected the existance of doc/Makefile, removing."
+  rm -f doc/Makefile
+fi
+if test -f contrib/Makefile
+then
+  echo "Setup has detected the existance of contrib/Makefile, removing."
+  rm -f contrib/Makefile
+fi
+if test -f adns/Makefile
+then
+  echo "Setup has detected the existance of adns/Makefile, removing."
+  rm -f adns/Makefile
+fi
+echo ""
+echo "Compile time configuration setup started."
+echo ""
+while [ "$HYBRIDPATHSET" != "yes" ]
+do
+  while [ "$HYBRIDPATHVALID" != "yes" ]
+  do
+    echo "Please enter the path to install Hybrid7+mpb to:"
+    echo "Be warned, at the current time this program does not"
+    echo "check the validity of the requested path, so take"
+    echo "extra care when setting this variable."
+    echo "Default: /usr/local/ircd"
+    read HYBRIDPATH
+    if [ "$HYBRIDPATH" = "" ]
+    then
+      echo "No path specified, defaulting to /usr/local/ircd"
+      HYBRIDPATH="/usr/local/ircd"
+    fi
+    echo ""
+    echo "You have selected $HYBRIDPATH as your installation target, is this correct? y or n:"
+    read HYBRIDPATHCONFIRM
+    case $HYBRIDPATHCONFIRM in
+      y) echo "Will install to $HYBRIDPATH";
+         HYBRIDPATHSET="yes";
+         HYBRIDPATHVALID="yes";;
+      Y) echo "Will install to $HYBRIDPATH";
+         HYBRIDPATHSET="yes";
+         HYBRIDPATHVALID="yes";;
+      yes) echo "Will install to $HYBRIDPATH";
+           HYBRIDPATHSET="yes";
+           HYBRIDPATHVALID="yes";;
+      Yes) echo "Will install to $HYBRIDPATH";
+           HYBRIDPATHSET="yes";
+           HYBRIDPATHVALID="yes";;
+      YES) echo "Will install to $HYBRIDPATH";
+           HYBRIDPATHSET="yes";
+           HYBRIDPATHVALID="yes";;
+      n) echo "";;
+      N) echo "";;
+      no) echo "";;
+      No) echo "";;
+      NO) echo "";;
+      *) echo "Invalid Selection: Please enter y to confirm, or n to decline.";
+         echo "";;   
+    esac
+  done
+done
+
+while [ "$MAXIMUMCLIENTSSET" != "yes" ]
+do
+  while [ "$MAXIMUMCLIENTSVALID" != "yes" ]
+  do
+    echo ""
+    echo "Please enter the maximum number of concurrent connections this server should support:"
+    read MAXIMUMCLIENTS
+    echo $MAXIMUMCLIENTS | grep -v [0-9] > /dev/null 2>&1
+    if [ "$?" -eq "0" ]; then
+      echo "Invalid answer, MAXCLIENTS requires you to use a numeric response."
+    else
+      echo "You have elected to support up to $MAXIMUMCLIENTS clients, is this correct? y or n:"
+      read MAXIMUMCLIENTSCONFIRM
+      case $MAXIMUMCLIENTSCONFIRM in
+        y) echo "Will compile for $MAXIMUMCLIENTS clients."; 
+           MAXIMUMCLIENTSSET="yes";
+           MAXIMUMCLIENTSVALID="yes";;
+        Y) echo "Will compile for $MAXIMUMCLIENTS clients.";
+           MAXIMUMCLIENTSSET="yes";
+           MAXIMUMCLIENTSVALID="yes";;
+        yes) echo "Will compile for $MAXIMUMCLIENTS clients.";
+             MAXIMUMCLIENTSSET="yes";
+             MAXIMUMCLIENTSVALID="yes";;
+        Yes) echo "Will compile for $MAXIMUMCLIENTS clients.";
+             MAXIMUMCLIENTSSET="yes";
+             MAXIMUMCLIENTSVALID="yes";;
+        YES) echo "Will compile for $MAXIMUMCLIENTS clients.";
+             MAXIMUMCLIENTSSET="yes";
+             MAXIMUMCLIENTSVALID="yes";;
+        n) echo "";;
+        N) echo "";;
+        no) echo "";;
+        No) echo "";;
+        NO) echo "";;
+        *) echo "Invalid Selection: Please enter y to confirm, or n to decline.";
+           echo "";;
+      esac
+    fi
+  done
+done
+echo ""
+echo "Hybrid7 Configuratoin Section"
+while [ "$WANT_GETTEXTSET" != "yes" ]
+do
+  echo ""
+  echo "Enable WANT_GETTEXT?"
+  echo "Toggle gettext support. NOTE: if configure"
+  echo "doesn't detect gettext, this won't do anything."
+  echo "Default: Enabled"
+  read WANT_GETTEXTCONFIRM
+  if [ "$WANT_GETTEXTCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    WANT_GETTEXTCONFIRM="yes"
+  fi
+  case $WANT_GETTEXTCONFIRM in
+    y) echo "WANT_GETTEXT will be enabled.";
+       WANT_GETTEXTENABLE="Enabled";
+       WANT_GETTEXTSET="yes";;
+    Y) echo "WANT_GETTEXT will be enabled.";
+       WANT_GETTEXTENABLE="Enabled";
+       WANT_GETTEXTSET="yes";;
+    yes) echo "WANT_GETTEXT will be enabled.";
+       WANT_GETTEXTENABLE="Enabled";
+       WANT_GETTEXTSET="yes";;
+    Yes) echo "WANT_GETTEXT will be enabled.";
+       WANT_GETTEXTENABLE="Enabled";
+       WANT_GETTEXTSET="yes";;
+    YES) echo "WANT_GETTEXT will be enabled.";
+       WANT_GETTEXTENABLE="Enabled";
+       WANT_GETTEXTSET="yes";;
+    n) echo "WANT_GETTEXT will be disabled.";
+       WANT_GETTEXTENABLE="Disabled";
+       WANT_GETTEXTSET="yes";;
+    N) echo "WANT_GETTEXT will be disabled.";
+       WANT_GETTEXTENABLE="Disabled";
+       WANT_GETTEXTSET="yes";;
+    no) echo "WANT_GETTEXT will be disabled.";
+       WANT_GETTEXTENABLE="Disabled";
+       WANT_GETTEXTSET="yes";;
+    No) echo "WANT_GETTEXT will be disabled.";
+       WANT_GETTEXTENABLE="Disabled";
+       WANT_GETTEXTSET="yes";;
+    NO) echo "WANT_GETTEXT will be disabled.";
+       WANT_GETTEXTENABLE="Disabled";
+       WANT_GETTEXTSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$IGNORE_BOGUS_TSSET" != "yes" ]
+do
+  echo ""
+  echo "Enable IGNORE_BOGUS_TS?"
+  echo "Ignore bogus timestamps from other servers."
+  echo "Yes this will desync the network, but it will"
+  echo "allow chanops to resync with a valid non TS 0"
+  echo "This should be enabled network wide,"
+  echo "or not at all.  Default: Disabled"
+  read IGNORE_BOGUS_TSCONFIRM
+  if [ "$IGNORE_BOGUS_TSCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Disabled"
+    IGNORE_BOGUS_TSCONFIRM="no"
+  fi
+  case $IGNORE_BOGUS_TSCONFIRM in
+    y) echo "IGNORE_BOGUS_TS will be enabled.";
+       IGNORE_BOGUS_TSENABLE="Enabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    Y) echo "IGNORE_BOGUS_TS will be enabled.";
+       IGNORE_BOGUS_TSENABLE="Enabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    yes) echo "IGNORE_BOGUS_TS will be enabled.";
+       IGNORE_BOGUS_TSENABLE="Enabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    Yes) echo "IGNORE_BOGUS_TS will be enabled.";
+       IGNORE_BOGUS_TSENABLE="Enabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    YES) echo "IGNORE_BOGUS_TS will be enabled.";
+       IGNORE_BOGUS_TSENABLE="Enabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    n) echo "IGNORE_BOGUS_TS will be disabled.";
+       IGNORE_BOGUS_TSENABLE="Disabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    N) echo "IGNORE_BOGUS_TS will be disabled.";
+       IGNORE_BOGUS_TSENABLE="Disabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    no) echo "IGNORE_BOGUS_TS will be disabled.";
+       IGNORE_BOGUS_TSENABLE="Disabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    No) echo "IGNORE_BOGUS_TS will be disabled.";
+       IGNORE_BOGUS_TSENABLE="Disabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    NO) echo "IGNORE_BOGUS_TS will be disabled.";
+       IGNORE_BOGUS_TSENABLE="Disabled";
+       IGNORE_BOGUS_TSSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$HIDE_SERVERS_IPSSET" != "yes" ]
+do
+  echo ""
+  echo "Enable HIDE_SERVERS_IPS?"
+  echo "If this is undefined, opers will be unable to see servers ips"
+  echo "and will be shown a masked ip, admins will be shown the real ip."
+  echo "If this is defined, nobody can see a servers ip.  *This is a"
+  echo "kludge*, it has the side effect of hiding the ips everywhere,"
+  echo "including logfiles. We recommend you leave this undefined, and just"
+  echo "take care with who you give admin=yes; to."
+  echo "Default: Disabled"
+  read HIDE_SERVERS_IPSCONFIRM
+  if [ "$HIDE_SERVERS_IPSCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Disabled"
+    HIDE_SERVERS_IPSCONFIRM="no"
+  fi
+  case $HIDE_SERVERS_IPSCONFIRM in
+    y) echo "HIDE_SERVERS_IPS will be enabled.";
+       HIDE_SERVERS_IPSENABLE="Enabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    Y) echo "HIDE_SERVERS_IPS will be enabled.";
+       HIDE_SERVERS_IPSENABLE="Enabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    yes) echo "HIDE_SERVERS_IPS will be enabled.";
+       HIDE_SERVERS_IPSENABLE="Enabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    Yes) echo "HIDE_SERVERS_IPS will be enabled.";
+       HIDE_SERVERS_IPSENABLE="Enabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    YES) echo "HIDE_SERVERS_IPS will be enabled.";
+       HIDE_SERVERS_IPSENABLE="Enabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    n) echo "HIDE_SERVERS_IPS will be disabled.";
+       HIDE_SERVERS_IPSENABLE="Disabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    N) echo "HIDE_SERVERS_IPS will be disabled.";
+       HIDE_SERVERS_IPSENABLE="Disabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    no) echo "HIDE_SERVERS_IPS will be disabled.";
+       HIDE_SERVERS_IPSENABLE="Disabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    No) echo "HIDE_SERVERS_IPS will be disabled.";
+       HIDE_SERVERS_IPSENABLE="Disabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    NO) echo "HIDE_SERVERS_IPS will be disabled.";
+       HIDE_SERVERS_IPSENABLE="Disabled";
+       HIDE_SERVERS_IPSSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$HIDE_SPOOF_IPSSET" != "yes" ]
+do
+  echo ""
+  echo "Enable HIDE_SPOOF_IPS?"
+  echo "If this is undefined, opers will be allowed to see"
+  echo "the real IP of spoofed users in /trace etc.  If this"
+  echo "is defined they will be shown a masked IP."
+  echo "Default: Disabled"
+  read HIDE_SPOOF_IPSCONFIRM
+  if [ "$HIDE_SPOOF_IPSCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Disabled"
+    HIDE_SPOOF_IPSCONFIRM="no"
+  fi
+  case $HIDE_SPOOF_IPSCONFIRM in
+    y) echo "HIDE_SPOOF_IPS will be enabled.";
+       HIDE_SPOOF_IPSENABLE="Enabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    Y) echo "HIDE_SPOOF_IPS will be enabled.";
+       HIDE_SPOOF_IPSENABLE="Enabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    yes) echo "HIDE_SPOOF_IPS will be enabled.";
+       HIDE_SPOOF_IPSENABLE="Enabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    Yes) echo "HIDE_SPOOF_IPS will be enabled.";
+       HIDE_SPOOF_IPSENABLE="Enabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    YES) echo "HIDE_SPOOF_IPS will be enabled.";
+       HIDE_SPOOF_IPSENABLE="Enabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    n) echo "HIDE_SPOOF_IPS will be disabled.";
+       HIDE_SPOOF_IPSENABLE="Disabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    N) echo "HIDE_SPOOF_IPS will be disabled.";
+       HIDE_SPOOF_IPSENABLE="Disabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    no) echo "HIDE_SPOOF_IPS will be disabled.";
+       HIDE_SPOOF_IPSENABLE="Disabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    No) echo "HIDE_SPOOF_IPS will be disabled.";
+       HIDE_SPOOF_IPSENABLE="Disabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    NO) echo "HIDE_SPOOF_IPS will be disabled.";
+       HIDE_SPOOF_IPSENABLE="Disabled";
+       HIDE_SPOOF_IPSSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$TS5_ONLYSET" != "yes" ]
+do
+  echo ""
+  echo "Enable TS5_ONLY?"
+  echo "If this is defined only TS5 servers may link to the"
+  echo "network.  See doc/ts5.txt for more information.  If"
+  echo "your network has old servers (hyb5, hyb6.0, +CSr) or"
+  echo "hybserv you should NOT define this."
+  echo "Default: Disabled"
+  read TS5_ONLYCONFIRM
+  if [ "$TS5_ONLYCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Disabled"
+    TS5_ONLYCONFIRM="no"
+  fi
+  case $TS5_ONLYCONFIRM in
+    y) echo "TS5_ONLY will be enabled.";
+       TS5_ONLYENABLE="Enabled";
+       TS5_ONLYSET="yes";;
+    Y) echo "TS5_ONLY will be enabled.";
+       TS5_ONLYENABLE="Enabled";
+       TS5_ONLYSET="yes";;
+    yes) echo "TS5_ONLY will be enabled.";
+       TS5_ONLYENABLE="Enabled";
+       TS5_ONLYSET="yes";;
+    Yes) echo "TS5_ONLY will be enabled.";
+       TS5_ONLYENABLE="Enabled";
+       TS5_ONLYSET="yes";;
+    YES) echo "TS5_ONLY will be enabled.";
+       TS5_ONLYENABLE="Enabled";
+       TS5_ONLYSET="yes";;
+    n) echo "TS5_ONLY will be disabled.";
+       TS5_ONLYENABLE="Disabled";
+       TS5_ONLYSET="yes";;
+    N) echo "TS5_ONLY will be disabled.";
+       TS5_ONLYENABLE="Disabled";
+       TS5_ONLYSET="yes";;
+    no) echo "TS5_ONLY will be disabled.";
+       TS5_ONLYENABLE="Disabled";
+       TS5_ONLYSET="yes";;
+    No) echo "TS5_ONLY will be disabled.";
+       TS5_ONLYENABLE="Disabled";
+       TS5_ONLYSET="yes";;
+    NO) echo "TS5_ONLY will be disabled.";
+       TS5_ONLYENABLE="Disabled";
+       TS5_ONLYSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$USE_LOGFILESET" != "yes" ]
+do
+  echo ""
+  echo "Enable USE_LOGFILE?"
+  echo "log errors and such to syslog() If you wish to have"
+  echo "the server send 'vital' messages about server through"
+  echo "syslog, define USE_SYSLOG. Only system errors and events" 
+  echo "critical to the server are logged although if this is"
+  echo "defined with FNAME_USERLOG, syslog() is used instead of"
+  echo "the above file. It is not recommended that this option is" 
+  echo "used unless you tell the system administrator beforehand"
+  echo "and obtain their permission to send messages to the"
+  echo "system log files.  Default: Enabled"
+  read USE_LOGFILECONFIRM
+  if [ "$USE_LOGFILECONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    USE_LOGFILECONFIRM="yes"
+  fi
+  case $USE_LOGFILECONFIRM in
+    y) echo "USE_LOGFILE will be enabled.";
+       USE_LOGFILEENABLE="Enabled";
+       USE_LOGFILESET="yes";;
+    Y) echo "USE_LOGFILE will be enabled.";
+       USE_LOGFILEENABLE="Enabled";
+       USE_LOGFILESET="yes";;
+    yes) echo "USE_LOGFILE will be enabled.";
+       USE_LOGFILEENABLE="Enabled";
+       USE_LOGFILESET="yes";;
+    Yes) echo "USE_LOGFILE will be enabled.";
+       USE_LOGFILEENABLE="Enabled";
+       USE_LOGFILESET="yes";;
+    YES) echo "USE_LOGFILE will be enabled.";
+       USE_LOGFILEENABLE="Enabled";
+       USE_LOGFILESET="yes";;
+    n) echo "USE_LOGFILE will be disabled.";
+       USE_LOGFILEENABLE="Disabled";
+       USE_LOGFILESET="yes";;
+    N) echo "USE_LOGFILE will be disabled.";
+       USE_LOGFILEENABLE="Disabled";
+       USE_LOGFILESET="yes";;
+    no) echo "USE_LOGFILE will be disabled.";
+       USE_LOGFILEENABLE="Disabled";
+       USE_LOGFILESET="yes";;
+    No) echo "USE_LOGFILE will be disabled.";
+       USE_LOGFILEENABLE="Disabled";
+       USE_LOGFILESET="yes";;
+    NO) echo "USE_LOGFILE will be disabled.";
+       USE_LOGFILEENABLE="Disabled";
+       USE_LOGFILESET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$USE_SYSLOGSET" != "yes" ]
+do
+  echo ""
+  echo "Enable USE_SYSLOG?"
+  echo "log errors and such to syslog() If you wish to have"
+  echo "the server send 'vital' messages about server through"
+  echo "syslog, define USE_SYSLOG. Only system errors and events"
+  echo "critical to the server are logged although if this is"
+  echo "defined with FNAME_USERLOG, syslog() is used instead of"
+  echo "the above file. It is not recommended that this option is" 
+  echo "used unless you tell the system administrator beforehand"
+  echo "and obtain their permission to send messages to the system"
+  echo "log files.  Default: Disabled."
+  read USE_SYSLOGCONFIRM
+  if [ "$USE_SYSLOGCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Disabled"
+    USE_SYSLOGCONFIRM="no"
+  fi
+  case $USE_SYSLOGCONFIRM in
+    y) echo "USE_SYSLOG will be enabled.";
+       USE_SYSLOGENABLE="Enabled";
+       USE_SYSLOGSET="yes";;
+    Y) echo "USE_SYSLOG will be enabled.";
+       USE_SYSLOGENABLE="Enabled";
+       USE_SYSLOGSET="yes";;
+    yes) echo "USE_SYSLOG will be enabled.";
+       USE_SYSLOGENABLE="Enabled";
+       USE_SYSLOGSET="yes";;
+    Yes) echo "USE_SYSLOG will be enabled.";
+       USE_SYSLOGENABLE="Enabled";
+       USE_SYSLOGSET="yes";;
+    YES) echo "USE_SYSLOG will be enabled.";
+       USE_SYSLOGENABLE="Enabled";
+       USE_SYSLOGSET="yes";;
+    n) echo "USE_SYSLOG will be disabled.";
+       USE_SYSLOGENABLE="Disabled";
+       USE_SYSLOGSET="yes";;
+    N) echo "USE_SYSLOG will be disabled.";
+       USE_SYSLOGENABLE="Disabled";
+       USE_SYSLOGSET="yes";;
+    no) echo "USE_SYSLOG will be disabled.";
+       USE_SYSLOGENABLE="Disabled";
+       USE_SYSLOGSET="yes";;
+    No) echo "USE_SYSLOG will be disabled.";
+       USE_SYSLOGENABLE="Disabled";
+       USE_SYSLOGSET="yes";;
+    NO) echo "USE_SYSLOG will be disabled.";
+       USE_SYSLOGENABLE="Disabled";
+       USE_SYSLOGSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+if [ "$USE_SYSLOGENABLE" = "Enabled" ]
+then
+  while [ "$SYSLOG_KILLSET" != "yes" ]
+  do
+    echo ""
+    echo "Enable SYSLOG_KILL?"
+    echo "Log all operator kills to syslog."
+    echo "Default: Disabled"
+    read SYSLOG_KILLCONFIRM
+    if [ "$SYSLOG_KILLCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Disabled"
+      SYSLOG_KILLCONFIRM="no"
+    fi
+    case $SYSLOG_KILLCONFIRM in
+      y) echo "SYSLOG_KILL will be enabled.";
+         SYSLOG_KILLENABLE="Enabled";
+         SYSLOG_KILLSET="yes";;
+      Y) echo "SYSLOG_KILL will be enabled.";
+         SYSLOG_KILLENABLE="Enabled";
+         SYSLOG_KILLSET="yes";;
+      yes) echo "SYSLOG_KILL will be enabled.";
+         SYSLOG_KILLENABLE="Enabled";
+         SYSLOG_KILLSET="yes";;
+      Yes) echo "SYSLOG_KILL will be enabled.";
+         SYSLOG_KILLENABLE="Enabled";
+         SYSLOG_KILLSET="yes";;
+      YES) echo "SYSLOG_KILL will be enabled.";
+         SYSLOG_KILLENABLE="Enabled";
+         SYSLOG_KILLSET="yes";;
+      n) echo "SYSLOG_KILL will be disabled.";
+         SYSLOG_KILLENABLE="Disabled";
+         SYSLOG_KILLSET="yes";;
+      N) echo "SYSLOG_KILL will be disabled.";
+         SYSLOG_KILLENABLE="Disabled";
+         SYSLOG_KILLSET="yes";;
+      no) echo "SYSLOG_KILL will be disabled.";
+         SYSLOG_KILLENABLE="Disabled";
+         SYSLOG_KILLSET="yes";;
+      No) echo "SYSLOG_KILL will be disabled.";
+         SYSLOG_KILLENABLE="Disabled";
+         SYSLOG_KILLSET="yes";;
+      NO) echo "SYSLOG_KILL will be disabled.";
+         SYSLOG_KILLENABLE="Disabled";
+         SYSLOG_KILLSET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+  while [ "$SYSLOG_SQUITSET" != "yes" ]
+  do
+    echo ""
+    echo "Enable SYSLOG_SQUIT?"
+    echo "Log all remote squits for all servers to syslog."
+    echo "Default: Disabled"
+    read SYSLOG_SQUITCONFIRM
+    if [ "$SYSLOG_SQUITCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Disabled"
+      SYSLOG_SQUITCONFIRM="no"
+    fi
+    case $SYSLOG_SQUITCONFIRM in
+      y) echo "SYSLOG_SQUIT will be enabled.";
+         SYSLOG_SQUITENABLE="Enabled";
+         SYSLOG_SQUITSET="yes";;
+      Y) echo "SYSLOG_SQUIT will be enabled.";
+         SYSLOG_SQUITENABLE="Enabled";
+         SYSLOG_SQUITSET="yes";;
+      yes) echo "SYSLOG_SQUIT will be enabled.";
+         SYSLOG_SQUITENABLE="Enabled";
+         SYSLOG_SQUITSET="yes";;
+      Yes) echo "SYSLOG_SQUIT will be enabled.";
+         SYSLOG_SQUITENABLE="Enabled";
+         SYSLOG_SQUITSET="yes";;
+      YES) echo "SYSLOG_SQUIT will be enabled.";
+         SYSLOG_SQUITENABLE="Enabled";
+         SYSLOG_SQUITSET="yes";;
+      n) echo "SYSLOG_SQUIT will be disabled.";
+         SYSLOG_SQUITENABLE="Disabled";
+         SYSLOG_SQUITSET="yes";;
+      N) echo "SYSLOG_SQUIT will be disabled.";
+         SYSLOG_SQUITENABLE="Disabled";
+         SYSLOG_SQUITSET="yes";;
+      no) echo "SYSLOG_SQUIT will be disabled.";
+         SYSLOG_SQUITENABLE="Disabled";
+         SYSLOG_SQUITSET="yes";;
+      No) echo "SYSLOG_SQUIT will be disabled.";
+         SYSLOG_SQUITENABLE="Disabled";
+         SYSLOG_SQUITSET="yes";;
+      NO) echo "SYSLOG_SQUIT will be disabled.";
+         SYSLOG_SQUITENABLE="Disabled";
+         SYSLOG_SQUITSET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+  while [ "$SYSLOG_CONNECTSET" != "yes" ]
+  do
+    echo ""
+    echo "Enable SYSLOG_CONNECT?"
+    echo "Log remote connect messages for other all servs"
+    echo "Default: Disabled"
+    read SYSLOG_CONNECTCONFIRM
+    if [ "$SYSLOG_CONNECTCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Disabled"
+      SYSLOG_CONNECTCONFIRM="no"
+    fi
+    case $SYSLOG_CONNECTCONFIRM in
+      y) echo "SYSLOG_CONNECT will be enabled.";
+         SYSLOG_CONNECTENABLE="Enabled";
+         SYSLOG_CONNECTSET="yes";;
+      Y) echo "SYSLOG_CONNECT will be enabled.";
+         SYSLOG_CONNECTENABLE="Enabled";
+         SYSLOG_CONNECTSET="yes";;
+      yes) echo "SYSLOG_CONNECT will be enabled.";
+         SYSLOG_CONNECTENABLE="Enabled";
+         SYSLOG_CONNECTSET="yes";;
+      Yes) echo "SYSLOG_CONNECT will be enabled.";
+         SYSLOG_CONNECTENABLE="Enabled";
+         SYSLOG_CONNECTSET="yes";;
+      YES) echo "SYSLOG_CONNECT will be enabled.";
+         SYSLOG_CONNECTENABLE="Enabled";
+         SYSLOG_CONNECTSET="yes";;
+      n) echo "SYSLOG_CONNECT will be disabled.";
+         SYSLOG_CONNECTENABLE="Disabled";
+         SYSLOG_CONNECTSET="yes";;
+      N) echo "SYSLOG_CONNECT will be disabled.";
+         SYSLOG_CONNECTENABLE="Disabled";
+         SYSLOG_CONNECTSET="yes";;
+      no) echo "SYSLOG_CONNECT will be disabled.";
+         SYSLOG_CONNECTENABLE="Disabled";
+         SYSLOG_CONNECTSET="yes";;
+      No) echo "SYSLOG_CONNECT will be disabled.";
+         SYSLOG_CONNECTENABLE="Disabled";
+         SYSLOG_CONNECTSET="yes";;
+      NO) echo "SYSLOG_CONNECT will be disabled.";
+         SYSLOG_CONNECTENABLE="Disabled";
+         SYSLOG_CONNECTSET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+  while [ "$SYSLOG_USERSSET" != "yes" ]
+  do
+    echo ""
+    echo "Enable SYSLOG_USERS?"
+    echo "Send userlog stuff to syslog"
+    echo "Default: Disabled"
+    read SYSLOG_USERSCONFIRM
+    if [ "$SYSLOG_USERSCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Disabled"
+      SYSLOG_USERSCONFIRM="no"
+    fi
+    case $SYSLOG_USERSCONFIRM in
+      y) echo "SYSLOG_USERS will be enabled.";
+         SYSLOG_USERSENABLE="Enabled";
+         SYSLOG_USERSSET="yes";;
+      Y) echo "SYSLOG_USERS will be enabled.";
+         SYSLOG_USERSENABLE="Enabled";
+         SYSLOG_USERSSET="yes";;
+      yes) echo "SYSLOG_USERS will be enabled.";
+         SYSLOG_USERSENABLE="Enabled";
+         SYSLOG_USERSSET="yes";;
+      Yes) echo "SYSLOG_USERS will be enabled.";
+         SYSLOG_USERSENABLE="Enabled";
+         SYSLOG_USERSSET="yes";;
+      YES) echo "SYSLOG_USERS will be enabled.";
+         SYSLOG_USERSENABLE="Enabled";
+         SYSLOG_USERSSET="yes";;
+      n) echo "SYSLOG_USERS will be disabled.";
+         SYSLOG_USERSENABLE="Disabled";
+         SYSLOG_USERSSET="yes";;
+      N) echo "SYSLOG_USERS will be disabled.";
+         SYSLOG_USERSENABLE="Disabled";
+         SYSLOG_USERSSET="yes";;
+      no) echo "SYSLOG_USERS will be disabled.";
+         SYSLOG_USERSENABLE="Disabled";
+         SYSLOG_USERSSET="yes";;
+      No) echo "SYSLOG_USERS will be disabled.";
+         SYSLOG_USERSENABLE="Disabled";
+         SYSLOG_USERSSET="yes";;
+      NO) echo "SYSLOG_USERS will be disabled.";
+         SYSLOG_USERSENABLE="Disabled";
+         SYSLOG_USERSSET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+  while [ "$SYSLOG_OPERSET" != "yes" ]
+  do
+    echo ""
+    echo "Enable SYSLOG_OPER?"
+    echo "Log all users who successfully become an Op"
+    echo "Default: Disabled"
+    read SYSLOG_OPERCONFIRM
+    if [ "$SYSLOG_OPERCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Disabled"
+      SYSLOG_OPERCONFIRM="no"
+    fi
+    case $SYSLOG_OPERCONFIRM in
+      y) echo "SYSLOG_OPER will be enabled.";
+         SYSLOG_OPERENABLE="Enabled";
+         SYSLOG_OPERSET="yes";;
+      Y) echo "SYSLOG_OPER will be enabled.";
+         SYSLOG_OPERENABLE="Enabled";
+         SYSLOG_OPERSET="yes";;
+      yes) echo "SYSLOG_OPER will be enabled.";
+         SYSLOG_OPERENABLE="Enabled";
+         SYSLOG_OPERSET="yes";;
+      Yes) echo "SYSLOG_OPER will be enabled.";
+         SYSLOG_OPERENABLE="Enabled";
+         SYSLOG_OPERSET="yes";;
+      YES) echo "SYSLOG_OPER will be enabled.";
+         SYSLOG_OPERENABLE="Enabled";
+         SYSLOG_OPERSET="yes";;
+      n) echo "SYSLOG_OPER will be disabled.";
+         SYSLOG_OPERENABLE="Disabled";
+         SYSLOG_OPERSET="yes";;
+      N) echo "SYSLOG_OPER will be disabled.";
+         SYSLOG_OPERENABLE="Disabled";
+         SYSLOG_OPERSET="yes";;
+      no) echo "SYSLOG_OPER will be disabled.";
+         SYSLOG_OPERENABLE="Disabled";
+         SYSLOG_OPERSET="yes";;
+      No) echo "SYSLOG_OPER will be disabled.";
+         SYSLOG_OPERENABLE="Disabled";
+         SYSLOG_OPERSET="yes";;
+      NO) echo "SYSLOG_OPER will be disabled.";
+         SYSLOG_OPERENABLE="Disabled";
+         SYSLOG_OPERSET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+  while [ "$LOG_FACILITYSET" != "yes" ]
+  do
+    echo ""
+    echo "Set LOG_FACILITY"
+    echo "facility to use for syslog()  Define the facility"
+    echo "you want to use for syslog().  Ask your sysadmin"
+    echo "which one you should use."
+    echo "Default: LOG_LOCAL4"
+    read LOG_FACILITYINPUT
+    if [ "$LOG_FACILITYINPUT" = "" ]; then
+      echo "None specified, using default of: LOG_LOCAL4"
+      LOG_FACILITYINPUT="LOG_LOCAL4"
+    fi
+    echo "You have selected $LOG_FACILITYINPUT as your LOG_FACILITY, is this correct?"
+    read LOG_FACILITYCONFIRM
+    case $LOG_FACILITYCONFIRM in
+      y) echo "LOG_FACILITY $LOG_FACILITYINPUT will be used.";
+         LOG_FACILITYSETTING="$LOG_FACILITYINPUT";
+         LOG_FACILITYSET="yes";;
+      Y) echo "LOG_FACILITY $LOG_FACILITYINPUT will be used.";
+         LOG_FACILITYSETTING="$LOG_FACILITYINPUT";
+         LOG_FACILITYSET="yes";;
+      yes) echo "LOG_FACILITY $LOG_FACILITYINPUT will be used.";
+         LOG_FACILITYSETTING="$LOG_FACILITYINPUT";
+         LOG_FACILITYSET="yes";;
+      Yes) echo "LOG_FACILITY $LOG_FACILITYINPUT will be used.";
+         LOG_FACILITYSETTING="$LOG_FACILITYINPUT";
+         LOG_FACILITYSET="yes";;
+      YES) echo "LOG_FACILITY $LOG_FACILITYINPUT will be used.";
+         LOG_FACILITYSETTING="$LOG_FACILITYINPUT";
+         LOG_FACILITYSET="yes";;
+      n) echo "";;
+      N) echo "";;
+      no) echo "";;
+      No) echo "";;
+      NO) echo "";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+else
+  SYSLOG_KILLENABLE="Disabled"
+  SYSLOG_SQUITENABLE="Disabled"
+  SYSLOG_CONNECTENABLE="Disabled"
+  SYSLOG_USERSENABLE="Disabled"
+  SYSLOG_OPERENABLE="Disabled"
+  LOG_FACILITYENABLE="Disabled"
+  LOG_FACILITYSETTING="LOG_LOCAL4"
+fi
+while [ "$CRYPT_OPER_PASSWORDSET" != "yes" ]
+do
+  echo ""
+  echo "Enable CRYPT_OPER_PASSWORD?"
+  echo "use crypted oper passwords in the ircd.conf define"
+  echo "this if you want to use crypted passwords for operators"
+  echo "in your ircd.conf file.  Default: Enabled"
+  read CRYPT_OPER_PASSWORDCONFIRM
+  if [ "$CRYPT_OPER_PASSWORDCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    CRYPT_OPER_PASSWORDCONFIRM="yes"
+  fi
+  case $CRYPT_OPER_PASSWORDCONFIRM in
+    y) echo "CRYPT_OPER_PASSWORD will be enabled.";
+       CRYPT_OPER_PASSWORDENABLE="Enabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    Y) echo "CRYPT_OPER_PASSWORD will be enabled.";
+       CRYPT_OPER_PASSWORDENABLE="Enabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    yes) echo "CRYPT_OPER_PASSWORD will be enabled.";
+       CRYPT_OPER_PASSWORDENABLE="Enabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    Yes) echo "CRYPT_OPER_PASSWORD will be enabled.";
+       CRYPT_OPER_PASSWORDENABLE="Enabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    YES) echo "CRYPT_OPER_PASSWORD will be enabled.";
+       CRYPT_OPER_PASSWORDENABLE="Enabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    n) echo "CRYPT_OPER_PASSWORD will be disabled.";
+       CRYPT_OPER_PASSWORDENABLE="Disabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    N) echo "CRYPT_OPER_PASSWORD will be disabled.";
+       CRYPT_OPER_PASSWORDENABLE="Disabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    no) echo "CRYPT_OPER_PASSWORD will be disabled.";
+       CRYPT_OPER_PASSWORDENABLE="Disabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    No) echo "CRYPT_OPER_PASSWORD will be disabled.";
+       CRYPT_OPER_PASSWORDENABLE="Disabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    NO) echo "CRYPT_OPER_PASSWORD will be disabled.";
+       CRYPT_OPER_PASSWORDENABLE="Disabled";
+       CRYPT_OPER_PASSWORDSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$CLIENT_FLOODSET" != "yes" ]
+do
+  echo ""
+  echo "Set CLIENT_FLOOD"
+  echo "client excess flood threshold(in messages) The number"
+  echo "of messages that we can receive before we disconnect"
+  echo "the remote client...  Default: 20"
+  read CLIENT_FLOODINPUT
+  if [ "$CLIENT_FLOODINPUT" = "" ]; then
+    echo "No option specified, setting default of: 20"
+    CLIENT_FLOODINPUT="20"
+  fi
+  echo $CLIENT_FLOODINPUT | grep -v [0-9] > /dev/null 2>&1
+  if [ "$?" -eq "0" ]; then
+    echo "Value for CLIENT_FLOOD is restricted to only numeric characters."
+  else
+    echo "You have elected to set CLIENT_FLOOD to $CLIENT_FLOODINPUT, is this correct?"
+    read CLIENT_FLOODCONFIRM
+    case $CLIENT_FLOODCONFIRM in
+      y) echo "CLIENT_FLOOD will be set to $CLIENT_FLOODCONFIRM";
+         CLIENT_FLOODSETTING="$CLIENT_FLOODINPUT";
+         CLIENT_FLOODSET="yes";;
+      Y) echo "CLIENT_FLOOD will be set to $CLIENT_FLOODCONFIRM";
+         CLIENT_FLOODSETTING="$CLIENT_FLOODINPUT";
+         CLIENT_FLOODSET="yes";;
+      yes) echo "CLIENT_FLOOD will be set to $CLIENT_FLOODCONFIRM";
+         CLIENT_FLOODSETTING="$CLIENT_FLOODINPUT";
+         CLIENT_FLOODSET="yes";;
+      Yes) echo "CLIENT_FLOOD will be set to $CLIENT_FLOODCONFIRM";
+         CLIENT_FLOODSETTING="$CLIENT_FLOODINPUT";
+         CLIENT_FLOODSET="yes";;
+      YES) echo "CLIENT_FLOOD will be set to $CLIENT_FLOODCONFIRM";
+         CLIENT_FLOODSETTING="$CLIENT_FLOODINPUT";
+         CLIENT_FLOODSET="yes";;
+      n) echo "";;
+      N) echo "";;
+      no) echo "";;
+      No) echo "";;
+      NO) echo "";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  fi
+done
+echo ""
+echo "+MPB Modifications Configuration Section"
+while [ "$ADMINOWNAGESET" != "yes" ]
+do
+  echo ""
+  echo "Enable ADMINOWNAGE?"
+  echo "Allows Administrators to join channels past channel"
+  echo "modes such as bans, limits, invite only and keys."
+  echo "Added by Michael P. Bramel for hybrid7+mpb"
+  echo "Default: Enabled"
+  read ADMINOWNAGECONFIRM
+  if [ "$ADMINOWNAGECONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    ADMINOWNAGECONFIRM="yes"
+  fi
+  case $ADMINOWNAGECONFIRM in
+    y) echo "ADMINOWNAGE will be enabled.";
+       ADMINOWNAGEENABLE="Enabled";
+       ADMINOWNAGESET="yes";;
+    Y) echo "ADMINOWNAGE will be enabled.";
+       ADMINOWNAGEENABLE="Enabled";            
+       ADMINOWNAGESET="yes";;
+    yes) echo "ADMINOWNAGE will be enabled.";
+       ADMINOWNAGEENABLE="Enabled";            
+       ADMINOWNAGESET="yes";;
+    Yes) echo "ADMINOWNAGE will be enabled.";
+       ADMINOWNAGEENABLE="Enabled";            
+       ADMINOWNAGESET="yes";;
+    YES) echo "ADMINOWNAGE will be enabled.";
+       ADMINOWNAGEENABLE="Enabled";            
+       ADMINOWNAGESET="yes";;
+    n) echo "ADMINOWNAGE will be disabled.";
+       ADMINOWNAGEENABLE="Disabled";
+       ADMINOWNAGESET="yes";;
+    N) echo "ADMINOWNAGE will be disabled.";
+       ADMINOWNAGEENABLE="Disabled";
+       ADMINOWNAGESET="yes";;
+    no) echo "ADMINOWNAGE will be disabled.";
+       ADMINOWNAGEENABLE="Disabled";
+       ADMINOWNAGESET="yes";;
+    No) echo "ADMINOWNAGE will be disabled.";
+       ADMINOWNAGEENABLE="Disabled";
+       ADMINOWNAGESET="yes";;
+    NO) echo "ADMINOWNAGE will be disabled.";
+       ADMINOWNAGEENABLE="Disabled";
+       ADMINOWNAGESET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+if [ "$ADMINOWNAGEENABLE" = "Enabled" ]; then
+  while [ "$REPORT_ADMINOWNAGESET" != "yes" ]
+  do
+    echo ""
+    echo "Enable REPORT_ADMINOWNAGE?"
+    echo "Reports use/abuse of ADMINOWNAGE functionality to other server"
+    echo "operators. Option ADMINOWNAGE must be enabled for this to work."
+    echo "Added by Michael P. Bramel for Hybrid-7+mpb"
+    echo "Default: Enabled."
+    read REPORT_ADMINOWNAGECONFIRM
+      if [ "$REPORT_ADMINOWNAGECONFIRM" = "" ]; then
+        echo "No option specified, setting default of: Enabled"
+        REPORT_ADMINOWNAGECONFIRM="yes"
+      fi
+    case $REPORT_ADMINOWNAGECONFIRM in
+      y) echo "REPORT_ADMINOWNAGE will be enabled.";
+         REPORT_ADMINOWNAGEENABLE="Enabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      Y) echo "REPORT_ADMINOWNAGE will be enabled.";
+         REPORT_ADMINOWNAGEENABLE="Enabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      yes) echo "REPORT_ADMINOWNAGE will be enabled.";
+         REPORT_ADMINOWNAGEENABLE="Enabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      Yes) echo "REPORT_ADMINOWNAGE will be enabled.";
+         REPORT_ADMINOWNAGEENABLE="Enabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      YES) echo "REPORT_ADMINOWNAGE will be enabled.";
+         REPORT_ADMINOWNAGEENABLE="Enabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      n) echo "REPORT_ADMINOWNAGE will be disabled.";
+         REPORT_ADMINOWNAGEENABLE="Disabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      N) echo "REPORT_ADMINOWNAGE will be disabled.";
+         REPORT_ADMINOWNAGEENABLE="Disabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      no) echo "REPORT_ADMINOWNAGE will be disabled.";
+         REPORT_ADMINOWNAGEENABLE="Disabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      No) echo "REPORT_ADMINOWNAGE will be disabled.";
+         REPORT_ADMINOWNAGEENABLE="Disabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      NO) echo "REPORT_ADMINOWNAGE will be disabled.";
+         REPORT_ADMINOWNAGEENABLE="Disabled";
+         REPORT_ADMINOWNAGESET="yes";;
+      *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+    esac
+  done
+else
+  REPORT_ADMINOWNAGEENABLE="Disabled"
+fi
+while [ "$CHANNELSPYSET" != "yes" ]
+do
+  echo ""
+  echo "Enable CHANNELSPY?"
+  echo "Toggles support for Administrators seeing channel join/part/kick"
+  echo "info. Added by Michael P. Bramel for hybrid-7+mpb"
+  echo "Default: Enabled"
+  read CHANNELSPYCONFIRM
+    if [ "$CHANNELSPYCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Enabled"
+      CHANNELSPYCONFIRM="yes"
+    fi
+  case $CHANNELSPYCONFIRM in
+    y) echo "CHANNELSPY will be enabled.";
+       CHANNELSPYENABLE="Enabled";
+       CHANNELSPYSET="yes";;
+    Y) echo "CHANNELSPY will be enabled.";
+       CHANNELSPYENABLE="Enabled";
+       CHANNELSPYSET="yes";;
+    yes) echo "CHANNELSPY will be enabled.";
+       CHANNELSPYENABLE="Enabled";
+       CHANNELSPYSET="yes";;
+    Yes) echo "CHANNELSPY will be enabled.";
+       CHANNELSPYENABLE="Enabled";
+       CHANNELSPYSET="yes";;
+    YES) echo "CHANNELSPY will be enabled.";
+       CHANNELSPYENABLE="Enabled";
+       CHANNELSPYSET="yes";;
+    n) echo "CHANNELSPY will be disabled.";
+       CHANNELSPYENABLE="Disabled";
+       CHANNELSPYSET="yes";;
+    N) echo "CHANNELSPY will be disabled.";
+       CHANNELSPYENABLE="Disabled";
+       CHANNELSPYSET="yes";;
+    no) echo "CHANNELSPY will be disabled.";
+       CHANNELSPYENABLE="Disabled";
+       CHANNELSPYSET="yes";;
+    No) echo "CHANNELSPY will be disabled.";
+       CHANNELSPYENABLE="Disabled";
+       CHANNELSPYSET="yes";;
+    NO) echo "CHANNELSPY will be disabled.";
+       CHANNELSPYENABLE="Disabled";
+       CHANNELSPYSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$ALLOWWILDTOPLEVELSET" != "yes" ]
+do
+  echo ""
+  echo "Enable ALLOWWILDTOPLEVEL?"
+  echo "If this is enabled, Hybrid will not require top level"
+  echo "domains to be specified in mass messages from IRC Operators."
+  echo "Added by Michael P. Bramel for Hybrid-7+mpb"
+  echo "** Will only work if enabled network-wide **"
+  echo "Default: Enabled"
+  read ALLOWWILDTOPLEVELCONFIRM
+    if [ "$ALLOWWILDTOPLEVELCONFIRM" = "" ]; then
+      echo "No option specified, setting default of: Enabled"
+      ALLOWWILDTOPLEVELCONFIRM="yes"
+    fi
+  case $ALLOWWILDTOPLEVELCONFIRM in
+    y) echo "ALLOWWILDTOPLEVEL will be enabled.";
+       ALLOWWILDTOPLEVELENABLE="Enabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    Y) echo "ALLOWWILDTOPLEVEL will be enabled.";
+       ALLOWWILDTOPLEVELENABLE="Enabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    yes) echo "ALLOWWILDTOPLEVEL will be enabled.";
+       ALLOWWILDTOPLEVELENABLE="Enabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    Yes) echo "ALLOWWILDTOPLEVEL will be enabled.";
+       ALLOWWILDTOPLEVELENABLE="Enabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    YES) echo "ALLOWWILDTOPLEVEL will be enabled.";
+       ALLOWWILDTOPLEVELENABLE="Enabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    n) echo "ALLOWWILDTOPLEVEL will be disabled.";
+       ALLOWWILDTOPLEVELENABLE="Disabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    N) echo "ALLOWWILDTOPLEVEL will be disabled.";  
+       ALLOWWILDTOPLEVELENABLE="Disabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    no) echo "ALLOWWILDTOPLEVEL will be disabled.";  
+       ALLOWWILDTOPLEVELENABLE="Disabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    No) echo "ALLOWWILDTOPLEVEL will be disabled.";  
+       ALLOWWILDTOPLEVELENABLE="Disabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    NO) echo "ALLOWWILDTOPLEVEL will be disabled.";  
+       ALLOWWILDTOPLEVELENABLE="Disabled";
+       ALLOWWILDTOPLEVELSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$ADMINSSEEALLCHANSSET" != "yes" ]
+do
+  echo ""
+  echo "Enable ADMINSSEEALLCHANS?"
+  echo "Toggle support for admins seeing all chans in list and whois"
+  echo "Added by Michael P. Bramel for hybrid-7+mpb"
+  echo "Default: Enabled"
+  read ADMINSSEEALLCHANSCONFIRM
+  if [ "$ADMINSSEEALLCHANSCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    ADMINSSEEALLCHANSCONFIRM="yes"
+  fi
+  case $ADMINSSEEALLCHANSCONFIRM in
+    y) echo "ADMINSSEEALLCHANS will be enabled.";
+       ADMINSSEEALLCHANSENABLE="Enabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    Y) echo "ADMINSSEEALLCHANS will be enabled.";
+       ADMINSSEEALLCHANSENABLE="Enabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    yes) echo "ADMINSSEEALLCHANS will be enabled.";
+       ADMINSSEEALLCHANSENABLE="Enabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    Yes) echo "ADMINSSEEALLCHANS will be enabled.";
+       ADMINSSEEALLCHANSENABLE="Enabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    YES) echo "ADMINSSEEALLCHANS will be enabled.";
+       ADMINSSEEALLCHANSENABLE="Enabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    n) echo "ADMINSSEEALLCHANS will be disabled.";
+       ADMINSSEEALLCHANSENABLE="Disabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    N) echo "ADMINSSEEALLCHANS will be disabled.";
+       ADMINSSEEALLCHANSENABLE="Disabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    no) echo "ADMINSSEEALLCHANS will be disabled.";
+       ADMINSSEEALLCHANSENABLE="Disabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    No) echo "ADMINSSEEALLCHANS will be disabled.";
+       ADMINSSEEALLCHANSENABLE="Disabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    NO) echo "ADMINSSEEALLCHANS will be disabled.";
+       ADMINSSEEALLCHANSENABLE="Disabled";
+       ADMINSSEEALLCHANSSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$RWHOIS_NOTICESET" != "yes" ]
+do
+  echo ""
+  echo "Enable RWHOIS_NOTICE?"
+  echo "Toggle support for seeing remote whois requests"
+  echo "Added by Michael P. Bramel for hybrid-7+mpb"
+  echo "Default: Enabled"
+  read RWHOIS_NOTICECONFIRM
+  if [ "$RWHOIS_NOTICECONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    RWHOIS_NOTICECONFIRM="yes"
+  fi
+  case $RWHOIS_NOTICECONFIRM in
+    y) echo "RWHOIS_NOTICE will be enabled.";
+       RWHOIS_NOTICEENABLE="Enabled";
+       RWHOIS_NOTICESET="yes";;
+    Y) echo "RWHOIS_NOTICE will be enabled.";
+       RWHOIS_NOTICEENABLE="Enabled";
+       RWHOIS_NOTICESET="yes";;
+    yes) echo "RWHOIS_NOTICE will be enabled.";
+       RWHOIS_NOTICEENABLE="Enabled";
+       RWHOIS_NOTICESET="yes";;
+    Yes) echo "RWHOIS_NOTICE will be enabled.";
+       RWHOIS_NOTICEENABLE="Enabled";
+       RWHOIS_NOTICESET="yes";;
+    YES) echo "RWHOIS_NOTICE will be enabled.";
+       RWHOIS_NOTICEENABLE="Enabled";
+       RWHOIS_NOTICESET="yes";;
+    n) echo "RWHOIS_NOTICE will be disabled.";
+       RWHOIS_NOTICEENABLE="Disabled";
+       RWHOIS_NOTICESET="yes";;
+    N) echo "RWHOIS_NOTICE will be disabled.";
+       RWHOIS_NOTICEENABLE="Disabled";
+       RWHOIS_NOTICESET="yes";;
+    no) echo "RWHOIS_NOTICE will be disabled.";
+       RWHOIS_NOTICEENABLE="Disabled";
+       RWHOIS_NOTICESET="yes";;
+    No) echo "RWHOIS_NOTICE will be disabled.";
+       RWHOIS_NOTICEENABLE="Disabled";
+       RWHOIS_NOTICESET="yes";;
+    NO) echo "RWHOIS_NOTICE will be disabled.";
+       RWHOIS_NOTICEENABLE="Disabled";
+       RWHOIS_NOTICESET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$ADMINKICKEXEMPTSET" != "yes" ]
+do
+  echo ""
+  echo "Enable ADMINKICKEXEMPT?"
+  echo "Prevents Administrators from being kicked in channels."
+  echo "Will only prevent local users from kicking admins remote"
+  echo "or local to avoid desync."
+  echo "Added by Michael P. Bramel for Hybrid-7+mpb"
+  echo "Default: Enabled"
+  read ADMINKICKEXEMPTCONFIRM
+  if [ "$ADMINKICKEXEMPTCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    ADMINKICKEXEMPTCONFIRM="yes"
+  fi
+  case $ADMINKICKEXEMPTCONFIRM in
+    y) echo "ADMINKICKEXEMPT will be enabled.";
+       ADMINKICKEXEMPTENABLE="Enabled";
+       ADMINKICKEXEMPTSET="yes";;
+    Y) echo "ADMINKICKEXEMPT will be enabled.";
+       ADMINKICKEXEMPTENABLE="Enabled";
+       ADMINKICKEXEMPTSET="yes";;
+    yes) echo "ADMINKICKEXEMPT will be enabled.";
+       ADMINKICKEXEMPTENABLE="Enabled";
+       ADMINKICKEXEMPTSET="yes";;
+    Yes) echo "ADMINKICKEXEMPT will be enabled.";
+       ADMINKICKEXEMPTENABLE="Enabled";
+       ADMINKICKEXEMPTSET="yes";;
+    YES) echo "ADMINKICKEXEMPT will be enabled.";
+       ADMINKICKEXEMPTENABLE="Enabled";
+       ADMINKICKEXEMPTSET="yes";;
+    n) echo "ADMINKICKEXEMPT will be disabled.";
+       ADMINKICKEXEMPTENABLE="Disabled";
+       ADMINKICKEXEMPTSET="yes";;
+    N) echo "ADMINKICKEXEMPT will be disabled.";
+       ADMINKICKEXEMPTENABLE="Disabled";
+       ADMINKICKEXEMPTSET="yes";;
+    no) echo "ADMINKICKEXEMPT will be disabled.";
+       ADMINKICKEXEMPTENABLE="Disabled";
+       ADMINKICKEXEMPTSET="yes";;
+    No) echo "ADMINKICKEXEMPT will be disabled.";
+       ADMINKICKEXEMPTENABLE="Disabled";
+       ADMINKICKEXEMPTSET="yes";;
+    NO) echo "ADMINKICKEXEMPT will be disabled.";
+       ADMINKICKEXEMPTENABLE="Disabled";
+       ADMINKICKEXEMPTSET="yes";;
+    *) echo "Invalid Selection: Please enter y to enable, or n to disable.";;
+  esac
+done
+while [ "$ADMINKILLEXEMPTSET" != "yes" ]
+do
+  echo ""
+  echo "Enable ADMINKILLEXEMPT?"
+  echo "Prevents Administrators from being killed by Operators." 
+  echo "Please note this only stops kills by operators on this" 
+  echo "server, remote kills against local admins will not be"
+  echo "stopped. A good way to /make sure/ your opers don't kill"
+  echo "the really wrong people, the IRC network's administration."
+  echo "Added by Michael P. Bramel for Hybrid-7+mpb"
+  echo "Default: Enabled"
+  read ADMINKILLEXEMPTCONFIRM
+  if [ "$ADMINKILLEXEMPTCONFIRM" = "" ]; then
+    echo "No option specified, setting default of: Enabled"
+    ADMINKILLEXEMPTCONFIRM="yes"
+  fi
+  case $ADMINKILLEXEMPTCONFIRM in
+  y) echo "ADMINKILLEXEMPT will be enabled.";
+     ADMINKILLEXEMPTENABLE="Enabled";
+     ADMINKILLEXEMPTSET="yes";;
+  Y) echo "ADMINKILLEXEMPT will be enabled.";
+     ADMINKILLEXEMPTENABLE="Enabled";
+     ADMINKILLEXEMPTSET="yes";;
+  yes) echo "ADMINKILLEXEMPT will be enabled.";
+     ADMINKILLEXEMPTENABLE="Enabled";
+     ADMINKILLEXEMPTSET="yes";;
+  Yes) echo "ADMINKILLEXEMPT will be enabled.";
+     ADMINKILLEXEMPTENABLE="Enabled";
+     ADMINKILLEXEMPTSET="yes";;
+  YES) echo "ADMINKILLEXEMPT will be enabled.";
+     ADMINKILLEXEMPTENABLE="Enabled";
+     ADMINKILLEXEMPTSET="yes";;
+  n) echo "ADMINKILLEXEMPT will be disabled.";
+     ADMINKILLEXEMPTENABLE="Disabled";
+     ADMINKILLEXEMPTSET="yes";;
+  N) echo "ADMINKILLEXEMPT will be disabled.";
+     ADMINKILLEXEMPTENABLE="Disabled";
+     ADMINKILLEXEMPTSET="yes";;
+  no) echo "ADMINKILLEXEMPT will be disabled.";
+     ADMINKILLEXEMPTENABLE="Disabled";
+     ADMINKILLEXEMPTSET="yes";;
+  No) echo "ADMINKILLEXEMPT will be disabled.";
+     ADMINKILLEXEMPTENABLE="Disabled";
+     ADMINKILLEXEMPTSET="yes";;
+  NO) echo "ADMINKILLEXEMPT will be disabled.";
+     ADMINKILLEXEMPTENABLE="Disabled";
+     ADMINKILLEXEMPTSET="yes";;
+  esac
+done
+echo ""
+echo ""
+echo "Will compile with the following settings:"
+echo "Setting    ... Variable"
+echo "SOURCE     ... $INSTALLSOURCE"
+echo "PREFIX     ... $HYBRIDPATH"
+echo "MAXCLIENTS ... $MAXIMUMCLIENTS"
+echo ""
+echo "Hybrid7 Option Status:"
+echo "Setting             ... Variable"
+echo "WANT_GETTEXT        ... $WANT_GETTEXTENABLE"
+echo "IGNORE_BOGUS_TS     ... $IGNORE_BOGUS_TSENABLE"
+echo "HIDE_SERVERS_IPS    ... $HIDE_SERVERS_IPSENABLE"
+echo "HIDE_SPOOF_IPS      ... $HIDE_SPOOF_IPSENABLE"
+echo "TS5_ONLY            ... $TS5_ONLYENABLE"
+echo "USE_LOGFILE         ... $USE_LOGFILEENABLE"
+echo "USE_SYSLOG          ... $USE_SYSLOGENABLE"
+echo "SYSLOG_KILL         ... $SYSLOG_KILLENABLE"
+echo "SYSLOG_SQUIT        ... $SYSLOG_SQUITENABLE"
+echo "SYSLOG_CONNECT      ... $SYSLOG_CONNECTENABLE"
+echo "SYSLOG_USERS        ... $SYSLOG_USERSENABLE"
+echo "SYSLOG_OPER         ... $SYSLOG_OPERENABLE"
+echo "LOG_FACILITY        ... $LOG_FACILITYSETTING"
+echo "CRYPT_OPER_PASSWORD ... $CRYPT_OPER_PASSWORDENABLE"
+echo "CLIENT_FLOOD        ... $CLIENT_FLOODSETTING"
+echo ""
+echo "+MPB Option Status:"
+echo "Setting            ... Variable"
+echo "ADMINOWNAGE        ... $ADMINOWNAGEENABLE"
+echo "REPORT_ADMINOWNAGE ... $REPORT_ADMINOWNAGEENABLE"
+echo "CHANNELSPY         ... $CHANNELSPYENABLE"
+echo "ALLOWWILDTOPLEVEL  ... $ALLOWWILDTOPLEVELENABLE"
+echo "ADMINSSEEALLCHANS  ... $ADMINSSEEALLCHANSENABLE"
+echo "RWHOIS_NOTICE      ... $RWHOIS_NOTICEENABLE"
+echo "ADMINKICKEXEMPT    ... $ADMINKICKEXEMPTENABLE"
+echo "ADMINKILLEXEMPT    ... $ADMINKILLEXEMPTENABLE"
+echo ""
+echo "Do you wish to proceed?"
+echo "Enter yes to proceed with the next step, or Control+C to abort."
+read PRECONFIGUREPROCEED
+case $PRECONFIGUREPROCEED in
+  y) echo "";
+     echo "Continuing with install...";;
+  Y) echo "";
+     echo "Continuing with install...";;
+  yes) echo "";
+     echo "Continuing with install...";;
+  Yes) echo "";
+     echo "Continuing with install...";;
+  YES) echo "";
+     echo "Continuing with install...";;
+  n) echo "";
+     echo "Aborting installation...";
+     exit 1;;
+  N) echo "";
+     echo "Aborting installation..."; 
+     exit 1;;
+  no) echo "";
+     echo "Aborting installation..."; 
+     exit 1;;
+  No) echo "";
+     echo "Aborting installation..."; 
+     exit 1;;
+  NO) echo "";
+     echo "Aborting installation..."; 
+     exit 1;;
+  *) echo "";
+     echo "Please enter a valid answer: yes to continue, or no to abort.";;
+esac
+echo ""
+
+# Step 2, now we build config.h
+
+echo "Building Setup files"
+echo "Building include/config.h"
+cat include/config.h.pre >> include/config.h
+echo "" >> include/config.h
+if [ "$WANT_GETTEXTENABLE" = "Enabled" ]; then
+  echo "/* WANT_GETTEXT - toggle gettext support." >> include/config.h
+  echo " * NOTE: if configure doesn't detect gettext, this won't do anything." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define WANT_GETTEXT" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$WANT_GETTEXTENABLE" = "Disabled" ]; then
+  echo "/* WANT_GETTEXT - toggle gettext support." >> include/config.h 
+  echo " * NOTE: if configure doesn't detect gettext, this won't do anything." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  WANT_GETTEXT" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$IGNORE_BOGUS_TSENABLE" = "Enabled" ]; then
+  echo "/* Ignore bogus timestamps from other servers. Yes this will desync" >> include/config.h
+  echo " * the network, but it will allow chanops to resync with a valid non TS 0" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * This should be enabled network wide, or not at all." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define IGNORE_BOGUS_TS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$IGNORE_BOGUS_TSENABLE" = "Disabled" ]; then
+  echo "/* Ignore bogus timestamps from other servers. Yes this will desync" >> include/config.h
+  echo " * the network, but it will allow chanops to resync with a valid non TS 0" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * This should be enabled network wide, or not at all." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  IGNORE_BOGUS_TS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$HIDE_SERVERS_IPSENABLE" = "Enabled" ]; then
+  echo "/* HIDE_SERVERS_IPS" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * If this is undefined, opers will be unable to see servers ips and will be" >> include/config.h
+  echo " * shown a masked ip, admins will be shown the real ip." >> include/config.h
+  echo " *" >> include/config.h
+  echo " * If this is defined, nobody can see a servers ip.  *This is a kludge*, it" >> include/config.h
+  echo " * has the side effect of hiding the ips everywhere, including logfiles." >> include/config.h
+  echo " *" >> include/config.h
+  echo " * We recommend you leave this undefined, and just take care with who you" >> include/config.h
+  echo " * give admin=yes; to." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define HIDE_SERVERS_IPS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$HIDE_SERVERS_IPSENABLE" = "Disabled" ]; then
+  echo "/* HIDE_SERVERS_IPS" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * If this is undefined, opers will be unable to see servers ips and will be" >> include/config.h
+  echo " * shown a masked ip, admins will be shown the real ip." >> include/config.h
+  echo " *" >> include/config.h
+  echo " * If this is defined, nobody can see a servers ip.  *This is a kludge*, it" >> include/config.h
+  echo " * has the side effect of hiding the ips everywhere, including logfiles." >> include/config.h
+  echo " *" >> include/config.h
+  echo " * We recommend you leave this undefined, and just take care with who you" >> include/config.h
+  echo " * give admin=yes; to." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  HIDE_SERVERS_IPS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$HIDE_SPOOF_IPSENABLE" = "Enabled" ]; then
+  echo "/* HIDE_SPOOF_IPS" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * If this is undefined, opers will be allowed to see the real IP of spoofed" >> include/config.h
+  echo " * users in /trace etc.  If this is defined they will be shown a masked IP." >> include/config.h
+  echo " */" >> include/config.h" >> include/config.h
+  echo "#define HIDE_SPOOF_IPS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$HIDE_SPOOF_IPSENABLE" = "Disabled" ]; then
+  echo "/* HIDE_SPOOF_IPS" >> include/config.h
+  echo " *" >> include/config.h 
+  echo " * If this is undefined, opers will be allowed to see the real IP of spoofed" >> include/config.h
+  echo " * users in /trace etc.  If this is defined they will be shown a masked IP." >> include/config.h
+  echo " */" >> include/config.h" >> include/config.h
+  echo "#undef  HIDE_SPOOF_IPS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$TS5_ONLYENABLE" = "Enabled" ]; then
+  echo "/* TS5_ONLY" >> include/config.h
+  echo " * " >> include/config.h
+  echo " * If this is defined only TS5 servers may link to the network.  See" >> include/config.h
+  echo " * doc/ts5.txt for more information.  If your network has old servers" >> include/config.h
+  echo " * (hyb5, hyb6.0, +CSr) or hybserv you should NOT define this." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define TS5_ONLY" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$TS5_ONLYENABLE" = "Disabled" ]; then
+  echo "/* TS5_ONLY" >> include/config.h
+  echo " * " >> include/config.h
+  echo " * If this is defined only TS5 servers may link to the network.  See" >> include/config.h
+  echo " * doc/ts5.txt for more information.  If your network has old servers" >> include/config.h
+  echo " * (hyb5, hyb6.0, +CSr) or hybserv you should NOT define this." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  TS5_ONLY" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$USE_LOGFILEENABLE" = "Enabled" ]; then
+  echo "/* USE_LOGFILE - log errors and such to LPATH" >> include/config.h
+  echo " * If you wish to have the server send 'vital' messages about server" >> include/config.h
+  echo " * to a logfile, define USE_LOGFILE." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define USE_LOGFILE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$USE_LOGFILEENABLE" = "Disabled" ]; then
+  echo "/* USE_LOGFILE - log errors and such to LPATH" >> include/config.h
+  echo " * If you wish to have the server send 'vital' messages about server" >> include/config.h
+  echo " * to a logfile, define USE_LOGFILE." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  USE_LOGFILE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$USE_SYSLOGENABLE" = "Enabled" ]; then
+  echo "/* USE_SYSLOG - log errors and such to syslog()" >> include/config.h
+  echo " * If you wish to have the server send 'vital' messages about server" >> include/config.h
+  echo " * through syslog, define USE_SYSLOG. Only system errors and events critical" >> include/config.h
+  echo " * to the server are logged although if this is defined with FNAME_USERLOG," >> include/config.h
+  echo " * syslog() is used instead of the above file. It is not recommended that" >> include/config.h
+  echo " * this option is used unless you tell the system administrator beforehand" >> include/config.h
+  echo " * and obtain their permission to send messages to the system log files." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define USE_SYSLOG" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$USE_SYSLOGENABLE" = "Disabled" ]; then
+  echo "/* USE_SYSLOG - log errors and such to syslog()" >> include/config.h
+  echo " * If you wish to have the server send 'vital' messages about server" >> include/config.h
+  echo " * through syslog, define USE_SYSLOG. Only system errors and events critical" >> include/config.h
+  echo " * to the server are logged although if this is defined with FNAME_USERLOG," >> include/config.h
+  echo " * syslog() is used instead of the above file. It is not recommended that" >> include/config.h
+  echo " * this option is used unless you tell the system administrator beforehand" >> include/config.h
+  echo " * and obtain their permission to send messages to the system log files." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  USE_SYSLOG" >> include/config.h
+  echo "" >> include/config.h
+fi
+echo "#ifdef USE_SYSLOG" >> include/config.h
+echo "/* SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER" >> include/config.h
+echo " * If you use syslog above, you may want to turn some (none) of the" >> include/config.h
+echo " * spurious log messages for KILL,SQUIT,etc off." >> include/config.h
+echo " */" >> include/config.h
+if [ "$SYSLOG_KILLENABLE" = "Enabled" ]; then
+  echo "#define SYSLOG_KILL     /* log all operator kills to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_KILLENABLE" = "Disabled" ]; then
+  echo "#undef  SYSLOG_KILL     /* log all operator kills to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_SQUITENABLE" = "Enabled" ]; then
+  echo "#define SYSLOG_SQUIT    /* log all remote squits for all servers to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_SQUITENABLE" = "Disabled" ]; then
+  echo "#undef  SYSLOG_SQUIT    /* log all remote squits for all servers to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_CONNECTENABLE" = "Enabled" ]; then
+  echo "#define SYSLOG_CONNECT  /* log remote connect messages for other all servs */" >> include/config.h
+fi
+if [ "$SYSLOG_CONNECTENABLE" = "Disabled" ]; then
+  echo "#undef  SYSLOG_CONNECT  /* log remote connect messages for other all servs */" >> include/config.h
+fi
+if [ "$SYSLOG_USERSENABLE" = "Enabled" ]; then
+  echo "#define SYSLOG_USERS    /* send userlog stuff to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_USERSENABLE" = "Disabled" ]; then
+  echo "#undef  SYSLOG_USERS    /* send userlog stuff to syslog */" >> include/config.h
+fi
+if [ "$SYSLOG_OPERENABLE" = "Enabled" ]; then
+  echo "#define SYSLOG_OPER     /* log all users who successfully become an Op */" >> include/config.h
+fi
+if [ "$SYSLOG_OPERENABLE" = "Disabled" ]; then
+  echo "#undef  SYSLOG_OPER     /* log all users who successfully become an Op */" >> include/config.h
+fi
+if [ "$LOG_FACILITYENABLE" != "Disabled" ]; then
+  echo "" >> include/config.h
+  echo "/* LOG_FACILITY - facility to use for syslog()" >> include/config.h
+  echo " * Define the facility you want to use for syslog().  Ask your" >> include/config.h
+  echo " * sysadmin which one you should use." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define LOG_FACILITY $LOG_FACILITYSETTING" >> include/config.h
+fi
+if [ "$LOG_FACILITYENABLE" = "Disabled" ]; then
+  echo "" >> include/config.h
+  echo "/* LOG_FACILITY - facility to use for syslog()" >> include/config.h
+  echo " * Define the facility you want to use for syslog().  Ask your" >> include/config.h
+  echo " * sysadmin which one you should use." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define LOG_FACILITY $LOG_FACILITYSETTING" >> include/config.h
+fi
+echo "" >> include/config.h
+echo "#endif /* USE_SYSLOG */" >> include/config.h
+echo "" >> include/config.h
+if [ "$CRYPT_OPER_PASSWORDENABLE" = "Enabled" ]; then
+  echo "/* CRYPT_OPER_PASSWORD - use crypted oper passwords in the ircd.conf" >> include/config.h
+  echo " * define this if you want to use crypted passwords for operators in your" >> include/config.h
+  echo " * ircd.conf file." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define CRYPT_OPER_PASSWORD" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$CRYPT_OPER_PASSWORDENABLE" = "Disabled" ]; then
+  echo "/* CRYPT_OPER_PASSWORD - use crypted oper passwords in the ircd.conf" >> include/config.h
+  echo " * define this if you want to use crypted passwords for operators in your" >> include/config.h
+  echo " * ircd.conf file." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  CRYPT_OPER_PASSWORD" >> include/config.h
+  echo "" >> include/config.h
+fi
+echo "/* CLIENT_FLOOD - client excess flood threshold(in messages)" >> include/config.h
+echo " * The number of messages that we can receive before we disconnect the" >> include/config.h
+echo " * remote client..." >> include/config.h
+echo " */" >> include/config.h
+echo "#define CLIENT_FLOOD $CLIENT_FLOODSETTING" >> include/config.h
+echo "" >> include/config.h
+if [ "$ADMINOWNAGEENABLE" = "Enabled" ]; then
+  echo "/* ADMINOWNAGE - Allows Administrators to join channels past channel modes such" >> include/config.h
+  echo " * as bans, limits, invite only and keys." >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid7+mpb" >> include/config.h
+  echo " * Not recommended on productions ervers." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define ADMINOWNAGE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINOWNAGEENABLE" = "Disabled" ]; then
+  echo "/* ADMINOWNAGE - Allows Administrators to join channels past channel modes such" >> include/config.h
+  echo " * as bans, limits, invite only and keys." >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid7+mpb" >> include/config.h
+  echo " * Not recommended on productions ervers." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  ADMINOWNAGE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$REPORT_ADMINOWNAGEENABLE" = "Enabled" ]; then
+  echo "/* REPORT_ADMINOWNAGE - Reports use(abuse) of ADMINOWNAGE functionality to other" >> include/config.h
+  echo " * server operators. Option ADMINOWNAGE must be enabled for this to work." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " * Most certainly recommended for production servers that have elected to use ADMINOWNAGE" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * Please note, if this is defined without ADMINOWNAGE being defined, problems" >> include/config.h
+  echo " * shall arise. Heed my warning." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define REPORT_ADMINOWNAGE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$REPORT_ADMINOWNAGEENABLE" = "Disabled" ]; then
+  echo "/* REPORT_ADMINOWNAGE - Reports use(abuse) of ADMINOWNAGE functionality to other" >> include/config.h
+  echo " * server operators. Option ADMINOWNAGE must be enabled for this to work." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " * Most certainly recommended for production servers that have elected to use ADMINOWNAGE" >> include/config.h
+  echo " *" >> include/config.h
+  echo " * Please note, if this is defined without ADMINOWNAGE being defined, problems" >> include/config.h
+  echo " * shall arise. Heed my warning." >> include/config.h   
+  echo " */" >> include/config.h
+  echo "#undef  REPORT_ADMINOWNAGE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$CHANNELSPYENABLE" = "Enabled" ]; then
+  echo "/* CHANNELSPY - Toggles support for Administrators seeing channel join/part/kick info." >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " * Not recommended on production servers." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define CHANNELSPY" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$CHANNELSPYENABLE" = "Disabled" ]; then
+  echo "/* CHANNELSPY - Toggles support for Administrators seeing channel join/part/kick info." >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " * Not recommended on production servers." >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  CHANNELSPY" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ALLOWWILDTOPLEVELENABLE" = "Enabled" ]; then
+  echo "/* ALLOWWILDTOPLEVEL - If this is enabled, Hybrid will not require top level domains" >> include/config.h
+  echo " * to be specified in mass messages from IRC Operators." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define ALLOWWILDTOPLEVEL" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ALLOWWILDTOPLEVELENABLE" = "Disabled" ]; then
+  echo "/* ALLOWWILDTOPLEVEL - If this is enabled, Hybrid will not require top level domains" >> include/config.h
+  echo " * to be specified in mass messages from IRC Operators." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  ALLOWWILDTOPLEVEL" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINSSEEALLCHANSENABLE" = "Enabled" ]; then
+  echo "/* ADMINSSEEALLCHANS - Toggle support for admins seeing all chans in list and whois" >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define ADMINSSEEALLCHANS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINSSEEALLCHANSENABLE" = "Disabled" ]; then
+  echo "/* ADMINSSEEALLCHANS - Toggle support for admins seeing all chans in list and whois" >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  ADMINSSEEALLCHANS" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$RWHOIS_NOTICEENABLE" = "Enabled" ]; then
+  echo "/* RWHOIS_NOTICE - toggle support for seeing remote whois requests" >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define RWHOIS_NOTICE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$RWHOIS_NOTICEENABLE" = "Disabled" ]; then
+  echo "/* RWHOIS_NOTICE - toggle support for seeing remote whois requests" >> include/config.h
+  echo " * Added by Michael P. Bramel for hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  RWHOIS_NOTICE" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINKICKEXEMPTENABLE" = "Enabled" ]; then
+  echo "/* ADMINKICKEXEMPT - Prevents Administrators from being kicked in channels." >> include/config.h
+  echo " * Highly experimental, but all testing of the feature proved positive." >> include/config.h
+  echo " * Should work if the entire network has this piece of code, will only prevent" >> include/config.h
+  echo " * local users from kicking admins (remote or local) to avoid desync." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " * Not recommended on production servers" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define ADMINKICKEXEMPT" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINKICKEXEMPTENABLE" = "Disabled" ]; then
+  echo "/* ADMINKICKEXEMPT - Prevents Administrators from being kicked in channels." >> include/config.h
+  echo " * Highly experimental, but all testing of the feature proved positive." >> include/config.h
+  echo " * Should work if the entire network has this piece of code, will only prevent" >> include/config.h
+  echo " * local users from kicking admins (remote or local) to avoid desync." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " * Not recommended on production servers" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  ADMINKICKEXEMPT" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINKILLEXEMPTENABLE" = "Enabled" ]; then
+  echo "/* ADMINKILLEXEMPT - Prevents Administrators from being killed by Operators" >> include/config.h
+  echo " * Please note this only stops kills by operators on this server, remote kills" >> include/config.h
+  echo " * against local admins will not be stopped. A good way to /make sure/ your opers" >> include/config.h
+  echo " * don't kill the really wrong people, the IRC network's administration." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#define ADMINKILLEXEMPT" >> include/config.h
+  echo "" >> include/config.h
+fi
+if [ "$ADMINKILLEXEMPTENABLE" = "Disabled" ]; then
+  echo "/* ADMINKILLEXEMPT - Prevents Administrators from being killed by Operators" >> include/config.h
+  echo " * Please note this only stops kills by operators on this server, remote kills" >> include/config.h
+  echo " * against local admins will not be stopped. A good way to /make sure/ your opers" >> include/config.h
+  echo " * don't kill the really wrong people, the IRC network's administration." >> include/config.h
+  echo " * Added by Michael P. Bramel for Hybrid-7+mpb" >> include/config.h
+  echo " */" >> include/config.h
+  echo "#undef  ADMINKILLEXEMPT" >> include/config.h
+  echo "" >> include/config.h
+fi
+echo "" >> include/config.h
+cat include/config.h.post >> include/config.h
+echo "include/config.h has been created."
+echo ""
+echo "Setup is ready to run the compile time configuration script"
+echo "$INSTALLSOURCE/configure --prefix=$HYBRIDPATH --with-maxclients=$MAXIMUMCLIENTS"
+echo "Do you wish to proceed? This may take several minutes."
+read PROCEEDWITHCONFIGURE
+case $PROCEEDWITHCONFIGURE in
+  y) echo "Proceeding with configure";
+     echo "";;
+  Y) echo "Proceeding with configure";
+     echo "";;
+  yes) echo "Proceeding with configure";
+     echo "";;
+  Yes) echo "Proceeding with configure";
+     echo "";;
+  YES) echo "Proceeding with configure";
+     echo "";;
+  n) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  N) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  no) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  No) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  NO) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  *) echo "";
+     echo "Please enter a valid answer: yes to continue, or no to abort.";;
+esac
+$INSTALLSOURCE/configure --prefix=$HYBRIDPATH --with-maxclients=$MAXIMUMCLIENTS
+if test -f help/Makefile
+then
+  echo ""
+  echo "Congratulations, configure completed sucessfully... You are now ready to build Hybrid."
+else
+  echo ""
+  echo "There was a problem with the configure script, please consult the INSTALL file."
+  echo ""
+  exit 1
+fi
+echo "Do you wish to proceed with make? This may take several minutes."
+read PROCEEDWITHMAKE
+case $PROCEEDWITHMAKE in
+  y) echo "Proceeding with make";
+     echo "";;
+  Y) echo "Proceeding with make";
+     echo "";;
+  yes) echo "Proceeding with make";
+     echo "";;
+  Yes) echo "Proceeding with make";
+     echo "";;
+  YES) echo "Proceeding with make";
+     echo "";;
+  n) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  N) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  no) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  No) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  NO) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  *) echo "";
+     echo "Please enter a valid answer: yes to continue, or no to abort.";;
+esac
+echo ""
+echo "Cleaning any stale binary files..."
+make clean
+echo ""
+echo "Done cleaning stale files, now beginning to build ircd-hybrid-7+mpb"
+echo ""
+make
+if test -e src/ircd
+then
+  echo ""
+  echo "Build completed sucessfully."
+else
+  echo ""
+  echo "There was a problem encountered building Hybrid, please read the included INSTALL file."
+  echo ""
+  exit 1
+fi
+echo ""
+echo "Would you like to install the compiled binaries to $HYBRIDPATH now?"
+echo "This may take several minutes..."
+read PROCEEDWITHINSTALL
+case $PROCEEDWITHINSTALL in
+  y) echo "Proceeding with install";
+     echo "";;
+  Y) echo "Proceeding with install";
+     echo "";;
+  yes) echo "Proceeding with install";
+     echo "";;
+  Yes) echo "Proceeding with install";
+     echo "";;
+  YES) echo "Proceeding with install";
+     echo "";;
+  n) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  N) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  no) echo "Aborting installation...";
+     echo "";
+     exit 1;;
+  No) echo "Aborting installation...";
+     echo ""; 
+     exit 1;;
+  NO) echo "Aborting installation...";
+     echo "";
+     exit 1;; 
+  *) echo "";
+     echo "Please enter a valid answer: yes to continue, or no to abort.";;
+esac
+echo "Now running make install..."
+make install
+if test -e $HYBRIDPATH/bin/ircd
+then
+  echo ""
+  echo "Contratulations, setup has completed compile and install sucessfully."
+else
+  echo ""
+  echo "A problem was encountered during install, please view the included INSTALL file."
+  exit 1
+fi
+echo ""
+while [ "$CONFSETUPDONE" != "true" ]
+do
+  echo "Would you like to run the ConfSetup utility and create your ircd.conf now?"
+  read CONFSETUPCONFIRM
+  case $CONFSETUPCONFIRM in
+    y) echo "Now starting the ConfSetup utility.";
+       echo "";
+       CONFSETUPDONE="true";;
+    Y) echo "Now starting the ConfSetup utility.";
+       echo "";
+       CONFSETUPDONE="true";;
+    yes) echo "Now starting the ConfSetup utility.";
+       echo "";
+       CONFSETUPDONE="true";;
+    Yes) echo "Now starting the ConfSetup utility.";
+       echo "";
+       CONFSETUPDONE="true";;
+    YES) echo "Now starting the ConfSetup utility.";
+       echo "";
+       CONFSETUPDONE="true";;
+    n) echo "Skipping ConfSetup, setup will now exit.";
+       echo "";
+       exit 1;;
+    N) echo "Skipping ConfSetup, setup will now exit.";
+       echo "";
+       exit 1;;
+    no) echo "Skipping ConfSetup, setup will now exit.";
+       echo "";
+       exit 1;;
+    No) echo "Skipping ConfSetup, setup will now exit.";
+       echo "";
+       exit 1;;
+    NO) echo "Skipping ConfSetup, setup will now exit.";
+       echo "";
+       exit 1;;
+    *) echo "Please enter a valid answer, y for yes or n for no";
+       echo "";;
+  esac
+done
+$INSTALLSOURCE/ConfSetup.sh
+echo ""
+echo "Done!"
+echo ""
diff -uNrd ircd-hybrid-7.0rc9/contrib/Makefile.in ircd-hybrid-7.0rc9+mpb-rm/contrib/Makefile.in
--- ircd-hybrid-7.0rc9/contrib/Makefile.in	Tue Sep  3 01:43:37 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/Makefile.in	Thu Feb 20 14:13:47 2003
@@ -28,25 +28,12 @@
 
 SRCS =                          \
   m_clearchan.c			\
-  m_flags.c                     \
-  m_force.c			\
   m_jupe.c			\
   m_ltrace.c			\
-  m_map.c			\
-  m_mkpasswd.c                  \
-  m_ojoin.c			\
   m_operspy.c			\
-  m_opme.c			\
   m_tburst.c			\
   m_whois.c			\
-  spy_admin_notice.c		\
-  spy_info_notice.c		\
-  spy_links_notice.c		\
-  spy_motd_notice.c		\
-  spy_stats_notice.c            \
   spy_stats_p_notice.c		\
-  spy_trace_notice.c		\
-  spy_whois_notice.c            \
   example_module.c
 
 OBJS = ${SRCS:.c=.so}
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_flags.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_flags.c
--- ircd-hybrid-7.0rc9/contrib/m_flags.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_flags.c	Wed Dec 31 19:00:00 1969
@@ -1,435 +0,0 @@
-/*
- *  m_flags.c: Implements comstud-style mode flags.
- *
- *  Copyright 2002 by W. Campbell and the ircd-hybrid development team
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- *
- *  1.Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer. 
- *  2.Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution. 
- *  3.The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission. 
- *
- *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- *
- *  $Id: m_flags.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
- */
-
-/* List of ircd includes from ../include/ */
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "common.h"     /* FALSE bleah */
-#include "ircd.h"
-#include "irc_string.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_conf.h"
-#include "s_log.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-#include "s_user.h"    /* send_umode_out() */
-
-
-static void m_flags(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static void mo_flags(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-
-static char *set_flags_to_string(struct Client *client_p);
-static char *unset_flags_to_string(struct Client *client_p);
-
-struct Message test_msgtab = {
-  "FLAGS", 0, 0, 0, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_flags, m_ignore, mo_flags}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&test_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&test_msgtab);
-}
-
-const char *_version = "$Revision: 1.9 $";
-#endif
-
-/* FLAGS requires it's own mini parser, since the last parameter in it can
-** contain a number of FLAGS.  CS handles FLAGS mode1 mode2 OR
-** FLAGS :mode1 mode2, but not both mixed.
-**
-** The best way to match a flag to a mode is with a simple table
-*/
-
-struct FlagTable
-{
-  char *name;
-  int mode;
-  int oper;
-};
-
-static struct FlagTable flag_table[] =
-{
-  /* name		mode it represents	oper only? */
-  { "OWALLOPS",		FLAGS_OPERWALL,		1 },
-  { "SWALLOPS",		FLAGS_WALLOP,		0 },
-  { "STATSNOTICES",	FLAGS_SPY,		1 },
-    /* We don't have a separate OKILL and SKILL modes */
-  { "OKILLS",		FLAGS_SKILL,		0 },
-  { "SKILLS",		FLAGS_SKILL,		0 },
-  { "SNOTICES",		FLAGS_SERVNOTICE,	0 },
-    /* We don't have separate client connect and disconnect modes */
-  { "CLICONNECTS",	FLAGS_CCONN,		1 },
-  { "CLIDISCONNECTS",	FLAGS_CCONN,		1 },
-    /* I'm taking a wild guess here... */
-  { "THROTTLES",	FLAGS_REJ,		1 },
-#if 0
-    /* This one is special...controlled via an oper block option */
-  { "NICKCHANGES",	FLAGS_NCHANGE,		1 },
-    /* NICKCHANGES must be checked for separately */
-#endif
-    /* I'm assuming this is correct... */
-  { "IPMISMATCHES",	FLAGS_UNAUTH,		1 },
-  { "LWALLOPS",		FLAGS_LOCOPS,		1 },
-    /* These aren't separate on Hybrid */
-  { "CONNECTS",		FLAGS_EXTERNAL,		1 },
-  { "SQUITS",		FLAGS_EXTERNAL,		1 },
-    /* Now we have our Hybrid specific flags */
-  { "FULL",		FLAGS_FULL,		1 },
-    /* Not in CS, but we might as well put it here */
-  { "INVISIBLE",	FLAGS_INVISIBLE,	0 },
-  { "BOTS",		FLAGS_BOTS,		1 },
-  { "CALLERID",		FLAGS_CALLERID,		0 },
-  { "UNAUTH",		FLAGS_UNAUTH,		1 },
-  { "DEBUG",		FLAGS_DEBUG,		1 },
-  { NULL,		0,			0 }
-};
-
-/* We won't control CALLERID or INVISIBLE in here */
-
-#define FL_ALL_USER_FLAGS (FLAGS_WALLOP | FLAGS_SKILL | FLAGS_SERVNOTICE )
-
-/* and we don't control NCHANGES here either */
-
-#define FL_ALL_OPER_FLAGS (FL_ALL_USER_FLAGS | FLAGS_CCONN | FLAGS_REJ |\
-                           FLAGS_FULL | FLAGS_SPY | FLAGS_DEBUG |\
-                           FLAGS_OPERWALL | FLAGS_BOTS | FLAGS_EXTERNAL |\
-                           FLAGS_UNAUTH | FLAGS_LOCOPS )
-
-/*
-** m_flags
-**      parv[0] = sender prefix
-**      parv[1] = parameter
-*/
-static void m_flags(struct Client *client_p, struct Client *source_p,
-                   int parc, char *parv[])
-{
-  int i,j;
-  int isadd;
-  int setflags;
-  int isgood;
-  char *p;
-  char *flag;
-
-  if (parc < 2)
-  {
-    /* Generate a list of what flags you have and what you are missing,
-    ** and send it to the user
-    */
-    sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-               me.name, parv[0], set_flags_to_string(source_p));
-    sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-               me.name, parv[0], unset_flags_to_string(source_p));
-    return;
-  }
-
-  /* Preserve the current flags */
-  setflags = source_p->umodes;
-
-/* XXX - change this to support a multiple last parameter like ISON */
-
-  for (i = 1; i < parc; i++)
-  {
-    for (flag = strtoken(&p, parv[i], " "); flag;
-         flag = strtoken(&p, NULL, " "))
-    {
-      /* We default to being in ADD mode */
-      isadd = 1;
-
-      /* We default to being in BAD mode */
-      isgood = 0;
-
-      if (!isalpha(flag[0]))
-      {
-        if (flag[0] == '-')
-          isadd = 0;
-        else if (flag[0] == '+')
-          isadd = 1;
-        flag++;
-      }
-
-      /* support ALL here */
-      if (!irccmp(flag, "ALL"))
-      {
-        if (isadd)
-          source_p->umodes |= FL_ALL_USER_FLAGS;
-        else
-          source_p->umodes &= ~FL_ALL_USER_FLAGS;
-        sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-                   me.name, parv[0], set_flags_to_string(source_p));
-        sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-                   me.name, parv[0], unset_flags_to_string(source_p));
-        send_umode_out(client_p, source_p, setflags);
-        return;
-      }
-
-      for (j = 0; flag_table[j].name; j++)
-      {
-        if (!flag_table[j].oper && !irccmp(flag, flag_table[j].name))
-        {
-          if (isadd)
-            source_p->umodes |= flag_table[j].mode;
-          else
-            source_p->umodes &= ~ (flag_table[j].mode);
-          isgood = 1;
-          continue;
-        }
-      }
-      /* This for ended without matching a valid FLAG, here is where
-      ** I want to operate differently than ircd-comstud, and just ignore
-      ** the invalid flag, send a warning and go on.
-      */
-      if (!isgood)
-        sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
-                   me.name, parv[0], flag);
-    }
-  }
-
-  /* All done setting the flags, print the notices out to the user
-  ** telling what flags they have and what flags they are missing
-  */
-  sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-             me.name, parv[0], set_flags_to_string(source_p));
-  sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-             me.name, parv[0], unset_flags_to_string(source_p));
-
-  send_umode_out(client_p, source_p, setflags);
-}
-
-/*
-** mo_flags
-**      parv[0] = sender prefix
-**      parv[1] = parameter
-*/
-static void mo_flags(struct Client *client_p, struct Client *source_p,
-                   int parc, char *parv[])
-{		 
-  int i,j;
-  int isadd;
-  int setflags;
-  int isgood;
-  char *p;
-  char *flag;
-
-  if (parc < 2)
-  {
-    /* Generate a list of what flags you have and what you are missing,
-    ** and send it to the user
-    */
-    sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-               me.name, parv[0], set_flags_to_string(source_p));
-    sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-               me.name, parv[0], unset_flags_to_string(source_p));
-    return;
-  }
-
-  /* Preserve the current flags */
-  setflags = source_p->umodes;
-
-/* XXX - change this to support a multiple last parameter like ISON */
-
-  for (i = 1; i < parc; i++)
-  {
-    for (flag = strtoken(&p, parv[i], " "); flag;
-         flag = strtoken(&p, NULL, " "))
-    {
-      /* We default to being in ADD mode */
-      isadd = 1;
-
-      /* We default to being in BAD mode */
-      isgood = 0;
-
-      if (!isalpha(flag[0]))
-      {
-        if (flag[0] == '-')
-          isadd = 0;
-        else if (flag[0] == '+')
-          isadd = 1;
-        flag++;
-      }
-
-      /* support ALL here */
-      if (!irccmp(flag, "ALL"))
-      {
-        if (isadd)
-          source_p->umodes |= FL_ALL_OPER_FLAGS;
-        else
-          source_p->umodes &= ~FL_ALL_OPER_FLAGS;
-        sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-                   me.name, parv[0], set_flags_to_string(source_p));
-        sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-                   me.name, parv[0], unset_flags_to_string(source_p));
-        send_umode_out(client_p, source_p, setflags);
-        return;
-      }
-
-      if (!irccmp(flag, "NICKCHANGES"))
-      {
-        if (!IsOperN(source_p))
-        {
-          sendto_one(source_p,
-                     ":%s NOTICE %s :*** You need oper and N flag for +n",
-                     me.name,parv[0]);
-          continue;
-        }
-        if (isadd)
-          source_p->umodes |= FLAGS_NCHANGE;
-        else
-          source_p->umodes &= ~FLAGS_NCHANGE;
-        isgood = 1;
-        continue;
-      }
-
-      for (j = 0; flag_table[j].name; j++)
-      {
-        if (!irccmp(flag, flag_table[j].name))
-        {
-          if (isadd)
-            source_p->umodes |= flag_table[j].mode;
-          else
-            source_p->umodes &= ~ (flag_table[j].mode);
-          isgood = 1;
-          continue;
-        }
-      }
-      /* This for ended without matching a valid FLAG, here is where
-      ** I want to operate differently than ircd-comstud, and just ignore
-      ** the invalid flag, send a warning and go on.
-      */
-      if (!isgood)
-        sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
-                   me.name, parv[0], flag);
-    }
-  }
-
-  /* All done setting the flags, print the notices out to the user
-  ** telling what flags they have and what flags they are missing
-  */
-  sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
-             me.name, parv[0], set_flags_to_string(source_p));
-  sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
-             me.name, parv[0], unset_flags_to_string(source_p));
-
-  send_umode_out(client_p, source_p, setflags);
-}
-
-static char *set_flags_to_string(struct Client *client_p)
-{
-  /* XXX - list all flags that we have set on the client */
-  static char setflags[BUFSIZE + 1];
-  int i;
-
-  /* Clear it to begin with, we'll be doing a lot of ircsprintf's */
-  setflags[0] = '\0';
-
-  /* Unlike unset_flags_to_string(), we don't have to care about oper
-  ** flags and not showing them
-  */
-
-  for (i = 0; flag_table[i].name; i++)
-  {
-    if (client_p->umodes & flag_table[i].mode)
-    {
-      ircsprintf(setflags, "%s %s", setflags, flag_table[i].name);
-    }
-  }
-
-#if 0
-  if (IsOper(client_p) && IsOperN(client_p))
-  {
-#endif
-    /* You can only be set +NICKCHANGES if you are an oper and
-    ** IsOperN(client_p) is true
-    */
-    if (client_p->umodes & FLAGS_NCHANGE)
-    {
-      ircsprintf(setflags, "%s %s", setflags, "NICKCHANGES");
-    }
-#if 0
-  }
-#endif
-
-  return setflags;
-}
-
-static char *unset_flags_to_string(struct Client *client_p)
-{
-  /* Inverse of above */
-  /* XXX - list all flags that we do NOT have set on the client */
-  static char setflags[BUFSIZE + 1];
-  int i,isoper;
-
-  /* Clear it to begin with, we'll be doing a lot of ircsprintf's */
-  setflags[0] = '\0';
-
-  if (IsOper(client_p))
-    isoper = 1;
-  else
-    isoper = 0;
-
-  for (i = 0; flag_table[i].name; i++)
-  {
-    if ( !(client_p->umodes & flag_table[i].mode))
-    {
-      if (!isoper && flag_table[i].oper)
-        continue;
-      ircsprintf(setflags, "%s %s", setflags, flag_table[i].name);
-    }
-  }
-
-  if (IsOper(client_p) && IsOperN(client_p))
-  {
-    if ( !(client_p->umodes & FLAGS_NCHANGE))
-    {
-      ircsprintf(setflags, "%s %s", setflags, "NICKCHANGES");
-    }
-  }
-
-  return setflags;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_force.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_force.c
--- ircd-hybrid-7.0rc9/contrib/m_force.c	Fri Nov  1 08:24:41 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_force.c	Wed Dec 31 19:00:00 1969
@@ -1,314 +0,0 @@
-/* contrib/m_force.c
- * Copyright (C) 2002 Hybrid Development Team
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- *
- *  1.Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *  2.Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *  3.The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: m_force.c,v 1.17 2002/11/01 13:24:41 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "common.h"     /* FALSE bleah */
-#include "ircd.h"
-#include "irc_string.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "hash.h"
-#include "s_bsd.h"
-#include "s_conf.h"
-#include "s_log.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "channel.h"
-#include "channel_mode.h"
-
-
-static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
-                         int parc, char *parv[]);
-static void mo_forcepart(struct Client *client_p, struct Client *source_p,
-		         int parc, char *parv[]);
-
-struct Message forcejoin_msgtab = {
-  "FORCEJOIN", 0, 0, 3, 0, MFLG_SLOW, 0,
-  {m_ignore, m_not_oper, mo_forcejoin, mo_forcejoin}
-};
-struct Message forcepart_msgtab = {
-  "FORCEPART", 0, 0, 3, 0, MFLG_SLOW, 0,
-  {m_ignore, m_not_oper, mo_forcepart, mo_forcepart}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&forcejoin_msgtab);
-  mod_add_cmd(&forcepart_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&forcejoin_msgtab);
-  mod_del_cmd(&forcepart_msgtab);
-}
-
-char *_version = "$Revision: 1.17 $";
-#endif
-
-/*
- * m_forcejoin
- *      parv[0] = sender prefix
- *      parv[1] = user to force
- *      parv[2] = channel to force them into
- */
-static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
-                         int parc, char *parv[])
-{
-  struct Client *target_p;
-  struct Channel *chptr;
-  int type;
-  char mode;
-  char sjmode;
-  char *newch;
-
-  if(!IsAdmin(source_p))
-  {
-    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
-    return;
-  }
-
-  /* if target_p is not existent, print message
-   * to source_p and bail - scuzzy
-   */
-  if ((target_p = find_client(parv[1])) == NULL)
-  {
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-	       source_p->name, parv[1]);
-    return;
-  }
-
-  if (!MyConnect(target_p))
-  {
-    sendto_one(target_p, ":%s FORCEJOIN %s %s", parv[0], parv[1], parv[2]);
-    return;
-  }
-
-  /* select our modes from parv[2] if they exist... (chanop)*/
-  if(*parv[2] == '@')
-  {
-    type = CHFL_CHANOP;
-    mode = 'o';
-    sjmode = '@';
-  }
-#ifdef HALFOPS
-  else if(*parv[2] == '%')
-  {
-    type = CHFL_HALFOP;
-    mode = 'h';
-    sjmode = '%';
-  }
-#endif
-  else if(*parv[2] == '+')
-  {
-    type = CHFL_VOICE;
-    mode = 'v';
-    sjmode = '+';
-  }
-  else
-  {
-    type = CHFL_PEON;
-    mode = sjmode = '\0';
-  }
-    
-  if(mode != '\0')
-    parv[2]++;
-    
-  if((chptr = hash_find_channel(parv[2])) != NULL)
-    {
-      if(IsMember(target_p, chptr))
-      {
-        /* debugging is fun... */
-        sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s", me.name,
-		   source_p->name, target_p->name, chptr->chname);
-	return;
-      }
-
-      add_user_to_channel(chptr, target_p, type);
-
-      if (chptr->chname[0] != '&')
-        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
-	              ":%s SJOIN %lu %s + :%c%s",
-	              me.name, (unsigned long) chptr->channelts,
-	              chptr->chname, type ? sjmode : ' ', target_p->name);
-
-      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
-                             target_p->name, target_p->username,
-                             target_p->host, chptr->chname);
-
-      if(type)
-        sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +%c %s",
-	                     me.name, chptr->chname, mode, target_p->name);
-        
-      if(chptr->topic != NULL)
-      {
-	sendto_one(target_p, form_str(RPL_TOPIC), me.name,
-	           target_p->name, chptr->chname, chptr->topic);
-        sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
-	           me.name, source_p->name, chptr->chname,
-	           chptr->topic_info, chptr->topic_time);
-      }
-
-      channel_member_names(target_p, chptr, chptr->chname, 1);
-    }
-  else
-    {
-      newch = parv[2];
-      if (!check_channel_name(newch))
-      {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
-		   source_p->name, (unsigned char*)newch);
-	return;
-      }
-
-      /* channel name must begin with & or # */
-      if (!IsChannelName(newch))
-      {
-        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
-		   source_p->name, (unsigned char*)newch);
-        return;
-      }
-
-     /* it would be interesting here to allow an oper
-      * to force target_p into a channel that doesn't exist
-      * even more so, into a local channel when we disable
-      * local channels... but...
-      * I don't want to break anything - scuzzy
-      */
-      if (ConfigServerHide.disable_local_channels &&
-	  (*newch == '&'))
-      {
-        sendto_one(source_p, ":%s NOTICE %s :No such channel (%s)", me.name,
-		   source_p->name, newch);
-        return;
-      }
-
-      /* newch can't be longer than CHANNELLEN */
-      if (strlen(newch) > CHANNELLEN)
-      {
-	sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
-		   source_p->name);
-        return;
-      }
-
-      chptr = get_or_create_channel(target_p, newch, NULL);
-      add_user_to_channel(chptr, target_p, CHFL_CHANOP);
-
-      /* send out a join, make target_p join chptr */
-      if (chptr->chname[0] != '&')
-        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
-                      ":%s SJOIN %lu %s +nt :@%s", me.name,
-		      (unsigned long) chptr->channelts, chptr->chname,
-		      target_p->name);
-
-      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
-                             target_p->name, target_p->username,
-                             target_p->host, chptr->chname);
-
-      chptr->mode.mode |= MODE_TOPICLIMIT;
-      chptr->mode.mode |= MODE_NOPRIVMSGS;
-
-      sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name,
-                           chptr->chname);
-
-      target_p->localClient->last_join_time = CurrentTime;
-      channel_member_names(target_p, chptr, chptr->chname, 1);
-
-      /* we do this to let the oper know that a channel was created, this will be
-       * seen from the server handling the command instead of the server that
-       * the oper is on.
-       */
-      sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
-		 source_p->name, chptr->chname);
-    }
-}
-
-
-static void mo_forcepart(struct Client *client_p, struct Client *source_p,
-		         int parc, char *parv[])
-{
-  struct Client *target_p;
-  struct Channel *chptr;
-
-  if(!IsAdmin(source_p))
-  {
-    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
-    return;
-  }
-
-  /* if target_p == NULL then let the oper know */
-  if ((target_p = find_client(parv[1])) == NULL)
-  {
-    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-               source_p->name, parv[1]);
-    return;
-  }
-
-  if (!MyConnect(target_p))
-  {
-    sendto_one(target_p, ":%s FORCEPART %s %s", parv[0], parv[1], parv[2]);
-    return;
-  }
-
-  if((chptr = hash_find_channel(parv[2])) == NULL)
-  {
-    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-               me.name, parv[0], parv[2]);
-    return;
-  }
-
-  if (!IsMember(target_p, chptr))
-  {
-    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
-               me.name, parv[0], parv[2], parv[1]);
-    return;
-  }
-  
-  if (chptr->chname[0] != '&')
-    sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
-		  ":%s PART %s :%s",
-		  target_p->name, chptr->chname,
-		  target_p->name);
-
-  sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
-                       target_p->name, target_p->username,
- 	               target_p->host,chptr->chname,
-		       target_p->name);
-  remove_user_from_channel(chptr, target_p);
-}
-
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_map.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_map.c
--- ircd-hybrid-7.0rc9/contrib/m_map.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_map.c	Wed Dec 31 19:00:00 1969
@@ -1,156 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_map.c: Sends an Undernet compatible map to a user.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: m_map.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
- */
-
-#include "stdinc.h"
-#include "client.h"
-#include "modules.h"
-#include "handlers.h"
-#include "numeric.h"
-#include "send.h"
-#include "s_conf.h"
-
-#define USER_COL       50 /* display | Users: %d at col 50 */
-
-static void m_map(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static void mo_map(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static void dump_map(struct Client *client_p,struct Client *root, char *pbuf);
-
-struct Message map_msgtab = {
-  "MAP", 0, 0, 0, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_map, m_ignore, mo_map}
-};
-
-#ifndef STATIC_MODULES
-void _modinit(void)
-{
-  mod_add_cmd(&map_msgtab);
-}
-
-void _moddeinit(void)
-{
-  mod_del_cmd(&map_msgtab);
-}
-
-const char *_version = "$Revision: 1.12 $";
-#endif
-
-static char buf[BUFSIZE];
-
-/* m_map
-**	parv[0] = sender prefix
-*/
-static void m_map(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  if (!ConfigServerHide.flatten_links)
-  {
-    dump_map(client_p,&me,buf);
-    sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
-    return;
-  }
-
-  m_not_oper(client_p,source_p,parc,parv);
-  return;
-}
-
-/*
-** mo_map
-**      parv[0] = sender prefix
-*/
-static void mo_map(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  dump_map(client_p,&me,buf);
-  sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
-}
-
-/*
-** dump_map
-**   dumps server map, called recursively.
-*/
-static void dump_map(struct Client *client_p,struct Client *root_p, char *pbuf)
-{
-  int cnt = 0, i = 0, len;
-  int users = 0;
-  struct Client *server_p,*user_p;
-        
-  *pbuf= '\0';
-       
-  strncat(pbuf,root_p->name,BUFSIZE - ((size_t) pbuf - (size_t) buf));
-  len = strlen(buf);
-  buf[len] = ' ';
-	
-  if (len < USER_COL)
-  {
-     for (i = len+1; i < USER_COL; i++)
-     {
-       buf[i] = '-';
-     }
-  }
-	
-  /* FIXME: add serv->usercnt */
-  for( user_p = root_p->serv->users; user_p; user_p = user_p->lnext )
-    users++;
-        
-  snprintf(buf + USER_COL, BUFSIZE - USER_COL,
-           " | Users: %5d (%4.1f%%)", users,
-           100 * (float) users / (float) Count.total);
-        
-  sendto_one(client_p, form_str(RPL_MAP),me.name,client_p->name,buf);
-        
-  if ((server_p = root_p->serv->servers))
-  {
-    for (; server_p; server_p = server_p->lnext)
-    {
-      cnt++;
-    }
-    
-    if (cnt)
-    {
-      if (pbuf > buf + 3)
-      {
-        pbuf[-2] = ' ';
-        if (pbuf[-3] == '`')
-          pbuf[-3] = ' ';
-      }
-    }
-  }
-  for (i = 1,server_p = root_p->serv->servers; server_p; server_p=server_p->lnext)
-  {
-    *pbuf = ' ';
-    if (i < cnt)
-      *(pbuf + 1) = '|';
-    else
-      *(pbuf + 1) = '`';
-      
-    *(pbuf + 2) = '-';
-    *(pbuf + 3) = ' ';
-    dump_map(client_p,server_p,pbuf+4);
- 
-    i++;
-   }
-}
-
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_mkpasswd.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_mkpasswd.c
--- ircd-hybrid-7.0rc9/contrib/m_mkpasswd.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_mkpasswd.c	Wed Dec 31 19:00:00 1969
@@ -1,168 +0,0 @@
-/*
- *  m_mkpasswd.c: Encrypts a password online, DES or MD5.
- *
- *  Copyright 2002 W. Campbell and the ircd-hybrid development team
- *  Based on mkpasswd.c, originally by Nelson Minar (minar@reed.edu)
- *
- *  You can use this code in any way as long as these names remain.
- *
- *  $Id: m_mkpasswd.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
- */
-
-/* List of ircd includes from ../include/ */
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "common.h"     /* FALSE bleah */
-#include "ircd.h"
-#include "irc_string.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_conf.h"
-#include "s_log.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-#include <string.h>
-
-extern char *crypt();
-
-static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static char *make_salt(void);
-static char *make_md5_salt(void);
-
-static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
-
-struct Message test_msgtab = {
-  "MKPASSWD", 0, 0, 1, 2, MFLG_SLOW, 0,
-  {m_unregistered, m_mkpasswd, m_ignore, mo_mkpasswd}
-};
-
-#ifndef STATIC_MODULES
-void _modinit(void)
-{
-  mod_add_cmd(&test_msgtab);
-}
-
-void _moddeinit(void)
-{
-  mod_del_cmd(&test_msgtab);
-}
-
-const char *_version = "$Revision: 1.9 $";
-#endif
-
-static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
-                   int parc, char *parv[])
-{
-  static time_t last_used = 0;
-  int is_md5 = 0;
-
-  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
-    {
-      /* safe enough to give this on a local connect only */
-      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
-      return;
-    }
-  else
-    {
-      last_used = CurrentTime;
-    }
-
-  if (parc == 3)
-  {
-    if (!irccmp(parv[2], "MD5"))
-    {
-      is_md5 = 1;
-    }
-    else if (!irccmp(parv[2], "DES"))
-    {
-      /* Not really needed, but we may want to have a default encryption
-       * setting somewhere down the road
-       */
-      is_md5 = 0;
-    }
-    else
-    {
-      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
-      return;
-    }
-  }
-
-  if(parc == 1)
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-               me.name, parv[0], "MKPASSWD");
-  else
-    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
-               me.name, parv[0], parv[1], crypt(parv[1],
-               is_md5 ? make_md5_salt() : make_salt()));
-}
-
-/*
-** mo_test
-**      parv[0] = sender prefix
-**      parv[1] = parameter
-*/
-static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
-                   int parc, char *parv[])
-{		 
-  int is_md5 = 0;
-
-  if (parc == 3)
-  {
-    if (!irccmp(parv[2], "MD5"))
-    {
-      is_md5 = 1;
-    }
-    else if (!irccmp(parv[2], "DES"))
-    {
-      /* Not really needed, but we may want to have a default encryption
-       * setting somewhere down the road
-       */
-      is_md5 = 0;
-    }
-    else
-    {
-      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
-      return;
-    }
-  }
-
-  if (parc == 1)
-    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-               me.name, parv[0], "MKPASSWD");
-  else
-    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
-               me.name, parv[0], parv[1], crypt(parv[1],
-               is_md5 ? make_md5_salt() : make_salt()));
-}
-
-static char *make_salt(void)
-{
-  static char salt[3];
-  salt[0] = saltChars[random() % 64];
-  salt[1] = saltChars[random() % 64];
-  salt[2] = '\0';
-  return salt;
-}
-
-static char *make_md5_salt(void)
-{
-  static char salt[13];
-  int i;
-  salt[0] = '$';
-  salt[1] = '1';
-  salt[2] = '$';
-  for (i=3; i<11; i++)
-    salt[i] = saltChars[random() % 64];
-  salt[11] = '$';
-  salt[12] = '\0';
-  return salt;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_ojoin.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_ojoin.c
--- ircd-hybrid-7.0rc9/contrib/m_ojoin.c	Mon Jun 10 21:49:18 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_ojoin.c	Wed Dec 31 19:00:00 1969
@@ -1,203 +0,0 @@
-/*   contrib/m_ojoin.c
- *   Copyright (C) 2002 Hybrid Development Team
- *
- *   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_ojoin.c,v 1.11 2002/06/11 01:49:18 androsyn Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "client.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"
-#include "hash.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "vchannel.h"
-#include "list.h"
-#include "channel_mode.h"
-
-static void mo_ojoin(struct Client *client_p, struct Client *source_p,
-                         int parc, char *parv[]);
-
-struct Message ojoin_msgtab = {
-  "OJOIN", 0, 0, 2, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_not_oper, m_ignore, mo_ojoin}
-};
-
-void
-_modinit(void)
-{
-  mod_add_cmd(&ojoin_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&ojoin_msgtab);
-}
-
-char *_version = "$Revision: 1.11 $";
-
-/*
-** mo_ojoin
-**      parv[0] = sender prefix
-**      parv[1] = channel
-*/
-static void mo_ojoin(struct Client *client_p, struct Client *source_p,
-                        int parc, char *parv[])
-{
-  struct Channel *chptr, *root_chptr;
-  int move_me = 0;
-#ifdef VCHANS
-  int on_vchan = 0;
-#endif
-
-  /* admins only */
-  if (!IsOperAdmin(source_p))
-    {
-      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
-      return;
-    }
-
-  /* XXX - we might not have CBURSTed this channel if we are a lazylink
-   * yet. */
-  if (*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
-    {
-      parv[1]++;
-      move_me = 1;
-    }
-
-  chptr= hash_find_channel(parv[1]);
-  root_chptr = chptr;
-
-#ifdef VCHANS
-  if (chptr && parc > 2 && parv[2][0] == '!')
-    {
-      chptr = find_vchan(chptr, parv[2]);
-      if (root_chptr != chptr)
-        on_vchan++;
-    }
-#endif
-
-  if( chptr == NULL )
-    {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-		 me.name, parv[0], parv[1]);
-      return;
-    }
-
-  if(IsMember(source_p, chptr))
-    {
-      sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
-                 me.name, source_p->name, parv[1]);
-      return;
-    }
-
-  if (move_me == 1)
-    parv[1]--;
-
-  if (*parv[1] == '@') 
-    {
-       add_user_to_channel(chptr, source_p, CHFL_CHANOP);
-       if (chptr->chname[0] != '&')
-         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
-                 ":%s SJOIN %lu %s + :@%s", me.name, chptr->channelts,
-                 chptr->chname, source_p->name);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
-                       source_p->name,
-                       source_p->username,
-                       source_p->host,
-                       root_chptr->chname);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
-                       me.name, chptr->chname, source_p->name);
-
-    }
-#ifdef HALFOPS
-  else if (*parv[1] == '%')
-    {
-       add_user_to_channel(chptr, source_p, CHFL_HALFOP);
-       if (chptr->chname[0] != '&')
-         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
-                 ":%s SJOIN %lu %s + :%%%s", me.name, chptr->channelts,
-                 chptr->chname, source_p->name);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
-                       source_p->name,
-                       source_p->username,
-                       source_p->host,
-                       root_chptr->chname);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +h %s",
-                       me.name, chptr->chname, source_p->name);
-    }
-#endif
-  else if (*parv[1] == '+')
-    {
-       add_user_to_channel(chptr, source_p, CHFL_VOICE);
-       if (chptr->chname[0] != '&')
-         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
-                 ":%s SJOIN %lu %s + :+%s", me.name, chptr->channelts,
-                 chptr->chname, source_p->name);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
-                       source_p->name,
-                       source_p->username,
-                       source_p->host,
-                       root_chptr->chname);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s",
-                       me.name, chptr->chname, source_p->name);
-    }
-  else
-    {
-       add_user_to_channel(chptr, source_p, CHFL_PEON);
-       if (chptr->chname[0] != '&')
-         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
-                       ":%s SJOIN %lu %s + :%s",
-                       me.name, chptr->channelts,
-		       chptr->chname, source_p->name);
-       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
-                       source_p->name,
-                       source_p->username,
-                       source_p->host,
-                       root_chptr->chname);
-    }
-
-  /* send the topic... */
-  if (chptr->topic != NULL)
-  {
-    sendto_one(source_p, form_str(RPL_TOPIC), me.name,
-	       source_p->name, chptr->chname, chptr->topic);
-    sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
-	       source_p->name, chptr->chname, chptr->topic_info,
-	       chptr->topic_time);
-  }
-
-  /* XXX - check this isn't too big above... */
-#ifdef VCHANS
-  if (on_vchan)
-    add_vchan_to_client_cache(source_p,root_chptr,chptr);
-#endif
-
-  source_p->localClient->last_join_time = CurrentTime;
-  channel_member_names(source_p, chptr, chptr->chname, 1);
-}
-
diff -uNrd ircd-hybrid-7.0rc9/contrib/m_opme.c ircd-hybrid-7.0rc9+mpb-rm/contrib/m_opme.c
--- ircd-hybrid-7.0rc9/contrib/m_opme.c	Thu Sep 19 12:14:32 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/m_opme.c	Wed Dec 31 19:00:00 1969
@@ -1,226 +0,0 @@
-/*   contrib/m_opme.c
- *   Copyright (C) 2002 Hybrid Development Team
- *
- *   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_opme.c,v 1.28 2002/09/19 16:14:32 bill Exp $
- */
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "client.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"
-#include "hash.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "vchannel.h"
-
-
-static void mo_opme(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[]);
-static int chan_is_opless(struct Channel *chptr);
-
-struct Message opme_msgtab = {
-  "OPME", 0, 0, 2, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_not_oper, m_ignore, mo_opme}
-};
-
-void
-_modinit(void)
-{
-  mod_add_cmd(&opme_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&opme_msgtab);
-}
-
-char *_version = "$Revision: 1.28 $";
-
-static int chan_is_opless(struct Channel *chptr)
-{
-  if (chptr->chanops.head)
-	  return 0;
-  else
-	  return 1;
-}
-
-/*
-** mo_opme
-**      parv[0] = sender prefix
-**      parv[1] = channel
-*/
-static void mo_opme(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  struct Channel *chptr, *root_chptr;
-  int on_vchan = 0;
-  dlink_node *ptr;
-  dlink_node *locptr;
-  
-  /* admins only */
-  if (!IsAdmin(source_p))
-    {
-      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name,
-                 parv[0]);
-      return;
-    }
-
-  /* XXX - we might not have CBURSTed this channel if we are a lazylink
-   * yet. */
-  chptr= hash_find_channel(parv[1]);
-  root_chptr = chptr;
-
-#ifdef VCHANS
-  if (chptr && parc > 2 && parv[2][0] == '!')
-    {
-      chptr = find_vchan(chptr, parv[2]);
-      if (root_chptr != chptr)
-		  on_vchan++;
-    }
-#endif
-  
-  if( chptr == NULL )
-    {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-		 me.name, parv[0], parv[1]);
-      return;
-    }
-
-  if (!chan_is_opless(chptr))
-  {
-    sendto_one(source_p, ":%s NOTICE %s :%s Channel is not opless",
-               me.name, parv[0], parv[1]);
-    return;
-  }
-
-  if ((ptr = find_user_link(&chptr->peons, source_p)))
-	  dlinkDelete(ptr, &chptr->peons);
-  else if ((ptr = find_user_link(&chptr->voiced, source_p)))
-	  dlinkDelete(ptr, &chptr->voiced);
-#ifdef HALFOPS
-  else if ((ptr = find_user_link(&chptr->halfops, source_p)))
-	  dlinkDelete(ptr, &chptr->halfops);
-#endif
-  else if ((ptr = find_user_link(&chptr->chanops, source_p)))
-	  dlinkDelete(ptr, &chptr->chanops);
-#ifdef REQUIRE_OANDV
-  else if((ptr = find_user_link(&chptr->chanops_voiced, source_p)))
-    dlinkDelete(ptr, &chptr->chanops_voiced);
-#endif
-  else
-    {
-       /* Theyre not even on the channel, bail. */
-       return;      
-    }
-
-  if((locptr = find_user_link(&chptr->locpeons, source_p)))
-    dlinkDelete(locptr, &chptr->locpeons);
-  else if((locptr = find_user_link(&chptr->locvoiced, source_p)))
-    dlinkDelete(locptr, &chptr->locvoiced);
-#ifdef HALFOPS
-  else if((locptr = find_user_link(&chptr->lochalfops, source_p)))
-    dlinkDelete(locptr, &chptr->lochalfops);
-#endif
-  else if((locptr = find_user_link(&chptr->locchanops, source_p)))
-    dlinkDelete(locptr, &chptr->locchanops);
-  
-#ifdef REQUIRE_OANDV
-  else if((locptr = find_user_link(&chptr->locchanops_voiced, source_p)))
-    dlinkDelete(locptr, &chptr->locchanops_voiced);
-#endif
-
-  else
-    return;
-
-  dlinkAdd(source_p, ptr, &chptr->chanops);
-  dlinkAdd(source_p, locptr, &chptr->locchanops);
-
-  if (!on_vchan)
-    {
-     if (parv[1][0] == '&')
-     {
-       sendto_wallops_flags(FLAGS_LOCOPS, &me,
-                            "OPME called for [%s] by %s!%s@%s",
-                            parv[1], source_p->name, source_p->username,
-                            source_p->host);
-     }
-     else
-     {
-       sendto_wallops_flags(FLAGS_WALLOP, &me,
-                            "OPME called for [%s] by %s!%s@%s",
-                            parv[1], source_p->name, source_p->username,
-                            source_p->host);
-       sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
-                     ":%s WALLOPS :OPME called for [%s] by %s!%s@%s",
-                     me.name, parv[1], source_p->name, source_p->username,
-                     source_p->host);
-     }
-     ilog(L_NOTICE, "OPME called for [%s] by %s!%s@%s",
-                   parv[1], source_p->name, source_p->username,
-                   source_p->host);
-    }
-  else
-    {
-     if (parv[1][0] == '&')
-     {
-       sendto_wallops_flags(FLAGS_LOCOPS, &me,
-                            "OPME called for [%s %s] by %s!%s@%s",
-                            parv[1], parv[2], source_p->name,
-                            source_p->username, source_p->host);
-     }
-     else
-     {
-       sendto_wallops_flags(FLAGS_WALLOP, &me,
-                            "OPME called for [%s %s] by %s!%s@%s",
-                            parv[1], parv[2], source_p->name,
-                            source_p->username, source_p->host);
-       sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
-                     ":%s WALLOPS :OPME called for [%s %s] by %s!%s@%s",
-                     me.name, parv[1], parv[2], source_p->name,
-                     source_p->username, source_p->host);
-     }
-     ilog(L_NOTICE, "OPME called for [%s %s] by %s!%s@%s",
-                   parv[1], parv[2], source_p->name, source_p->username,
-                   source_p->host);
-    }
-
-  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
-                 ":%s PART %s", ID(source_p), parv[1]);
-  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
-                ":%s PART %s", source_p->name, parv[1]);
-  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
-                ":%s SJOIN %ld %s + :@%s",
-                me.name, (signed long) chptr->channelts,
-                parv[1],
-                source_p->name /* XXX ID(source_p) */ );
-  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
-                ":%s SJOIN %ld %s + :@%s",
-                me.name, (signed long) chptr->channelts,
-                parv[1], source_p->name);
-  sendto_channel_local(ALL_MEMBERS, chptr,
-                       ":%s MODE %s +o %s",
-                       me.name, parv[1], source_p->name);
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_admin_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_admin_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_admin_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_admin_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,55 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_admin_notice.c: Sends a notice when someone uses ADMIN.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_admin_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int show_admin(struct hook_spy_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_admin", (hookfn *)show_admin);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_admin", (hookfn *)show_admin);
-}
-
-const char *_version = "$Revision: 1.6 $";
-
-int show_admin(struct hook_spy_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-                         "admin requested by %s (%s@%s) [%s]",
-                         data->source_p->name, data->source_p->username,
-                         data->source_p->host, data->source_p->user->server);
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_info_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_info_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_info_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_info_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,55 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_info_notice.c: Sends a notice when someone uses INFO.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_info_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int show_info(struct hook_spy_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_info", (hookfn *)show_info);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_info", (hookfn *)show_info);
-}
-
-const char *_version = "$Revision: 1.6 $";
-
-int show_info(struct hook_spy_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-                         "info requested by %s (%s@%s) [%s]",
-                         data->source_p->name, data->source_p->username,
-                         data->source_p->host, data->source_p->user->server);
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_links_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_links_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_links_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_links_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,57 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_links_notice.c: Sends a notice when someone uses LINKS.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_links_notice.c,v 1.11 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int
-show_links(struct hook_links_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_links", (hookfn *)show_links);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_links", (hookfn *)show_links);
-}
-
-const char *_version = "$Revision: 1.11 $";
-
-int
-show_links(struct hook_links_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-                         "LINKS '%s' requested by %s (%s@%s) [%s]",
-                         data->mask, data->source_p->name, data->source_p->username,
-                         data->source_p->host, data->source_p->user->server);
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_motd_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_motd_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_motd_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_motd_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,55 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_motd_notice.c: Sends a notice when someone uses MOTD.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_motd_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int show_motd(struct hook_spy_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_motd", (hookfn *)show_motd);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_motd", (hookfn *)show_motd);
-}
-
-const char *_version = "$Revision: 1.6 $";
-
-int show_motd(struct hook_spy_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-                         "motd requested by %s (%s@%s) [%s]",
-                         data->source_p->name, data->source_p->username,
-                         data->source_p->host, data->source_p->user->server);
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_stats_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_stats_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_stats_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_stats_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,81 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_stats_notice.c: Sends a notice when someone uses STATS.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_stats_notice.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int
-show_stats(struct hook_stats_data *);
-
-void
-_modinit(void)
-{
-	hook_add_hook("doing_stats", (hookfn *)show_stats);
-}
-
-void
-_moddeinit(void)
-{
-	hook_del_hook("doing_stats", (hookfn *)show_stats);
-}
-
-const char *_version = "$Revision: 1.12 $";
-
-/* show a stats request */
-int
-show_stats(struct hook_stats_data *data)
-{
-  if((data->statchar == 'L') || (data->statchar == 'l'))
-    {
-      if(data->name != NULL)
-	sendto_realops_flags(FLAGS_SPY, L_ALL,
-			     "STATS %c requested by %s (%s@%s) [%s] on %s",
-			     data->statchar,
-			     data->source_p->name,
-			     data->source_p->username,
-			     data->source_p->host,
-			     data->source_p->user->server,
-			     data->name);
-      else
-	sendto_realops_flags(FLAGS_SPY, L_ALL,
-			     "STATS %c requested by %s (%s@%s) [%s]",
-			     data->statchar,
-			     data->source_p->name,
-			     data->source_p->username,
-			     data->source_p->host,
-			     data->source_p->user->server);
-    }
-  else
-    {
-      sendto_realops_flags(FLAGS_SPY, L_ALL,
-                           "STATS %c requested by %s (%s@%s) [%s]",
-			   data->statchar, data->source_p->name, data->source_p->username,
-			   data->source_p->host, data->source_p->user->server);
-    }
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_trace_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_trace_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_trace_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_trace_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,67 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_trace_notice.c: Sends a notice when someone uses TRACE or LTRACE
- *
- *  Copyright (C) 2002 Hybrid Development Team
- *
- *  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
- *
- *  $Id: spy_trace_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int show_trace(struct hook_spy_data *);
-int show_ltrace(struct hook_spy_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_trace", (hookfn *)show_trace);
-  hook_add_hook("doing_ltrace", (hookfn *)show_ltrace);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_trace", (hookfn *)show_trace);
-  hook_del_hook("doing_ltrace", (hookfn *)show_ltrace);
-}
-
-const char *_version = "$Revision: 1.6 $";
-
-int show_trace(struct hook_spy_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-                         "trace requested by %s (%s@%s) [%s]",
-                         data->source_p->name, data->source_p->username,
-                         data->source_p->host, data->source_p->user->server);
-
-  return 0;
-}
-
-int show_ltrace(struct hook_spy_data *data)
-{
-  sendto_realops_flags(FLAGS_SPY, L_ALL,
-		       "ltrace requested by %s (%s@%s) [%s]",
-		       data->source_p->name, data->source_p->username,
-		       data->source_p->host, data->source_p->user->server);
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/contrib/spy_whois_notice.c ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_whois_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_whois_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/contrib/spy_whois_notice.c	Wed Dec 31 19:00:00 1969
@@ -1,63 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  spy_whois_notice.c: Sends a notice when someone uses WHOIS.
- *
- *  Copyright (C) 2002 by the past and present ircd coders, and others.
- *
- *  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
- *
- *  $Id: spy_whois_notice.c,v 1.10 2002/05/24 23:48:34 androsyn Exp $
- */
-#include "stdinc.h"
-#include "modules.h"
-#include "hook.h"
-#include "client.h"
-#include "ircd.h"
-#include "send.h"
-
-int
-show_notice(struct hook_mfunc_data *);
-
-void
-_modinit(void)
-{
-  hook_add_hook("doing_whois", (hookfn *)show_notice);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_hook("doing_whois", (hookfn *)show_notice);
-}
-
-const char *_version = "$Revision: 1.10 $";
-
-/* show a whois notice
-   source_p does a /whois on client_p */
-int
-show_notice(struct hook_mfunc_data *data)
-{
-  if (MyConnect(data->source_p) && MyConnect(data->client_p) &&
-      IsOper(data->client_p) && (data->client_p != data->source_p) 
-      && data->client_p->umodes & FLAGS_SPY) 
-    {
-      sendto_one(data->client_p, ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you",
-                 me.name, data->client_p->name, data->source_p->name, data->source_p->username,
-                 data->source_p->host);
-    }
-
-  return 0;
-}
diff -uNrd ircd-hybrid-7.0rc9/doc/mpb.txt ircd-hybrid-7.0rc9+mpb-rm/doc/mpb.txt
--- ircd-hybrid-7.0rc9/doc/mpb.txt	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/doc/mpb.txt	Tue Apr 15 16:45:56 2003
@@ -0,0 +1,333 @@
+December 21st 2002 - 9:24 AM EST - Last Revised February 20th 2003 - 2:21 PM EST
+It seems like every friend I have likes a more verbose ircd under their command. I personally agree  to an 
+extent, I like to at least know what my Opers are doing with a server. I am starting this modification off
+by coding certain options into the core modules, then moving what I can to contrib modules and attempting 
+to preserve the original core as much as possible. Options I must leave in the core will later on just be 
+configurable via config.h at compile time as any other option.
+
+Addoper/deloper and other similar functionality will also later be implemented. I am attempting to make the 
+config file modifyable via the irc client, this option has security concerns though, which is why it's 
+presence will also be optional. I expect all of this to be ready by the first Major release.
+
+The first major release of the mod will come after a few conditions are met. First off I want it to be on 
+the first version of Hybrid7 full release. Second, I would like several more options I have in mind that
+have yet to be implemented. These beta copies are built on a beta copy. The perfect time to test my version
+of things.
+
+I /might/ put these changes into hybrid6 as well, but if hybrid7 final comes out before I get bored enough 
+to feel a need to do that, I doubt i'll bother. Also when it goes final, i'm toying with a couple options 
+for names, like mpbmod or modmpb, maybe even something not using my initials, no clue. For now while it's
+beta it'll retain the version scheme +mpb-r<x>, x signifying the release. If this advances beyond Release Z, 
+before the final comes out I will resort to double characters (Release Y ... Release Z ... Release AA ...
+Release AB ... etc).
+
+
+Features:
+Operators with the +A (administrator) flag will show an added line in /whois "Admin is an IRC Administrator"
+Operators with the +A flag will see local spoofed users real ips in /whois.
+Operators with the +A flag will see propagated remote /whois's. This only works when the remote user has 
+        requested an idle time check.
+Operators can send mass messages to all users, rather than just those on the specified top level domain. The 
+        messages will only go serverwide if your server's hub has this functionality enabled. This feature
+        must be enabled network wide for this feature to allow network broadcasts.
+Administrators with the ChannelSpy Flag (+e) can see local channel /joins, /parts and /kicks.
+Administrators will see Secret and Private channels in /list and /whois (local users only).
+        Channels that are hidden, but still seen by admins names will be shown surrounded by ()s.
+Administrators can join channels past user modes such as +i, +k, +b, +l.
+Administrator channel kick exemption, only blocks local users from kicking administrators from channels.
+Administrator kill exemption, only blocks local operators from killing administrators.
+Some contrib modules have been added to the core modules directory.
+Setup script that creates a config.h based on user input, then walks the user through the build process.
+TCMs and OOMons modified to set umode +B will display in whois as Server Administrative Bots.
+
+
+Core Files modified: s_conf.c, s_user.c, channel.c, ircd_parser.y, ircd_lexer.l, messages.tab
+
+Core Modules modified: m_part.c, m_message.c, m_kick.c, m_kill.c
+
+System Modules modified: m_join.c, m_whois.c, m_version.c, m_trace.c
+
+Definition files modified: client.h, channel.h, config.h(config.h.pre, config.h.post, config.h.dist), numeric.h, 
+        patchlevel.h
+
+Contrib Modules moved to default install:
+m_map.c - Displays a network map to the irc client via the "map" command.
+m_mkpasswd.c - Generates an encryption string from plaintext input to be used by ircd as an oper password.
+m_ojoin.c - Allows Administrators to gain channel ops on channel join.
+m_opme.c - Allows Administrators to obtain Channel Operator status in a channel they are in.
+m_force.c - Allows Administrators to force users to join or part a specified channel.
+m_flags.c - Adds support for Comstud user modes.
+spy_admin_notice.c - Notifies Operators with the spy flag (+y) of /admin requests.
+spy_info_notice.c - Notifies Operators with the spy flag (+y) of /info requests.
+spy_links_notice.c - Notifies Operators with the spy flag (+y) of /links requests.
+spy_motd_notice.c - Notifies Operators with the spy flag (+y) of /motd requests.
+spy_stats_notice.c - Notifies Operators with the spy flag (+y) of /stats requests.
+spy_trace_notice.c - Notifies Operators with the spy flag (+y) of /trace requests.
+spy_whois_notice.c - Notifies Operators with the spy flag (+y) of /whois requests.
+
+Contrib Modules modified:
+m_ojoin.c - Modified to notify server operators of it's use.
+m_opme.c - Modified to notify server operators of it's use.
+m_force.c - Modified to be way more verbose, can no longer be used on administrators, remote forcejoin/part
+        requests are denied.
+m_flags.c - Added support for +mpb added user modes.
+
+Contrib Modules created:
+admin_line.c - Shows an added line when a whois is done on an admin. "TARGET is an IRC Server Administrator"
+realipinwhois.c - Shows an added line when a whois is done by an admin on a local user revealing their ip.
+serverbot.c - Shows an added line when a whois is done on a server bot. "TARGET is an IRC Server Administrative Bot"
+
+Other files created:
+Setup.sh - Setup utility to assist with configuration and compile time options
+OldSetup.sh - Converts +MPB to OldStyle Hybrid configuration
+
+
+Installation:
+There are two methods of installing ircd-hybrid-7+mpb. As of +mpb-ri administrators may now run the "Setup.sh"
+script, located at the root of the source installation. This will walk them through many of the config.h
+options, all the way through to the installation step itself. It does not yet, however generate an ircd.conf,
+that is planned for the near future though. You may also elect to use the "Old Style" method, and run ./configure,
+modify config.h manually, and build the program from command line.
+
+Some versions you can upgrade to by just reloading modules, and some have core server changes that require 
+a complete restart of the server. Further documentation about wether or not this is possible will come with 
+later releases, as this is a rather early stage of the project anyone who's using the code probably has a 
+direct line of contact with me anyway.
+
+
+Version Flags:
+Upon requesting a server's version information, you are presented with dialog familiar to experienced IRC 
+server administrators, but probably greek to a newbie who wouldn't likely be reading this document anyway. 
+The first line is the only one important to this section. This is what would be displayed in reply to a 
+version check in Release E:
+
+hybrid-7rc6+mpb-re(20021221_0).: irc.vulnerable.org egGHIMpZ TS5ow
+
+The section of characters directly following the server name (in this case, irc.vulnerable.org) "egGHIMpZ"
+describe several configuration options that are enabled in Hybrid7. I have added new flags that report
+certain options within my modifications. These flags are listed as follows:
+
+C ... CHANNELSPY - Admins see all local users channel join/part information.
+W ... RWHOIS_NOTICE - Admins with spy flag see remote whois requests.
+A ... ADMINSSEEALLCHANS - Admins see all secret/private channels in /list and /whois.
+O ... ADMINOWNAGE - Admins can join any channel regardless of channel's mode.
+D ... ADMINKICKEXEMPT - Blocks local users from kicking administrators from channels.
+K ... ADMINKILLEXEMPT - Blocks local opers from killing administrators.
+
+Lets give an example. Here is a version request from irc.null.com running Release F
+hybrid-7rc6+mpb-rf(20021225_0).: irc.null.com egGHIMpZCWA TS5ow
+
+irc.null.com has enabled the options RWHOIS_NOTICE, ADMINSSEEALLCHANS and CHANNELSPY, as per it's version 
+information. This info makes it simple for network admins to enforce network policy for users running this 
+mod. It also helps a (knowledgable) user determine wether or not the server in question is a suitable chat 
+environment for him.
+
+
+Config file options added:
+operator tree - serverbot = yes/no ... For TCMs/OOMons (configure them to set umode +B)
+
+Hybrid User Modes:
+e ... See Channelspy information.
+B ... Reserved for TCM/OOmon only (just adds the "server bot" message)
+
+Comstud User Modes:
+CHANNELSPY ... See Channelspy information.
+SERVERBOT  ... See Serverbot information.
+
+
+Release History:
+Release M - Internal Release (still under works) - April 15th 2003
+Several clean up and touch ups to the code base. Nothing major on this part.
+Fixed a bug in the ban code that outputted a garbled message to the banned user under certain circumstances.
+Changed Setup.sh to output commenting as well to the config.h file, for simpler after editing.
+
+Release L - Internal Release (still under works) - February 20th 2003
++mpb mod changes applied to ircd-hybrid7.0rc9, please view the release notes for hybrid7rc9 to obtain a detailed
+	list of changes.
+Fixed a major screwup with the allowwildtoplevel option, it works again, my mistake.
+Quite a bit of new comments in this release, should help me with porting to future versions.
+
+Release K - Internal Release (still under works) - February 8th 2003
+Added the B usermode which is for TCMs and OOMons, adds a message to users doing a whois on them stating that it
+        is a server administrative bot.
+A great deal of cleanup, and an even greater deal more commenting. I forgot how much I like comments as much
+        as I jump around the code (and as frequently as I take breaks from coding alltogether).
+Replaced the existance of config.h in default installations, you no longer need to run "OldSetup.sh" in order
+	to use the old style setup method (unless you've already run the Setup.sh script, without finishing the
+        configuration section of it. Setup.sh removes config.h if it exists in favor of generating a new one).
+
+Release J - Internal Release (still under works) - January 27th 2003
+Ported modifications to latest ircd-hybrid-7 release hybrid7-rc8. 
+Final cleanup of a few deprecated features.
+Several other misc cleanup procedures, primarily temporary stuff.
+
+Release I - Internal Release (still under works) - January 12th 2003
+This is primarily a maintenance release, though it's been a bit since i've released a version so might as
+        well put out what I have during the dev box transfer.
+Config.h is no longer in the default installation of +MPB, however config.h.dist (same file) can be copied in place.
+A new setup script was added, which will walk you through the setup process. It's really quite simple, it
+        generates a config.h based on replies to the scripts questions, then runs the configure and make steps.
+OldSetup.sh was also added, this script restores config.h.dist to the location of config.h, so that initializing
+        old-style installation becomes one single step.
+ConfSetup.sh is not setup yet, I expect to have this available in the next release.
+
+Release H - Internal Release (still under works) - January 3rd 2003
+Modified the contrib m_force.c module to prevent it from being used against Administrators. This function could
+        possibly be useful for administrative purposes. The module installs by default now.
+Began adding support for +mpb added usermodes in the contrib/m_flags.so "comstud userflags compatability" module.
+Moved m_flags.c to the default installation modules directory.
+Added code that shows secret channel names in whois surrounded by ()s. In this version, if you whois a user, and
+        a channel name similar to the following (@#blah), that means the channel @blah is secret (or private), but 
+        only shown to you because of your administrator status.
+Trace now shows Administrators as "Root" instead of "Oper".
+
+Release G - Internal Release (still under works) - December 29th 2002
+Fixed a problem with CHANNELSPY reporting kicks not pertaining to the local server at all. Limited the
+        output of kicks reported to only local users.
+Added ADMINKICKEXEMPT functionality. This is experimental and should not be used on a network unless
+        the entire network runs this piece of code. The function only works when the kick is executed by a
+        local user, and will not try to block remote users from kicking local administrators. This is to 
+        make it a little friendlier with servers that do not run this code. Attempting to block remote user
+        kicks only causes desync.
+Added the D Version Flag to report use of ADMINKICKEXEMPT in version requests.
+Added ADMINKILLEXEMPT function. This is highly experimental, but so far looks like it works. It's based
+        off the same approach I took with ADMINKICKEXEMPT, and only blocks local opers from killing admins.
+        Sort of pointless unless by a whole network.
+Added the K Version Flag to report use of ADMINKILLEXEMPT in version requests.
+
+Release F - Internal Release (still under works) - December 27th 2002
+Added the "REPORT_ADMINOWNAGE" option to config.h, when enabled hybrid will report (ab)use of functions 
+        tied to the ADMINOWNAGE option. Take care not to define REPORT_ADMINOWNAGE without defining 
+        ADMINOWNAGE as this will yield unpredictable results.
+Added flags to the version module that report what options of mpb mod are enabled. Refer to the new 
+        "Version Flags" section of this document for more information.
+Renamed spoofed_ipin_whois.c to realipinwhois.c, and show_admin_whois.c to admin_line.c. Made 
+        necessary adjustments to modules/Makefile.in
+Modified the m_opme.c m_ojoin.c modules to notify local operators when they are used.
+Fixed Channelspy, it was broadcasting info to all opers, regardless of user modes.
+Added the "e" usermode, Channelspy will now send to opers with the "A" and "e" user modes.
+
+Release E - Internal Release (still under works) - Christmas Day 2002
+Fixed an issue with server showing remote user channel parts.
+Added the "ALLOWWILDTOPLEVEL" option to config.h, when defined this allows Opers to use wildcards in place 
+        of the TLD in the /msg $* mass message command. The entire network you're linked to will need this code
+        in place in order to execute a network wide mass message command.
+Administrators with the +y flag will now see channel kicks.
+Added the "ADMINOWNAGE" option to config.h, when defined this allows Admins to join channels past modes such 
+        as bans, limits, keys and invite status.
+
+Release D - Internal Release (still under works) - December 23rd 2002
+Option added to config.h to toggle remote whois feature's availability. RWHOIS_NOTICE
+Administrators will see all channels a user is in (even secret/private).
+Option added to config.h to toggle admins seeing all chans. ADMINSSEEALLCHANS
+If CHANNELSPY is defined, Admins with the spy flag will see users join/create/leave channels.
+
+Release C - Internal Release (still under works) - December 21st 2002
+Fixed a problem with local admins seeing remote whois requests.
+Moved some contrib modules to the core modules directory.
+See Spoofed IP in whois added as a new module. spoofed_ipin_whois.c
+Moved "Show Admin info in /whois" code into it's own module show_admin_whois.c
+Fixed a problem with unspoofed users whois's showing the "user is spoofed" line.
+
+Release B - Internal Release (still under works) - December 21st 2002
+All changes from Release A are now implemented to ircd-hybrid-rc6
+
+Release A - Internal Release (still under works) - December 20th 2002
+Server admins with umode +a get "user is an IRC Administrator" message in /whois.
+Server admins see spoofed users' real ip in /whois.
+Opers will see remote /whois's being done on them.
+Modified m_opme.c to not check to see if a channel is opless. Also it will no longer broadcast it's use.
+
+
+Revision File Change History
+
+include/client.h                F,J,K,L
+include/channel.h               D,H,J,L,M
+include/config.h                D,E,F,G,I,J,L-Deprecated
+include/config.h.pre            I,J,L
+include/config.h.post           I,J,L
+include/config.h.dist           I,J,L
+include/numeric.h               A,B,H,J,K,L
+include/patchlevel.h            Changed every version.
+include/s_conf.h		K,L
+src/s_conf.c                    F,J,K,L
+src/s_user.c                    F,J,K,L
+src/channel.c                   E,F,J,L
+src/ircd_lexer.l		K,L
+src/ircd_parser.y               F,J,K,L
+src/messages.tab                A,B,H,J,K,L
+modules/m_join.c                D,F,J,L
+modules/m_flags.c               H,J,L
+modules/m_whois.c               A,B,C,D,H,J,L
+modules/m_version.c             F,G,J,L
+modules/m_trace.c               H,J,L
+modules/Makefile.in             C,F,H,J,K,L
+modules/m_opme.c                A,B,C,J,L
+modules/m_ojoin.c               F,J,L
+modules/realipinwhois.c         C,F,J,L
+modules/admin_line.c            C,F,G,J,L
+modules/serverbot.c		K,L
+modules/m_force.c               H,J,L
+modules/core/m_part.c           D,E,F,J,L
+modules/core/m_message.c        E,J,L
+modules/core/m_kick.c           F,G,J,L
+modules/core/m_kill.c           G,J,L
+contrib/Makefile.in             C,H,J,L
+doc/mpb.txt                     Changed every version.
+Setup.sh                        I,J,M
+OldSetup.sh                     I,J
+ConfSetup.sh			I,J
+
+
+To Do:
+Before 1.0:
+Port all modifications to each new version of ircd-hybrid7 released, at least until 1.0.
+Patiently await the arrival of ircd-hybrid7 1.0.
+Create diff files and some internal procedure to applying my modifications to a new version of hybrid7.
+Commands to allow server administrators manage their server configuration from their IRC client. Commands such as addoper
+	and addhub for Server Administrators so they don't have to hit the conf file quite so often.
+ConfSetup.sh script to simplify configuration of the ircd config files. This script will also prepare the files
+	for the setup needed to work with many of +MPB's enhanced features.
+SetHost command for Server Administrators to dynamicly change the hostname of a local user. This command won't change their
+	spoof in the configuration, there will be addspoof/delspoof commands for that.
+Improve upon the current Setup.sh script more.
+More CHANNELSPY functionality. For one thing, some admins would like to be spammed with channel modes too, that'll have 
+	to have another flag attached though.
+
+For Feature Versions beyond 1.0:
+Implement a more logical gline method, that doesn't require the server it was issued from to be present in order to 
+	keep a gline resident.
+Setup script will have more options added, and more source files will be generated in response to user input. I have a couple 
+	of features in particular in mind with this, such as the ability to compile the modules staticly, and modify the
+	source file which acts as the list of modules to compile in during a static compile. Options to include contrib 
+	modules in the install will also be added.
+Network Administrator status. Users with extended powers beyond Server Administrators. This status will be written
+	to have some prestigue to it, as the functionality will need to be enabled network-wide, and the Network Administrator
+	will have to be recognized by all hubs. More theory needs to be put into this concept, but it's on the list.
+Network Administration Bot - Status for hybserv, this needs alot of looking into still, conceptual and codewise. This
+	feature will be required network wide to work.
+New channel mode to designate a channel an IRC Operations Channel. This will prevent the use of some +MPB features in it,
+	and the channel mode can only be set by a user with a status of Server Administrator or above. This feature will
+	obviously be required network wide to work.
+Feature to modify part of the hostname of users without a specified spoof. This will leave enough of the mask visible
+	for people to add an adequate channel ban, and IRC Administrators will still see their real ip.
+
+
+Special Thanks:
+Matthew Scott - Ideas, Moral Support, UNIX Workspace, Testing Environment
+Brent Smith - Ideas, Moral Support, Code Help
+John Rowan - Ideas, Code Help
+The IRCD Hybrid Team - Love your work guys. =)
+The EFNet IRC Network - For showing myself and the world how well Hybrid does its job.
+The WFNet IRC Network - For allowing my test code to run.
+
+
+Contact:
+You can contact me either via email or IRC.
+I usually live on both irc.vulnerable.org and EFNet as Eblan.
+My Email address is mike@vulnerable.org
+
+
+ircd-hybrid-7 by the IRCD Hybrid Team - http://www.ircd-hybrid.net
+Modifications by Michael P. Bramel - http://www.vulnerable.org/mpb
+Programming interface provided by FreeBSD - http://www.freebsd.org
diff -uNrd ircd-hybrid-7.0rc9/include/channel.h ircd-hybrid-7.0rc9+mpb-rm/include/channel.h
--- ircd-hybrid-7.0rc9/include/channel.h	Fri Jan 31 18:00:25 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/channel.h	Thu Feb 20 13:27:20 2003
@@ -154,7 +154,13 @@
 
 #define HoldChannel(x)          (!(x))
 /* channel visible */
+#ifdef ADMINSSEEALLCHANS
+#define ShowChannel(v,c)        (PubChannel(c) || IsMember((v),(c)) || IsAdmin(v))
+#define MPBShowChannel(v,c)     (PubChannel(c) || IsMember((v),(c)))
+#endif
+#ifndef ADMINSSEEALLCHANS
 #define ShowChannel(v,c)        (PubChannel(c) || IsMember((v),(c)))
+#endif
 
 #define IsMember(who, chan) ((who && who->user && \
                 dlinkFind(&who->user->channel, chan)) ? 1 : 0)
diff -uNrd ircd-hybrid-7.0rc9/include/client.h ircd-hybrid-7.0rc9+mpb-rm/include/client.h
--- ircd-hybrid-7.0rc9/include/client.h	Sun Feb 16 17:54:35 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/client.h	Thu Feb 20 14:29:59 2003
@@ -340,6 +340,7 @@
 
 #define IsOper(x)		((x)->umodes & FLAGS_OPER)
 #define IsAdmin(x)		((x)->umodes & FLAGS_ADMIN)
+#define IsServerBot(x)          ((x)->umodes & FLAGS_SERVERBOT) /* mpb mod code */
 
 #define SetConnecting(x)        {(x)->status = STAT_CONNECTING; \
 				 (x)->handler = UNREGISTERED_HANDLER; }
@@ -415,6 +416,7 @@
 #define FLAGS_INVISIBLE    0x0400 /* makes user invisible */
 #define FLAGS_BOTS         0x0800 /* shows bots */
 #define FLAGS_EXTERNAL     0x1000 /* show servers introduced and splitting */
+#define FLAGS_CHANNELSPY   0x2000 /* channelspy flag - mpb */
 #define FLAGS_CALLERID     0x4000 /* block unless caller id's */
 #define FLAGS_UNAUTH       0x8000 /* show unauth connects here */
 #define FLAGS_LOCOPS       0x10000 /* show locops */
@@ -422,6 +424,7 @@
 /* user information flags, only settable by remote mode or local oper */
 #define FLAGS_OPER         0x20000 /* Operator */
 #define FLAGS_ADMIN        0x40000 /* Admin on server */
+#define FLAGS_SERVERBOT    0x80000 /* serverbot - mpb */ 
 
 #define FLAGS_ALL	   FLAGS_SERVNOTICE
 
@@ -442,6 +445,7 @@
 #define FLAGS2_OPER_DIE         0x0800  /* oper can die */
 #define FLAGS2_OPER_REHASH      0x1000  /* oper can rehash */
 #define FLAGS2_OPER_ADMIN       0x2000  /* oper can set umode +a */
+#define FLAGS2_OPER_BOT         0x4000  /* oper can set umode +B mpb */
 #define FLAGS2_OPER_FLAGS       (FLAGS2_OPER_GLOBAL_KILL | \
                                  FLAGS2_OPER_REMOTE | \
                                  FLAGS2_OPER_UNKLINE | \
@@ -450,6 +454,7 @@
                                  FLAGS2_OPER_K | \
                                  FLAGS2_OPER_DIE | \
                                  FLAGS2_OPER_REHASH| \
+                                 FLAGS2_OPER_BOT | \
                                  FLAGS2_OPER_ADMIN)
 
 #define FLAGS2_CBURST		0x10000  /* connection burst being sent */
@@ -460,12 +465,12 @@
                                                * been ended. */
 
 #define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | \
-                      FLAGS_ADMIN)
+                      FLAGS_ADMIN | FLAGS_SERVERBOT)       /* this line modified by mpb */
 #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_LOCOPS | \
- 		      FLAGS_ADMIN | FLAGS_UNAUTH | FLAGS_CALLERID)
+                      FLAGS_ADMIN | FLAGS_UNAUTH | FLAGS_CALLERID | FLAGS_CHANNELSPY | FLAGS_SERVERBOT) /* mpb */
 
 #define FLAGS_ID     (FLAGS_NEEDID | FLAGS_GOTID)
 
@@ -588,6 +593,8 @@
 #define SetOperRehash(x)        ((x)->flags2 |= FLAGS2_OPER_REHASH)
 #define IsOperAdmin(x)          ((x)->flags2 & FLAGS2_OPER_ADMIN)
 #define SetOperAdmin(x)         ((x)->flags2 |= FLAGS2_OPER_ADMIN)
+#define CanServerBot(x)         ((x)->flags2 & FLAGS2_OPER_BOT) /* mpb */
+#define SetServerBot(x)         ((x)->flags2 |= FLAGS2_OPER_BOT) /* mpb */
 
 #define IsFloodDone(x)          ((x)->flags2 & FLAGS2_FLOODDONE)
 #define SetFloodDone(x)         ((x)->flags2 |= FLAGS2_FLOODDONE)
diff -uNrd ircd-hybrid-7.0rc9/include/config.h ircd-hybrid-7.0rc9+mpb-rm/include/config.h
--- ircd-hybrid-7.0rc9/include/config.h	Thu Feb  6 03:46:11 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/config.h	Tue Apr 15 16:37:02 2003
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: config.h,v 7.142 2003/02/06 08:46:11 a1kmm Exp $
+ *  $Id: config.h,v 7.140 2002/07/10 00:05:51 leeh Exp $
  */
 
 #ifndef INCLUDED_config_h
@@ -157,6 +157,62 @@
 #define LIPATH  ETCPATH "/links.txt"            /* cached links file */
 #endif /* !VMS */
 
+/* RWHOIS_NOTICE - toggle support for seeing remote whois requests
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ */
+#define RWHOIS_NOTICE
+
+/* ADMINSSEEALLCHANS - Toggle support for admins seeing all chans in list and whois
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ */
+#define ADMINSSEEALLCHANS
+
+/* CHANNELSPY - Toggles support for Administrators seeing channel join/part/kick info.
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ * Not recommended on production servers.
+ */
+#define CHANNELSPY
+
+/* ALLOWWILDTOPLEVEL - If this is enabled, Hybrid will not require top level domains
+ * to be specified in mass messages from IRC Operators.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ */
+#define ALLOWWILDTOPLEVEL
+
+/* ADMINOWNAGE - Allows Administrators to join channels past channel modes such
+ * as bans, limits, invite only and keys.
+ * Added by Michael P. Bramel for hybrid7+mpb
+ * Not recommended on productions ervers.
+ */
+#define ADMINOWNAGE
+
+/* REPORT_ADMINOWNAGE - Reports use(abuse) of ADMINOWNAGE functionality to other
+ * server operators. Option ADMINOWNAGE must be enabled for this to work.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ * Most certainly recommended for production servers that have elected to use ADMINOWNAGE
+ *
+ * Please note, if this is defined without ADMINOWNAGE being defined, problems
+ * shall arise. Heed my warning.
+ */
+#define REPORT_ADMINOWNAGE
+
+/* ADMINKICKEXEMPT - Prevents Administrators from being kicked in channels.
+ * Highly experimental, but all testing of the feature proved positive.
+ * Should work if the entire network has this piece of code, will only prevent
+ * local users from kicking admins (remote or local) to avoid desync.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ * Not recommended on production servers
+ */
+#define ADMINKICKEXEMPT
+
+/* ADMINKILLEXEMPT - Prevents Administrators from being killed by Operators
+ * Please note this only stops kills by operators on this server, remote kills
+ * against local admins will not be stopped. A good way to /make sure/ your opers
+ * don't kill the really wrong people, the IRC network's administration.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ */
+#define ADMINKILLEXEMPT
+
 /* WANT_GETTEXT - toggle gettext support.
  * NOTE: if configure doesn't detect gettext, this won't do anything.
  */
@@ -300,12 +356,6 @@
 #define ANONOPS
 #define HALFOPS
 
-/*
- * The maximum number of local clients that are likely to close at once. If
- * this number is exceeded, it will still work, but it will be slower...
- */
-#define LOCAL_CLOSE_TABLE_SIZE 16
-
 /* END OF CONFIGURABLE OPTIONS */
 
 /* disable them for efnet */
@@ -345,6 +395,13 @@
 #define	USER_HEAP_SIZE		128
 #define	DNODE_HEAP_SIZE		256
 #define TOPIC_HEAP_SIZE		256
+#endif
+
+/* Sanity checks for hybrid-7+mpb
+ * DO NOT CHANGE ANY OF THIS!
+ */
+#ifndef ADMINOWNAGE
+#undef REPORT_ADMINOWNAGE
 #endif
 
 /* DEBUGMODE is used mostly for internal development, it is likely
diff -uNrd ircd-hybrid-7.0rc9/include/config.h.dist ircd-hybrid-7.0rc9+mpb-rm/include/config.h.dist
--- ircd-hybrid-7.0rc9/include/config.h.dist	Fri Jan 17 00:21:28 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/config.h.dist	Thu Feb 20 13:28:52 2003
@@ -1,6 +1,6 @@
 /*
  *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  config.h.dist: The ircd compile-time-configurable header.
+ *  config.h: The ircd compile-time-configurable header.
  *
  *  Copyright (C) 2002 by the past and present ircd coders, and others.
  *
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: config.h.dist,v 7.59 2003/01/17 05:21:28 db Exp $
+ *  $Id: config.h,v 7.140 2002/07/10 00:05:51 leeh Exp $
  */
 
 #ifndef INCLUDED_config_h
@@ -157,6 +157,62 @@
 #define LIPATH  ETCPATH "/links.txt"            /* cached links file */
 #endif /* !VMS */
 
+/* RWHOIS_NOTICE - toggle support for seeing remote whois requests
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ */
+#define RWHOIS_NOTICE
+
+/* ADMINSSEEALLCHANS - Toggle support for admins seeing all chans in list and whois
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ */
+#define ADMINSSEEALLCHANS
+
+/* CHANNELSPY - Toggles support for Administrators seeing channel join/part/kick info.
+ * Added by Michael P. Bramel for hybrid-7+mpb
+ * Not recommended on production servers.
+ */
+#define CHANNELSPY
+
+/* ALLOWWILDTOPLEVEL - If this is enabled, Hybrid will not require top level domains
+ * to be specified in mass messages from IRC Operators.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ */
+#define ALLOWWILDTOPLEVEL
+
+/* ADMINOWNAGE - Allows Administrators to join channels past channel modes such
+ * as bans, limits, invite only and keys.
+ * Added by Michael P. Bramel for hybrid7+mpb
+ * Not recommended on productions ervers.
+ */
+#define ADMINOWNAGE
+
+/* REPORT_ADMINOWNAGE - Reports use(abuse) of ADMINOWNAGE functionality to other
+ * server operators. Option ADMINOWNAGE must be enabled for this to work.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ * Most certainly recommended for production servers that have elected to use ADMINOWNAGE
+ *
+ * Please note, if this is defined without ADMINOWNAGE being defined, problems
+ * shall arise. Heed my warning.
+ */
+#define REPORT_ADMINOWNAGE
+
+/* ADMINKICKEXEMPT - Prevents Administrators from being kicked in channels.
+ * Highly experimental, but all testing of the feature proved positive.
+ * Should work if the entire network has this piece of code, will only prevent
+ * local users from kicking admins (remote or local) to avoid desync.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ * Not recommended on production servers
+ */
+#define ADMINKICKEXEMPT
+
+/* ADMINKILLEXEMPT - Prevents Administrators from being killed by Operators
+ * Please note this only stops kills by operators on this server, remote kills
+ * against local admins will not be stopped. A good way to /make sure/ your opers
+ * don't kill the really wrong people, the IRC network's administration.
+ * Added by Michael P. Bramel for Hybrid-7+mpb
+ */
+#define ADMINKILLEXEMPT
+
 /* WANT_GETTEXT - toggle gettext support.
  * NOTE: if configure doesn't detect gettext, this won't do anything.
  */
@@ -339,6 +395,13 @@
 #define	USER_HEAP_SIZE		128
 #define	DNODE_HEAP_SIZE		256
 #define TOPIC_HEAP_SIZE		256
+#endif
+
+/* Sanity checks for hybrid-7+mpb
+ * DO NOT CHANGE ANY OF THIS!
+ */
+#ifndef ADMINOWNAGE
+#undef REPORT_ADMINOWNAGE
 #endif
 
 /* DEBUGMODE is used mostly for internal development, it is likely
diff -uNrd ircd-hybrid-7.0rc9/include/config.h.post ircd-hybrid-7.0rc9+mpb-rm/include/config.h.post
--- ircd-hybrid-7.0rc9/include/config.h.post	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/include/config.h.post	Thu Feb 20 13:28:52 2003
@@ -0,0 +1,121 @@
+/* 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.
+ */
+#ifndef SMALL_NET
+#define NICKNAMEHISTORYLENGTH 15000
+#else
+#define NICKNAMEHISTORYLENGTH 1500
+#endif
+/* 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 */
+
+/* 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
+ * automatically to switch for the current nick of that user. (seconds)
+ */
+#define KILLCHASETIMELIMIT 90   /* Recommended value: 90 */
+
+/*
+ * 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
+
+/* CODE DISABLE SECTION
+ *
+ * If you have enabled efnet specific code these will be disabled automatically
+ * else they are here for anyone else.
+ */
+#define VCHANS
+#define ANONOPS
+#define HALFOPS
+
+/* END OF CONFIGURABLE OPTIONS */
+
+/* disable them for efnet */
+#ifdef EFNET
+#undef VCHANS
+#undef ANONOPS
+#undef HALFOPS
+#ifndef HIDE_SERVERS_IPS
+#define HIDE_SERVERS_IPS
+#endif
+#ifndef HIDE_SPOOF_IPS
+#define HIDE_SPOOF_IPS
+#endif
+#ifndef TS5_ONLY
+#define TS5_ONLY
+#endif
+#endif
+
+/* 
+ * Default pre-allocations for various things...
+ */  
+#ifndef SMALL_NET  /* Normal net */
+#define CHANNEL_HEAP_SIZE	1024
+#define BAN_HEAP_SIZE		1024
+#define CLIENT_HEAP_SIZE	1024
+#define LCLIENT_HEAP_SIZE	512
+#define LINEBUF_HEAP_SIZE	1024
+#define	USER_HEAP_SIZE		1024
+#define	DNODE_HEAP_SIZE		2048
+#define TOPIC_HEAP_SIZE		1024
+#else  /* Small Net */
+#define CHANNEL_HEAP_SIZE	256
+#define BAN_HEAP_SIZE		128
+#define CLIENT_HEAP_SIZE	256
+#define LCLIENT_HEAP_SIZE	128
+#define LINEBUF_HEAP_SIZE	128
+#define	USER_HEAP_SIZE		128
+#define	DNODE_HEAP_SIZE		256
+#define TOPIC_HEAP_SIZE		256
+#endif
+
+/* Sanity checks for hybrid-7+mpb
+ * DO NOT CHANGE ANY OF THIS!
+ */
+#ifndef ADMINOWNAGE
+#undef REPORT_ADMINOWNAGE
+#endif
+
+/* 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.*/
+
+/*
+ * this checks for various things that should never happen, but
+ * might do due to bugs.  ircd might be slightly more efficient with 
+ * these disabled, who knows. keep this enabled during development.
+ */
+#define INVARIANTS
+
+#define CONFIG_H_LEVEL_7
+
+#include "defaults.h"
+#endif /* INCLUDED_config_h */
diff -uNrd ircd-hybrid-7.0rc9/include/config.h.pre ircd-hybrid-7.0rc9+mpb-rm/include/config.h.pre
--- ircd-hybrid-7.0rc9/include/config.h.pre	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/include/config.h.pre	Thu Feb 20 13:28:52 2003
@@ -0,0 +1,158 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  config.h: The ircd compile-time-configurable header.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: config.h,v 7.140 2002/07/10 00:05:51 leeh Exp $
+ */
+
+#ifndef INCLUDED_config_h
+#define INCLUDED_config_h
+
+#include "setup.h"
+
+
+/*
+ * IRCD-HYBRID-7 COMPILE TIME CONFIGURATION OPTIONS
+ *
+ * Most of the items which used to be configurable in here have
+ * been moved into the new improved ircd.conf file.
+ * If you can't find something, look in doc/example.conf
+ *
+ * -davidt
+ */
+
+/*
+ * File Descriptor limit
+ *
+ * These limits are ultra-low to guarantee the server will work properly
+ * in as many environments as possible.  They can probably be increased
+ * significantly, if you know what you are doing.
+ *
+ * Note that HARD_FDLIMIT_ is modified with the maxclients setting in
+ * configure.  You should only touch this if you know what you are doing!!!
+ *
+ * If you are using select for the IO loop, you may also need to increase
+ * the value of FD_SETSIZE by editting the Makefile.  However, using
+ * --enable-kqueue, --enable-devpoll, or --enable-poll if at all possible,
+ * is highly recommended.
+ *
+ * VMS should be able to use any suitable value here, other operating
+ * systems may require kernel patches, configuration tweaks, or ulimit
+ * adjustments in order to exceed certain limits (e.g. 1024, 4096 fds).
+ */
+#define HARD_FDLIMIT_    MAX_CLIENTS + 60 + 20
+
+/* XXX - MAX_BUFFER is mostly ignored. */
+/*
+ * Maximum number of connections to allow.
+ *
+ * MAX_BUFFER  is the number of fds to reserve, e.g. for clients
+ *             exempt from limit.
+ *
+ * 10 file descriptors are reserved for logging, DNS lookups, etc.,
+ * so MAX_CLIENTS + MAX_BUFFER + 10 must not exceed HARD_FDLIMIT.
+ * NOTE: MAX_CLIENTS is set with configure now
+ */
+#define MAX_BUFFER      60
+
+#ifdef VMS
+/* *PATH - directory locations and filenames for VMS.
+ *
+ * Non VMS systems see below.
+ *
+ * IRCD_PREFIX = prefix for all directories,
+ * DPATH       = root directory of installation,
+ * BINPATH     = directory for binary files,
+ * ETCPATH     = directory for configuration files,
+ * LOGPATH     = directory for logfiles,
+ * MODPATH     = directory for autoloaded modules (disabled in VMS),
+ * MSGPATH     = directory for gettext message files (disabled in VMS).
+ */
+
+/* IRCD_PREFIX not needed in VMS -larne */
+/*#define IRCD_PREFIX     "IRCD$BASEDIR:"*/
+#define DPATH           "IRCD$BASEDIR:"
+#define BINPATH         "IRCD$BINDIR:"
+#define ETCPATH         "IRCD$CONFDIR:"
+#define LOGPATH         "IRCD$LOGDIR:"
+
+#undef  MODPATH
+#undef  AUTOMODPATH
+#undef  MSGPATH
+
+#define SPATH   BINPATH "IRCD.EXE"              /* server executable */
+#define SLPATH  BINPATH "SERVLINK.EXE"          /* servlink executable */
+#define CPATH   ETCPATH "IRCD.CONF"             /* config file */
+#define KPATH   ETCPATH "KLINE.CONF"            /* kline file */
+#define DLPATH  ETCPATH "DLINE.CONF"            /* dline file */
+#define GPATH   LOGPATH "GLINE.LOG"             /* gline logfile */
+#define RPATH   ETCPATH "IRCD.RSA"              /* RSA private key file */
+#define MPATH   ETCPATH "IRCD.MOTD"             /* MOTD filename */
+#define LPATH   LOGPATH "IRCD.LOG"              /* logfile */
+#define PPATH   ETCPATH "IRCD.PID"              /* pid file */
+#define HPATH   ETCPATH "OPERS.TXT"             /* oper help file */
+#define UHPATH  ETCPATH "USERS.TXT"             /* user help file */
+#define OPATH   ETCPATH "OPERS.MOTD"            /* oper MOTD file */
+#define LIPATH  ETCPATH "LINKS.TXT"             /* cached LINKS file */
+#else /* VMS */
+/* 
+ * Directory paths and filenames for UNIX systems.
+ * IRCD_PREFIX is set using ./configure --prefix, see INSTALL.
+ * The other defaults should be fine.
+ *
+ * NOTE: CHANGING THESE WILL NOT ALTER THE DIRECTORY THAT FILES WILL
+ *       BE INSTALLED TO.  IF YOU CHANGE THESE, DO NOT USE MAKE INSTALL,
+ *       BUT COPY THE FILES MANUALLY TO WHERE YOU WANT THEM.
+ *
+ * IRCD_PREFIX = prefix for all directories,
+ * DPATH       = root directory of installation,
+ * BINPATH     = directory for binary files,
+ * ETCPATH     = directory for configuration files,
+ * LOGPATH     = directory for logfiles,
+ * MODPATH     = directory for modules,
+ * AUTOMODPATH = directory for autoloaded modules
+ * MSGPATH     = directory for gettext message files.
+ */
+
+/* dirs */
+#define DPATH   IRCD_PREFIX                                                     
+#define BINPATH IRCD_PREFIX "/bin/"
+#define MODPATH IRCD_PREFIX "/modules/"
+#define AUTOMODPATH IRCD_PREFIX "/modules/autoload/"
+#define MSGPATH IRCD_PREFIX "/messages/"
+#define ETCPATH IRCD_PREFIX "/etc"
+#define LOGPATH IRCD_PREFIX "/logs"
+#define UHPATH   IRCD_PREFIX "/help/users"
+#define HPATH  IRCD_PREFIX "/help/opers"
+
+/* files */
+#define SPATH   BINPATH "/ircd"                 /* ircd executable */
+#define SLPATH  BINPATH "/servlink"             /* servlink executable */
+#define CPATH   ETCPATH "/ircd.conf"            /* ircd.conf file */
+#define KPATH   ETCPATH "/kline.conf"           /* kline file */
+#define DLPATH  ETCPATH "/dline.conf"           /* dline file */
+#define GPATH   LOGPATH "/gline.log"            /* gline logfile */
+#define RPATH   ETCPATH "/ircd.rsa"             /* ircd rsa private keyfile */
+#define MPATH   ETCPATH "/ircd.motd"            /* MOTD file */
+#define LPATH   LOGPATH "/ircd.log"             /* ircd logfile */
+#define PPATH   ETCPATH "/ircd.pid"             /* pid file */
+#define OPATH   ETCPATH "/opers.motd"           /* oper MOTD file */
+#define LIPATH  ETCPATH "/links.txt"            /* cached links file */
+#endif /* !VMS */
diff -uNrd ircd-hybrid-7.0rc9/include/numeric.h ircd-hybrid-7.0rc9+mpb-rm/include/numeric.h
--- ircd-hybrid-7.0rc9/include/numeric.h	Wed Nov 27 10:46:24 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/include/numeric.h	Thu Feb 20 13:31:12 2003
@@ -71,6 +71,7 @@
 #define RPL_TRACEOPERATOR    204
 #define RPL_TRACEUSER        205
 #define RPL_TRACESERVER      206
+#define RPL_TRACEADMINISTRATOR    207   /* mpb */
 #define RPL_TRACENEWTYPE     208
 #define RPL_TRACECLASS       209
 
@@ -244,8 +245,11 @@
 #define RPL_NOTOPIC          331
 #define RPL_TOPIC            332
 #define RPL_TOPICWHOTIME     333
+#define RPL_SERVERBOT        334        /* mpb */
 /*	RPL_COMMANDSYNTAX    334	   Dalnet */
 /*	RPL_LISTSYNTAX	     334	   unreal */
+#define RPL_WHOISADM         335        /* mpb */
+#define RPL_WHOISIP          336        /* mpb */
 /*      RPL_CHANPASSOK       338           IRCnet extension (?)*/
 #define	RPL_WHOISACTUALLY    338	/* dalnet */
 /*	RPL_WHOISACTUALLY    338	   Undernet extension, dalnet */
diff -uNrd ircd-hybrid-7.0rc9/include/patchlevel.h ircd-hybrid-7.0rc9+mpb-rm/include/patchlevel.h
--- ircd-hybrid-7.0rc9/include/patchlevel.h	Thu Feb 20 00:41:04 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/patchlevel.h	Thu Feb 20 15:03:47 2003
@@ -23,5 +23,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL   "hybrid-7.0rc9"
+#define PATCHLEVEL   "hybrid-7.0rc9+mpb-rm"
 #endif
diff -uNrd ircd-hybrid-7.0rc9/include/s_conf.h ircd-hybrid-7.0rc9+mpb-rm/include/s_conf.h
--- ircd-hybrid-7.0rc9/include/s_conf.h	Sat Feb 15 19:22:21 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/include/s_conf.h	Thu Feb 20 14:52:54 2003
@@ -163,6 +163,7 @@
 #define CONF_OPER_REHASH        0x0040
 #define CONF_OPER_DIE           0x0080
 #define CONF_OPER_ADMIN         0x0100
+#define CONF_SERVER_BOT		0x0200 /* mpb */
 
 struct config_file_entry
 {
diff -uNrd ircd-hybrid-7.0rc9/modules/Makefile.in ircd-hybrid-7.0rc9+mpb-rm/modules/Makefile.in
--- ircd-hybrid-7.0rc9/modules/Makefile.in	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/Makefile.in	Thu Feb 20 14:27:28 2003
@@ -103,7 +103,23 @@
   m_wallops.c \
   m_who.c \
   m_whois.c \
-  m_whowas.c 
+  m_whowas.c \
+  realipinwhois.c \
+  admin_line.c \
+  serverbot.c \
+  m_map.c \
+  m_mkpasswd.c \
+  m_ojoin.c \
+  m_opme.c \
+  m_force.c \
+  m_flags.c \
+  spy_admin_notice.c \
+  spy_info_notice.c \
+  spy_links_notice.c \
+  spy_motd_notice.c \
+  spy_stats_notice.c \
+  spy_trace_notice.c \
+  spy_whois_notice.c
 
 ALL_SRCS = $(CORE_SRCS) \
            $(SRCS)
diff -uNrd ircd-hybrid-7.0rc9/modules/admin_line.c ircd-hybrid-7.0rc9+mpb-rm/modules/admin_line.c
--- ircd-hybrid-7.0rc9/modules/admin_line.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/admin_line.c	Thu Feb 20 13:59:12 2003
@@ -0,0 +1,61 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  Shows So and So is an IRC Administrator to person whois'ing admin
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  admin_line.c,v 1.01 2002/12/29 3:02:00 AM Mike Bramel
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+#include "numeric.h"
+
+int
+show_notice(struct hook_mfunc_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_whois", (hookfn *)show_notice);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_whois", (hookfn *)show_notice);
+}
+
+const char *_version = "$Revision: 1.00 $";
+
+/* show a whois notice
+   source_p does a /whois on client_p */
+int
+show_notice(struct hook_mfunc_data *data)
+{
+  if (IsOper(data->client_p) && data->client_p->umodes & FLAGS_ADMIN) 
+    {
+      sendto_one(data->source_p, form_str(RPL_WHOISADM),
+                 me.name, data->source_p->name, data->client_p->name);
+    }
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/core/m_kick.c ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_kick.c
--- ircd-hybrid-7.0rc9/modules/core/m_kick.c	Sat Feb  1 15:12:24 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_kick.c	Thu Feb 20 14:09:28 2003
@@ -184,6 +184,29 @@
       return;
     }
 
+/* mpb code segment */
+#ifdef ADMINKICKEXEMPT
+  if (IsAdmin(who) && MyConnect(source_p) && !IsAdmin(source_p))
+      {
+      sendto_one(source_p,":%s NOTICE %s :%s is an IRC Administrator and cannot be kicked",
+                 me.name, parv[0], parv[2]);
+      if (MyConnect(who))
+      {
+      sendto_one(who, ":%s NOTICE %s :Your IRC Administrator status prevented you from being kicked from %s by %s (%s@%s) on %s [%s]",
+                 me.name, parv[2], chptr->chname, source_p->name, source_p->username,
+                 source_p->host, source_p->user->server, comment);
+      }
+      if (!MyConnect(who))
+      {
+      sendto_one(who, ":%s NOTICE %s :Notice*** Your IRC Administrator status prevented you from being kicked from %s by %s (%s@%s) on %s [%s]",
+                 me.name, parv[2], chptr->chname, source_p->name, source_p->username,
+                 source_p->host, source_p->user->server, comment);
+      }
+      return;
+  }
+#endif
+/* mpb code segment end */
+
   if (IsMember(who, chptr))
     {
       /* half ops cannot kick other halfops on private channels */
@@ -246,6 +269,13 @@
                     parv[0], chptr->chname,
                     who->name, comment);
       if (!IsDefunct(who))
+#ifdef CHANNELSPY  
+        if (MyConnect(source_p) || MyConnect(who))
+          sendto_realops_flags(FLAGS_SPY && FLAGS_ADMIN, L_ALL,
+                        "User %s (%s@%s) has been kicked from channel %s by %s (%s@%s) for [%s]",
+                        who->name, who->username, who->host, chptr->chname, source_p->name,
+                        source_p->username, source_p->host, comment);
+#endif
 	remove_user_from_channel(chptr, who);
     }
   else
diff -uNrd ircd-hybrid-7.0rc9/modules/core/m_kill.c ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_kill.c
--- ircd-hybrid-7.0rc9/modules/core/m_kill.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_kill.c	Thu Feb 20 14:11:29 2003
@@ -128,6 +128,29 @@
       return;
     }
 
+/* begin mpb code segment */
+#ifdef ADMINKILLEXEMPT
+  if (IsAdmin(target_p) && !IsAdmin(source_p) && MyConnect(source_p))
+      {
+      sendto_one(source_p,":%s NOTICE %s :%s is an IRC Administrator and cannot be killed",
+                 me.name, source_p, parv[1]);
+      if (MyConnect(target_p))
+      {
+      sendto_one(target_p, ":%s NOTICE %s :Your IRC Administrator status prevented you from being killed by %s (%s@%s) on %s [%s]",
+                 me.name, target_p, source_p->name, source_p->username,
+                 source_p->host, source_p->user->server, reason);
+      }
+      else
+      {
+      sendto_one(target_p, ":%s NOTICE %s :Notice*** Your IRC Administrator status prevented you from being killed by %s (%s@%s) on %s [%s]",
+                 me.name, parv[1], source_p->name, source_p->username,
+                 source_p->host, source_p->user->server, reason);
+      }
+      return;
+  }
+#endif
+/* end code segment */
+
   if(MyConnect(target_p))
     sendto_one(target_p, ":%s!%s@%s KILL %s :%s", 
 	       source_p->name, source_p->username, source_p->host,
diff -uNrd ircd-hybrid-7.0rc9/modules/core/m_message.c ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_message.c
--- ircd-hybrid-7.0rc9/modules/core/m_message.c	Mon Feb  3 00:25:47 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_message.c	Thu Feb 20 14:05:22 2003
@@ -926,12 +926,15 @@
     while (*++s)
       if (*s == '.' || *s == '*' || *s == '?')
         break;
+
+#ifndef ALLOWWILDTOPLEVEL /* mpb code */
     if (*s == '*' || *s == '?')
     {
       sendto_one(source_p, form_str(ERR_WILDTOPLEVEL),
                  me.name, source_p->name, nick);
       return;
     }
+#endif /* mpb code */
     
     sendto_match_butone(IsServer(client_p) ? client_p : NULL, source_p,
                         nick + 1,
diff -uNrd ircd-hybrid-7.0rc9/modules/core/m_part.c ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_part.c
--- ircd-hybrid-7.0rc9/modules/core/m_part.c	Thu Feb  6 03:46:06 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/core/m_part.c	Thu Feb 20 14:00:21 2003
@@ -196,5 +196,18 @@
                          source_p->host,
                          bchan->chname);
   }
+
+/* begin mpb segment */
+#ifdef CHANNELSPY  
+        if (MyConnect(source_p))
+        {
+          sendto_realops_flags(FLAGS_CHANNELSPY, L_ADMIN,
+                        "User %s (%s@%s) is leaving channel %s",
+                        source_p->name, source_p->username,
+                        source_p->host, chptr->chname);
+        }
+#endif
+/* end segment */
+
   remove_user_from_channel(chptr, source_p);
 }
diff -uNrd ircd-hybrid-7.0rc9/modules/m_flags.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_flags.c
--- ircd-hybrid-7.0rc9/modules/m_flags.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_flags.c	Thu Feb 20 13:50:46 2003
@@ -0,0 +1,437 @@
+/*
+ *  m_flags.c: Implements comstud-style mode flags.
+ *
+ *  Copyright 2002 by W. Campbell and the ircd-hybrid development team
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *  1.Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer. 
+ *  2.Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution. 
+ *  3.The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission. 
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  $Id: m_flags.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+#include "s_user.h"    /* send_umode_out() */
+
+
+static void m_flags(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void mo_flags(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+
+static char *set_flags_to_string(struct Client *client_p);
+static char *unset_flags_to_string(struct Client *client_p);
+
+struct Message test_msgtab = {
+  "FLAGS", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_flags, m_ignore, mo_flags}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&test_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&test_msgtab);
+}
+
+const char *_version = "$Revision: 1.9 $";
+#endif
+
+/* FLAGS requires it's own mini parser, since the last parameter in it can
+** contain a number of FLAGS.  CS handles FLAGS mode1 mode2 OR
+** FLAGS :mode1 mode2, but not both mixed.
+**
+** The best way to match a flag to a mode is with a simple table
+*/
+
+struct FlagTable
+{
+  char *name;
+  int mode;
+  int oper;
+};
+
+static struct FlagTable flag_table[] =
+{
+  /* name		mode it represents	oper only? */
+  { "OWALLOPS",		FLAGS_OPERWALL,		1 },
+  { "SWALLOPS",		FLAGS_WALLOP,		0 },
+  { "STATSNOTICES",	FLAGS_SPY,		1 },
+    /* We don't have a separate OKILL and SKILL modes */
+  { "OKILLS",		FLAGS_SKILL,		0 },
+  { "SKILLS",		FLAGS_SKILL,		0 },
+  { "SNOTICES",		FLAGS_SERVNOTICE,	0 },
+    /* We don't have separate client connect and disconnect modes */
+  { "CLICONNECTS",	FLAGS_CCONN,		1 },
+  { "CLIDISCONNECTS",	FLAGS_CCONN,		1 },
+    /* I'm taking a wild guess here... */
+  { "THROTTLES",	FLAGS_REJ,		1 },
+#if 0
+    /* This one is special...controlled via an oper block option */
+  { "NICKCHANGES",	FLAGS_NCHANGE,		1 },
+    /* NICKCHANGES must be checked for separately */
+#endif
+    /* I'm assuming this is correct... */
+  { "IPMISMATCHES",	FLAGS_UNAUTH,		1 },
+  { "LWALLOPS",		FLAGS_LOCOPS,		1 },
+    /* These aren't separate on Hybrid */
+  { "CONNECTS",		FLAGS_EXTERNAL,		1 },
+  { "SQUITS",		FLAGS_EXTERNAL,		1 },
+    /* Now we have our Hybrid specific flags */
+  { "FULL",		FLAGS_FULL,		1 },
+    /* Not in CS, but we might as well put it here */
+  { "INVISIBLE",	FLAGS_INVISIBLE,	0 },
+  { "BOTS",		FLAGS_BOTS,		1 },
+  { "CALLERID",		FLAGS_CALLERID,		0 },
+  { "UNAUTH",		FLAGS_UNAUTH,		1 },
+  { "DEBUG",		FLAGS_DEBUG,		1 },
+  { "CHANNELSPY",       FLAGS_CHANNELSPY,       1 },
+  { "SERVERBOT",        FLAGS_SERVERBOT,        1 },
+  { NULL,		0,			0 }
+};
+
+/* We won't control CALLERID or INVISIBLE in here */
+
+#define FL_ALL_USER_FLAGS (FLAGS_WALLOP | FLAGS_SKILL | FLAGS_SERVNOTICE )
+
+/* and we don't control NCHANGES here either */
+
+#define FL_ALL_OPER_FLAGS (FL_ALL_USER_FLAGS | FLAGS_CCONN | FLAGS_REJ |\
+                           FLAGS_FULL | FLAGS_SPY | FLAGS_DEBUG |\
+                           FLAGS_OPERWALL | FLAGS_BOTS | FLAGS_EXTERNAL |\
+                           FLAGS_UNAUTH | FLAGS_LOCOPS )
+
+/*
+** m_flags
+**      parv[0] = sender prefix
+**      parv[1] = parameter
+*/
+static void m_flags(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  int i,j;
+  int isadd;
+  int setflags;
+  int isgood;
+  char *p;
+  char *flag;
+
+  if (parc < 2)
+  {
+    /* Generate a list of what flags you have and what you are missing,
+    ** and send it to the user
+    */
+    sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+               me.name, parv[0], set_flags_to_string(source_p));
+    sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+               me.name, parv[0], unset_flags_to_string(source_p));
+    return;
+  }
+
+  /* Preserve the current flags */
+  setflags = source_p->umodes;
+
+/* XXX - change this to support a multiple last parameter like ISON */
+
+  for (i = 1; i < parc; i++)
+  {
+    for (flag = strtoken(&p, parv[i], " "); flag;
+         flag = strtoken(&p, NULL, " "))
+    {
+      /* We default to being in ADD mode */
+      isadd = 1;
+
+      /* We default to being in BAD mode */
+      isgood = 0;
+
+      if (!isalpha(flag[0]))
+      {
+        if (flag[0] == '-')
+          isadd = 0;
+        else if (flag[0] == '+')
+          isadd = 1;
+        flag++;
+      }
+
+      /* support ALL here */
+      if (!irccmp(flag, "ALL"))
+      {
+        if (isadd)
+          source_p->umodes |= FL_ALL_USER_FLAGS;
+        else
+          source_p->umodes &= ~FL_ALL_USER_FLAGS;
+        sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+                   me.name, parv[0], set_flags_to_string(source_p));
+        sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+                   me.name, parv[0], unset_flags_to_string(source_p));
+        send_umode_out(client_p, source_p, setflags);
+        return;
+      }
+
+      for (j = 0; flag_table[j].name; j++)
+      {
+        if (!flag_table[j].oper && !irccmp(flag, flag_table[j].name))
+        {
+          if (isadd)
+            source_p->umodes |= flag_table[j].mode;
+          else
+            source_p->umodes &= ~ (flag_table[j].mode);
+          isgood = 1;
+          continue;
+        }
+      }
+      /* This for ended without matching a valid FLAG, here is where
+      ** I want to operate differently than ircd-comstud, and just ignore
+      ** the invalid flag, send a warning and go on.
+      */
+      if (!isgood)
+        sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
+                   me.name, parv[0], flag);
+    }
+  }
+
+  /* All done setting the flags, print the notices out to the user
+  ** telling what flags they have and what flags they are missing
+  */
+  sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+             me.name, parv[0], set_flags_to_string(source_p));
+  sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+             me.name, parv[0], unset_flags_to_string(source_p));
+
+  send_umode_out(client_p, source_p, setflags);
+}
+
+/*
+** mo_flags
+**      parv[0] = sender prefix
+**      parv[1] = parameter
+*/
+static void mo_flags(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{		 
+  int i,j;
+  int isadd;
+  int setflags;
+  int isgood;
+  char *p;
+  char *flag;
+
+  if (parc < 2)
+  {
+    /* Generate a list of what flags you have and what you are missing,
+    ** and send it to the user
+    */
+    sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+               me.name, parv[0], set_flags_to_string(source_p));
+    sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+               me.name, parv[0], unset_flags_to_string(source_p));
+    return;
+  }
+
+  /* Preserve the current flags */
+  setflags = source_p->umodes;
+
+/* XXX - change this to support a multiple last parameter like ISON */
+
+  for (i = 1; i < parc; i++)
+  {
+    for (flag = strtoken(&p, parv[i], " "); flag;
+         flag = strtoken(&p, NULL, " "))
+    {
+      /* We default to being in ADD mode */
+      isadd = 1;
+
+      /* We default to being in BAD mode */
+      isgood = 0;
+
+      if (!isalpha(flag[0]))
+      {
+        if (flag[0] == '-')
+          isadd = 0;
+        else if (flag[0] == '+')
+          isadd = 1;
+        flag++;
+      }
+
+      /* support ALL here */
+      if (!irccmp(flag, "ALL"))
+      {
+        if (isadd)
+          source_p->umodes |= FL_ALL_OPER_FLAGS;
+        else
+          source_p->umodes &= ~FL_ALL_OPER_FLAGS;
+        sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+                   me.name, parv[0], set_flags_to_string(source_p));
+        sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+                   me.name, parv[0], unset_flags_to_string(source_p));
+        send_umode_out(client_p, source_p, setflags);
+        return;
+      }
+
+      if (!irccmp(flag, "NICKCHANGES"))
+      {
+        if (!IsOperN(source_p))
+        {
+          sendto_one(source_p,
+                     ":%s NOTICE %s :*** You need oper and N flag for +n",
+                     me.name,parv[0]);
+          continue;
+        }
+        if (isadd)
+          source_p->umodes |= FLAGS_NCHANGE;
+        else
+          source_p->umodes &= ~FLAGS_NCHANGE;
+        isgood = 1;
+        continue;
+      }
+
+      for (j = 0; flag_table[j].name; j++)
+      {
+        if (!irccmp(flag, flag_table[j].name))
+        {
+          if (isadd)
+            source_p->umodes |= flag_table[j].mode;
+          else
+            source_p->umodes &= ~ (flag_table[j].mode);
+          isgood = 1;
+          continue;
+        }
+      }
+      /* This for ended without matching a valid FLAG, here is where
+      ** I want to operate differently than ircd-comstud, and just ignore
+      ** the invalid flag, send a warning and go on.
+      */
+      if (!isgood)
+        sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
+                   me.name, parv[0], flag);
+    }
+  }
+
+  /* All done setting the flags, print the notices out to the user
+  ** telling what flags they have and what flags they are missing
+  */
+  sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
+             me.name, parv[0], set_flags_to_string(source_p));
+  sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
+             me.name, parv[0], unset_flags_to_string(source_p));
+
+  send_umode_out(client_p, source_p, setflags);
+}
+
+static char *set_flags_to_string(struct Client *client_p)
+{
+  /* XXX - list all flags that we have set on the client */
+  static char setflags[BUFSIZE + 1];
+  int i;
+
+  /* Clear it to begin with, we'll be doing a lot of ircsprintf's */
+  setflags[0] = '\0';
+
+  /* Unlike unset_flags_to_string(), we don't have to care about oper
+  ** flags and not showing them
+  */
+
+  for (i = 0; flag_table[i].name; i++)
+  {
+    if (client_p->umodes & flag_table[i].mode)
+    {
+      ircsprintf(setflags, "%s %s", setflags, flag_table[i].name);
+    }
+  }
+
+#if 0
+  if (IsOper(client_p) && IsOperN(client_p))
+  {
+#endif
+    /* You can only be set +NICKCHANGES if you are an oper and
+    ** IsOperN(client_p) is true
+    */
+    if (client_p->umodes & FLAGS_NCHANGE)
+    {
+      ircsprintf(setflags, "%s %s", setflags, "NICKCHANGES");
+    }
+#if 0
+  }
+#endif
+
+  return setflags;
+}
+
+static char *unset_flags_to_string(struct Client *client_p)
+{
+  /* Inverse of above */
+  /* XXX - list all flags that we do NOT have set on the client */
+  static char setflags[BUFSIZE + 1];
+  int i,isoper;
+
+  /* Clear it to begin with, we'll be doing a lot of ircsprintf's */
+  setflags[0] = '\0';
+
+  if (IsOper(client_p))
+    isoper = 1;
+  else
+    isoper = 0;
+
+  for (i = 0; flag_table[i].name; i++)
+  {
+    if ( !(client_p->umodes & flag_table[i].mode))
+    {
+      if (!isoper && flag_table[i].oper)
+        continue;
+      ircsprintf(setflags, "%s %s", setflags, flag_table[i].name);
+    }
+  }
+
+  if (IsOper(client_p) && IsOperN(client_p))
+  {
+    if ( !(client_p->umodes & FLAGS_NCHANGE))
+    {
+      ircsprintf(setflags, "%s %s", setflags, "NICKCHANGES");
+    }
+  }
+
+  return setflags;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/m_force.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_force.c
--- ircd-hybrid-7.0rc9/modules/m_force.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_force.c	Thu Feb 20 13:59:37 2003
@@ -0,0 +1,373 @@
+/* contrib/m_force.c
+ * Copyright (C) 2002 Hybrid Development Team
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *  1.Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  2.Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *  3.The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $Id: m_force.c,v 1.17 2002/11/01 13:24:41 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "hash.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "channel.h"
+#include "channel_mode.h"
+
+
+static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[]);
+static void mo_forcepart(struct Client *client_p, struct Client *source_p,
+		         int parc, char *parv[]);
+
+struct Message forcejoin_msgtab = {
+  "FORCEJOIN", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_not_oper, mo_forcejoin, mo_forcejoin}
+};
+struct Message forcepart_msgtab = {
+  "FORCEPART", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_not_oper, mo_forcepart, mo_forcepart}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&forcejoin_msgtab);
+  mod_add_cmd(&forcepart_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&forcejoin_msgtab);
+  mod_del_cmd(&forcepart_msgtab);
+}
+
+char *_version = "$Revision: 1.17 $";
+#endif
+
+/*
+ * m_forcejoin
+ *      parv[0] = sender prefix
+ *      parv[1] = user to force
+ *      parv[2] = channel to force them into
+ */
+static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *chptr;
+  int type;
+  char mode;
+  char sjmode;
+  char *newch;
+
+  if(!IsAdmin(source_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+    return;
+  }
+
+  /* if target_p is not existent, print message
+   * to source_p and bail - scuzzy
+   */
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+	       source_p->name, parv[1]);
+    return;
+  }
+
+  if (!MyConnect(target_p))
+  {
+    sendto_one(target_p, ":%s FORCEJOIN %s %s", parv[0], parv[1], parv[2]);
+    return;
+  }
+
+  /* select our modes from parv[2] if they exist... (chanop)*/
+  if(*parv[2] == '@')
+  {
+    type = CHFL_CHANOP;
+    mode = 'o';
+    sjmode = '@';
+  }
+#ifdef HALFOPS
+  else if(*parv[2] == '%')
+  {
+    type = CHFL_HALFOP;
+    mode = 'h';
+    sjmode = '%';
+  }
+#endif
+  else if(*parv[2] == '+')
+  {
+    type = CHFL_VOICE;
+    mode = 'v';
+    sjmode = '+';
+  }
+  else
+  {
+    type = CHFL_PEON;
+    mode = sjmode = '\0';
+  }
+    
+  if(mode != '\0')
+    parv[2]++;
+
+/* Added by Michael P. Bramel for Hybrid7+mpb
+ *
+ * Here, we announce to the local opers one intends to use this command
+ */  
+    sendto_realops_flags(FLAGS_SPY, L_ALL,"%s (%s@%s) is requesting FORCEJOIN on %s (%s@%s) to channel %s",
+               source_p->name, source_p->username, source_p->host,
+               target_p->name, target_p->username, target_p->host, parv[2]);
+/* This segments denies remote opers permission to FORCEJOIN *OUR* users */
+  if (!MyConnect(source_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :***Notice Permission Denied, remote FORCEJOINs are prohibited on this server.",
+               me.name, parv[0]);
+    sendto_realops_flags(FLAGS_SPY, L_ALL,"%s (%s@%s) on %s attempted to FORCEJOIN %s (%s@%s) to channel %s",
+               source_p->name, source_p->username, source_p->host,
+               source_p->user->server, target_p->name, target_p->username,
+               target_p->host, parv[2]);
+    return;
+  }
+/* This segment prevents Administrators from being forced */
+  if (IsAdmin(target_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :%s is an IRC Administrator and is immune to FORCEJOIN",
+               me.name, parv[0], parv[1]);
+    sendto_one(target_p, ":%s NOTICE %s :Your IRC Administrator status prevented %s (%s@%s) from using FORCEJOIN %s on you", 
+               me.name, parv[1], parv[0], source_p->username, source_p->host, parv[2]);
+    return;
+  }
+/* End */
+
+  if((chptr = hash_find_channel(parv[2])) != NULL)
+    {
+      if(IsMember(target_p, chptr))
+      {
+        /* debugging is fun... */
+        sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s", me.name,
+		   source_p->name, target_p->name, chptr->chname);
+	return;
+      }
+
+      add_user_to_channel(chptr, target_p, type);
+
+      if (chptr->chname[0] != '&')
+        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+	              ":%s SJOIN %lu %s + :%c%s",
+	              me.name, (unsigned long) chptr->channelts,
+	              chptr->chname, type ? sjmode : ' ', target_p->name);
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+                             target_p->name, target_p->username,
+                             target_p->host, chptr->chname);
+
+      if(type)
+        sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +%c %s",
+	                     me.name, chptr->chname, mode, target_p->name);
+        
+      if(chptr->topic != NULL)
+      {
+	sendto_one(target_p, form_str(RPL_TOPIC), me.name,
+	           target_p->name, chptr->chname, chptr->topic);
+        sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
+	           me.name, source_p->name, chptr->chname,
+	           chptr->topic_info, chptr->topic_time);
+      }
+
+      channel_member_names(target_p, chptr, chptr->chname, 1);
+    }
+  else
+    {
+      newch = parv[2];
+      if (!check_channel_name(newch))
+      {
+        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+		   source_p->name, (unsigned char*)newch);
+	return;
+      }
+
+      /* channel name must begin with & or # */
+      if (!IsChannelName(newch))
+      {
+        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+		   source_p->name, (unsigned char*)newch);
+        return;
+      }
+
+     /* it would be interesting here to allow an oper
+      * to force target_p into a channel that doesn't exist
+      * even more so, into a local channel when we disable
+      * local channels... but...
+      * I don't want to break anything - scuzzy
+      */
+      if (ConfigServerHide.disable_local_channels &&
+	  (*newch == '&'))
+      {
+        sendto_one(source_p, ":%s NOTICE %s :No such channel (%s)", me.name,
+		   source_p->name, newch);
+        return;
+      }
+
+      /* newch can't be longer than CHANNELLEN */
+      if (strlen(newch) > CHANNELLEN)
+      {
+	sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
+		   source_p->name);
+        return;
+      }
+
+      chptr = get_or_create_channel(target_p, newch, NULL);
+      add_user_to_channel(chptr, target_p, CHFL_CHANOP);
+
+      /* send out a join, make target_p join chptr */
+      if (chptr->chname[0] != '&')
+        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+                      ":%s SJOIN %lu %s +nt :@%s", me.name,
+		      (unsigned long) chptr->channelts, chptr->chname,
+		      target_p->name);
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+                             target_p->name, target_p->username,
+                             target_p->host, chptr->chname);
+
+      chptr->mode.mode |= MODE_TOPICLIMIT;
+      chptr->mode.mode |= MODE_NOPRIVMSGS;
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name,
+                           chptr->chname);
+
+      target_p->localClient->last_join_time = CurrentTime;
+      channel_member_names(target_p, chptr, chptr->chname, 1);
+
+      /* we do this to let the oper know that a channel was created, this will be
+       * seen from the server handling the command instead of the server that
+       * the oper is on.
+       */
+      sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
+		 source_p->name, chptr->chname);
+    }
+}
+
+
+static void mo_forcepart(struct Client *client_p, struct Client *source_p,
+		         int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *chptr;
+
+  if(!IsAdmin(source_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+    return;
+  }
+
+  /* if target_p == NULL then let the oper know */
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+               source_p->name, parv[1]);
+    return;
+  }
+
+  if (!MyConnect(target_p))
+  {
+    sendto_one(target_p, ":%s FORCEPART %s %s", parv[0], parv[1], parv[2]);
+    return;
+  }
+
+  if((chptr = hash_find_channel(parv[2])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+               me.name, parv[0], parv[2]);
+    return;
+  }
+
+/* Added by Michael P. Bramel for Hybrid7+mpb
+ *
+ * Here, we announce to the local opers one intends to use this command
+ */
+    sendto_realops_flags(FLAGS_SPY, L_ALL,"%s (%s@%s) is requesting FORCEPART on %s (%s@%s) from channel %s",
+               source_p->name, source_p->username, source_p->host,
+               target_p->name, target_p->username, target_p->host, parv[2]);
+
+/* This segment prevents remote users from FORCEPARTing *OUR* users */
+  if (!MyConnect(source_p))
+  { 
+    sendto_one(source_p, ":%s NOTICE %s :***Notice Permission Denied, remote FORCEPARTs are prohibited on this server.",
+               me.name, parv[0]);
+    sendto_realops_flags(FLAGS_SPY, L_ALL,"%s (%s@%s) on %s attempted to FORCEPART %s (%s@%s) from channel %s",               
+               source_p->name, source_p->username, source_p->host,
+               source_p->user->server, target_p->name, target_p->username,
+               target_p->host, parv[2]);
+    return;
+  } 
+/* Prevents Administrators from being FORCEd */
+  if (IsAdmin(target_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :%s is an IRC Administrator and is immune to FORCEPART",
+               me.name, parv[0], parv[1]);
+    sendto_one(target_p, ":%s NOTICE %s :Your IRC Administrator status prevented %s (%s@%s) from using FORCEPART %s on you",
+               me.name, parv[1], parv[0], source_p->username, source_p->host, parv[2]);
+    return;
+  }
+/* End */
+
+  if (!IsMember(target_p, chptr))
+  {
+    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
+               me.name, parv[0], parv[2], parv[1]);
+    return;
+  }
+  
+  if (chptr->chname[0] != '&')
+    sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+		  ":%s PART %s :%s",
+		  target_p->name, chptr->chname,
+		  target_p->name);
+
+  sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
+                       target_p->name, target_p->username,
+ 	               target_p->host,chptr->chname,
+		       target_p->name);
+  remove_user_from_channel(chptr, target_p);
+}
+
diff -uNrd ircd-hybrid-7.0rc9/modules/m_join.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_join.c
--- ircd-hybrid-7.0rc9/modules/m_join.c	Sat Feb  1 15:11:45 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_join.c	Thu Feb 20 13:50:29 2003
@@ -366,6 +366,16 @@
 			       ":%s MODE %s %s %s",
 			       me.name, root_chptr->chname,
 			       modebuf, parabuf);
+
+/* mpb code segment */
+#ifdef CHANNELSPY  
+          sendto_realops_flags(FLAGS_CHANNELSPY, L_ADMIN,
+                        "User %s (%s@%s) is creating channel %s",
+                        source_p->name, source_p->username,
+                        source_p->host, root_chptr->chname);
+#endif
+/* end mpb code */
+
 	}
       else
 	{
@@ -380,6 +390,14 @@
 			       source_p->host, root_chptr->chname);
         }
 
+/* mpb code segment */
+#ifdef CHANNELSPY
+          sendto_realops_flags(FLAGS_CHANNELSPY, L_ADMIN,
+                        "User %s (%s@%s) is joining channel %s",
+                        source_p->name, source_p->username,
+                        source_p->host, root_chptr->chname);
+#endif
+/* end segment */
 
       del_invite(chptr, source_p);
       
diff -uNrd ircd-hybrid-7.0rc9/modules/m_map.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_map.c
--- ircd-hybrid-7.0rc9/modules/m_map.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_map.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,156 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_map.c: Sends an Undernet compatible map to a user.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: m_map.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
+ */
+
+#include "stdinc.h"
+#include "client.h"
+#include "modules.h"
+#include "handlers.h"
+#include "numeric.h"
+#include "send.h"
+#include "s_conf.h"
+
+#define USER_COL       50 /* display | Users: %d at col 50 */
+
+static void m_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void mo_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void dump_map(struct Client *client_p,struct Client *root, char *pbuf);
+
+struct Message map_msgtab = {
+  "MAP", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_map, m_ignore, mo_map}
+};
+
+#ifndef STATIC_MODULES
+void _modinit(void)
+{
+  mod_add_cmd(&map_msgtab);
+}
+
+void _moddeinit(void)
+{
+  mod_del_cmd(&map_msgtab);
+}
+
+const char *_version = "$Revision: 1.12 $";
+#endif
+
+static char buf[BUFSIZE];
+
+/* m_map
+**	parv[0] = sender prefix
+*/
+static void m_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  if (!ConfigServerHide.flatten_links)
+  {
+    dump_map(client_p,&me,buf);
+    sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+    return;
+  }
+
+  m_not_oper(client_p,source_p,parc,parv);
+  return;
+}
+
+/*
+** mo_map
+**      parv[0] = sender prefix
+*/
+static void mo_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  dump_map(client_p,&me,buf);
+  sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+}
+
+/*
+** dump_map
+**   dumps server map, called recursively.
+*/
+static void dump_map(struct Client *client_p,struct Client *root_p, char *pbuf)
+{
+  int cnt = 0, i = 0, len;
+  int users = 0;
+  struct Client *server_p,*user_p;
+        
+  *pbuf= '\0';
+       
+  strncat(pbuf,root_p->name,BUFSIZE - ((size_t) pbuf - (size_t) buf));
+  len = strlen(buf);
+  buf[len] = ' ';
+	
+  if (len < USER_COL)
+  {
+     for (i = len+1; i < USER_COL; i++)
+     {
+       buf[i] = '-';
+     }
+  }
+	
+  /* FIXME: add serv->usercnt */
+  for( user_p = root_p->serv->users; user_p; user_p = user_p->lnext )
+    users++;
+        
+  snprintf(buf + USER_COL, BUFSIZE - USER_COL,
+           " | Users: %5d (%4.1f%%)", users,
+           100 * (float) users / (float) Count.total);
+        
+  sendto_one(client_p, form_str(RPL_MAP),me.name,client_p->name,buf);
+        
+  if ((server_p = root_p->serv->servers))
+  {
+    for (; server_p; server_p = server_p->lnext)
+    {
+      cnt++;
+    }
+    
+    if (cnt)
+    {
+      if (pbuf > buf + 3)
+      {
+        pbuf[-2] = ' ';
+        if (pbuf[-3] == '`')
+          pbuf[-3] = ' ';
+      }
+    }
+  }
+  for (i = 1,server_p = root_p->serv->servers; server_p; server_p=server_p->lnext)
+  {
+    *pbuf = ' ';
+    if (i < cnt)
+      *(pbuf + 1) = '|';
+    else
+      *(pbuf + 1) = '`';
+      
+    *(pbuf + 2) = '-';
+    *(pbuf + 3) = ' ';
+    dump_map(client_p,server_p,pbuf+4);
+ 
+    i++;
+   }
+}
+
diff -uNrd ircd-hybrid-7.0rc9/modules/m_mkpasswd.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_mkpasswd.c
--- ircd-hybrid-7.0rc9/modules/m_mkpasswd.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_mkpasswd.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,168 @@
+/*
+ *  m_mkpasswd.c: Encrypts a password online, DES or MD5.
+ *
+ *  Copyright 2002 W. Campbell and the ircd-hybrid development team
+ *  Based on mkpasswd.c, originally by Nelson Minar (minar@reed.edu)
+ *
+ *  You can use this code in any way as long as these names remain.
+ *
+ *  $Id: m_mkpasswd.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+#include <string.h>
+
+extern char *crypt();
+
+static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static char *make_salt(void);
+static char *make_md5_salt(void);
+
+static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
+
+struct Message test_msgtab = {
+  "MKPASSWD", 0, 0, 1, 2, MFLG_SLOW, 0,
+  {m_unregistered, m_mkpasswd, m_ignore, mo_mkpasswd}
+};
+
+#ifndef STATIC_MODULES
+void _modinit(void)
+{
+  mod_add_cmd(&test_msgtab);
+}
+
+void _moddeinit(void)
+{
+  mod_del_cmd(&test_msgtab);
+}
+
+const char *_version = "$Revision: 1.9 $";
+#endif
+
+static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  static time_t last_used = 0;
+  int is_md5 = 0;
+
+  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
+    {
+      /* safe enough to give this on a local connect only */
+      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      return;
+    }
+  else
+    {
+      last_used = CurrentTime;
+    }
+
+  if (parc == 3)
+  {
+    if (!irccmp(parv[2], "MD5"))
+    {
+      is_md5 = 1;
+    }
+    else if (!irccmp(parv[2], "DES"))
+    {
+      /* Not really needed, but we may want to have a default encryption
+       * setting somewhere down the road
+       */
+      is_md5 = 0;
+    }
+    else
+    {
+      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
+      return;
+    }
+  }
+
+  if(parc == 1)
+    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+               me.name, parv[0], "MKPASSWD");
+  else
+    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
+               me.name, parv[0], parv[1], crypt(parv[1],
+               is_md5 ? make_md5_salt() : make_salt()));
+}
+
+/*
+** mo_test
+**      parv[0] = sender prefix
+**      parv[1] = parameter
+*/
+static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{		 
+  int is_md5 = 0;
+
+  if (parc == 3)
+  {
+    if (!irccmp(parv[2], "MD5"))
+    {
+      is_md5 = 1;
+    }
+    else if (!irccmp(parv[2], "DES"))
+    {
+      /* Not really needed, but we may want to have a default encryption
+       * setting somewhere down the road
+       */
+      is_md5 = 0;
+    }
+    else
+    {
+      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
+      return;
+    }
+  }
+
+  if (parc == 1)
+    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+               me.name, parv[0], "MKPASSWD");
+  else
+    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
+               me.name, parv[0], parv[1], crypt(parv[1],
+               is_md5 ? make_md5_salt() : make_salt()));
+}
+
+static char *make_salt(void)
+{
+  static char salt[3];
+  salt[0] = saltChars[random() % 64];
+  salt[1] = saltChars[random() % 64];
+  salt[2] = '\0';
+  return salt;
+}
+
+static char *make_md5_salt(void)
+{
+  static char salt[13];
+  int i;
+  salt[0] = '$';
+  salt[1] = '1';
+  salt[2] = '$';
+  for (i=3; i<11; i++)
+    salt[i] = saltChars[random() % 64];
+  salt[11] = '$';
+  salt[12] = '\0';
+  return salt;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/m_ojoin.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_ojoin.c
--- ircd-hybrid-7.0rc9/modules/m_ojoin.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_ojoin.c	Thu Feb 20 13:58:56 2003
@@ -0,0 +1,207 @@
+/*   contrib/m_ojoin.c
+ *   Copyright (C) 2002 Hybrid Development Team
+ *
+ *   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_ojoin.c,v 1.01x1.11 2002/06/11 01:49:18 androsyn Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "client.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"
+#include "hash.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "vchannel.h"
+#include "list.h"
+#include "channel_mode.h"
+
+static void mo_ojoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[]);
+
+struct Message ojoin_msgtab = {
+  "OJOIN", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_ignore, mo_ojoin}
+};
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&ojoin_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&ojoin_msgtab);
+}
+
+char *_version = "$Revision: 1.11 $";
+
+/*
+** mo_ojoin
+**      parv[0] = sender prefix
+**      parv[1] = channel
+*/
+static void mo_ojoin(struct Client *client_p, struct Client *source_p,
+                        int parc, char *parv[])
+{
+  struct Channel *chptr, *root_chptr;
+  int move_me = 0;
+#ifdef VCHANS
+  int on_vchan = 0;
+#endif
+
+  /* admins only */
+  if (!IsAdmin(source_p))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+      return;
+    }
+
+  /* XXX - we might not have CBURSTed this channel if we are a lazylink
+   * yet. */
+  if (*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
+    {
+      parv[1]++;
+      move_me = 1;
+    }
+
+  chptr= hash_find_channel(parv[1]);
+  root_chptr = chptr;
+
+#ifdef VCHANS
+  if (chptr && parc > 2 && parv[2][0] == '!')
+    {
+      chptr = find_vchan(chptr, parv[2]);
+      if (root_chptr != chptr)
+        on_vchan++;
+    }
+#endif
+
+  if( chptr == NULL )
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		 me.name, parv[0], parv[1]);
+      return;
+    }
+
+  if(IsMember(source_p, chptr))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
+                 me.name, source_p->name, parv[1]);
+      return;
+    }
+
+  if (move_me == 1)
+    parv[1]--;
+
+  if (*parv[1] == '@') 
+    {
+       add_user_to_channel(chptr, source_p, CHFL_CHANOP);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :@%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
+                       me.name, chptr->chname, source_p->name);
+
+    }
+#ifdef HALFOPS
+  else if (*parv[1] == '%')
+    {
+       add_user_to_channel(chptr, source_p, CHFL_HALFOP);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :%%%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +h %s",
+                       me.name, chptr->chname, source_p->name);
+    }
+#endif
+  else if (*parv[1] == '+')
+    {
+       add_user_to_channel(chptr, source_p, CHFL_VOICE);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :+%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s",
+                       me.name, chptr->chname, source_p->name);
+    }
+  else
+    {
+       add_user_to_channel(chptr, source_p, CHFL_PEON);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                       ":%s SJOIN %lu %s + :%s",
+                       me.name, chptr->channelts,
+		       chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+    }
+
+       sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) used OJOIN %s",
+                       source_p->name, source_p->username,
+                       source_p->host, parv[1]);
+
+  /* send the topic... */
+  if (chptr->topic != NULL)
+  {
+    sendto_one(source_p, form_str(RPL_TOPIC), me.name,
+	       source_p->name, chptr->chname, chptr->topic);
+    sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
+	       source_p->name, chptr->chname, chptr->topic_info,
+	       chptr->topic_time);
+  }
+
+  /* XXX - check this isn't too big above... */
+#ifdef VCHANS
+  if (on_vchan)
+    add_vchan_to_client_cache(source_p,root_chptr,chptr);
+#endif
+
+  source_p->localClient->last_join_time = CurrentTime;
+  channel_member_names(source_p, chptr, chptr->chname, 1);
+}
+
diff -uNrd ircd-hybrid-7.0rc9/modules/m_opme.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_opme.c
--- ircd-hybrid-7.0rc9/modules/m_opme.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_opme.c	Thu Feb 20 13:58:46 2003
@@ -0,0 +1,193 @@
+/*   contrib/m_opme.c
+ *   Copyright (C) 2002 Hybrid Development Team
+ *
+ *   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_opme.c,v 1.28 2002/09/19 16:14:32 bill Exp $
+ */
+/*   Modified by Michael P. Bramel - 12/21/2002
+ *   Version 1.02x1.28
+ */
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "client.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"
+#include "hash.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "vchannel.h"
+
+
+static void mo_opme(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static int chan_is_opless(struct Channel *chptr);
+
+struct Message opme_msgtab = {
+  "OPME", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_ignore, mo_opme}
+};
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&opme_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&opme_msgtab);
+}
+
+char *_version = "$Revision: 1.01x1.28 $";
+
+static int chan_is_opless(struct Channel *chptr)
+{
+  if (chptr->chanops.head)
+	  return 0;
+  else
+	  return 1;
+}
+
+/*
+** mo_opme
+**      parv[0] = sender prefix
+**      parv[1] = channel
+*/
+static void mo_opme(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct Channel *chptr, *root_chptr;
+  int on_vchan = 0;
+  dlink_node *ptr;
+  dlink_node *locptr;
+  
+  /* admins only */
+  if (!IsAdmin(source_p))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name,
+                 parv[0]);
+      return;
+    }
+
+  /* XXX - we might not have CBURSTed this channel if we are a lazylink
+   * yet. */
+  chptr= hash_find_channel(parv[1]);
+  root_chptr = chptr;
+
+#ifdef VCHANS
+  if (chptr && parc > 2 && parv[2][0] == '!')
+    {
+      chptr = find_vchan(chptr, parv[2]);
+      if (root_chptr != chptr)
+		  on_vchan++;
+    }
+#endif
+  
+  if( chptr == NULL )
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		 me.name, parv[0], parv[1]);
+      return;
+    }
+/* Comment this out to disable opless check */
+/*  if (!chan_is_opless(chptr))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :%s Channel is not opless",
+               me.name, parv[0], parv[1]);
+    return;
+  }
+*/
+  if ((ptr = find_user_link(&chptr->peons, source_p)))
+	  dlinkDelete(ptr, &chptr->peons);
+  else if ((ptr = find_user_link(&chptr->voiced, source_p)))
+	  dlinkDelete(ptr, &chptr->voiced);
+#ifdef HALFOPS
+  else if ((ptr = find_user_link(&chptr->halfops, source_p)))
+	  dlinkDelete(ptr, &chptr->halfops);
+#endif
+  else if ((ptr = find_user_link(&chptr->chanops, source_p)))
+	  dlinkDelete(ptr, &chptr->chanops);
+#ifdef REQUIRE_OANDV
+  else if((ptr = find_user_link(&chptr->chanops_voiced, source_p)))
+    dlinkDelete(ptr, &chptr->chanops_voiced);
+#endif
+  else
+    {
+       /* Theyre not even on the channel, bail. */
+       return;      
+    }
+
+  if((locptr = find_user_link(&chptr->locpeons, source_p)))
+    dlinkDelete(locptr, &chptr->locpeons);
+  else if((locptr = find_user_link(&chptr->locvoiced, source_p)))
+    dlinkDelete(locptr, &chptr->locvoiced);
+#ifdef HALFOPS
+  else if((locptr = find_user_link(&chptr->lochalfops, source_p)))
+    dlinkDelete(locptr, &chptr->lochalfops);
+#endif
+  else if((locptr = find_user_link(&chptr->locchanops, source_p)))
+    dlinkDelete(locptr, &chptr->locchanops);
+  
+#ifdef REQUIRE_OANDV
+  else if((locptr = find_user_link(&chptr->locchanops_voiced, source_p)))
+    dlinkDelete(locptr, &chptr->locchanops_voiced);
+#endif
+
+  else
+    return;
+
+  dlinkAdd(source_p, ptr, &chptr->chanops);
+  dlinkAdd(source_p, locptr, &chptr->locchanops);
+/* Comment out following lines to disable broadcasting of use */
+  if (!on_vchan)
+    {
+       sendto_realops_flags(FLAGS_ALL, L_ALL, "OPME called for [%s] by %s!%s@%s",
+                            parv[1], source_p->name, source_p->username,
+                            source_p->host);
+    }
+  else
+    {
+       sendto_realops_flags(FLAGS_ALL, L_ALL, "OPME called for [%s %s] by %s!%s@%s",
+                            parv[1], parv[2], source_p->name,
+                            source_p->username, source_p->host);
+    }
+
+  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                 ":%s PART %s", ID(source_p), parv[1]);
+  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                ":%s PART %s", source_p->name, parv[1]);
+  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                ":%s SJOIN %ld %s + :@%s",
+                me.name, (signed long) chptr->channelts,
+                parv[1],
+                source_p->name /* XXX ID(source_p) */ );
+  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                ":%s SJOIN %ld %s + :@%s",
+                me.name, (signed long) chptr->channelts,
+                parv[1], source_p->name);
+  sendto_channel_local(ALL_MEMBERS, chptr,
+                       ":%s MODE %s +o %s",
+                       me.name, parv[1], source_p->name);
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/m_trace.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_trace.c
--- ircd-hybrid-7.0rc9/modules/m_trace.c	Wed Sep  4 21:10:24 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_trace.c	Thu Feb 20 13:57:39 2003
@@ -166,6 +166,17 @@
 
         class_name = get_client_class(target_p);
 
+/* Begin mpb segment */
+        if (IsAdmin(target_p))
+        {
+          sendto_one(source_p, form_str(RPL_TRACEADMINISTRATOR),
+                     me.name, parv[0], class_name, name,
+                     MyOper(source_p) ? ipaddr :
+                     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
+                     CurrentTime - target_p->lasttime,
+                     (target_p->user) ? (CurrentTime - target_p->user->last): 0);
+        }
+/* end mpb segment */
         if (IsOper(target_p))
         {
           sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
diff -uNrd ircd-hybrid-7.0rc9/modules/m_version.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_version.c
--- ircd-hybrid-7.0rc9/modules/m_version.c	Wed Jul 17 19:09:10 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_version.c	Thu Feb 20 13:54:43 2003
@@ -196,6 +196,32 @@
   *p++ = '6';
 #endif
   
+/* mpb code segment */
+#ifdef CHANNELSPY
+  *p++ = 'C';
+#endif
+
+#ifdef RWHOIS_NOTICE
+  *p++ = 'W';
+#endif
+
+#ifdef ADMINSSEEALLCHANS
+  *p++ = 'A';
+#endif
+
+#ifdef ADMINOWNAGE
+  *p++ = 'O';
+#endif
+
+#ifdef ADMINKICKEXEMPT
+  *p++ = 'D';
+#endif
+
+#ifdef ADMINKILLEXEMPT
+  *p++ = 'K';
+#endif
+/* end segment */
+
   *p = '\0';
 
   return result;
diff -uNrd ircd-hybrid-7.0rc9/modules/m_whois.c ircd-hybrid-7.0rc9+mpb-rm/modules/m_whois.c
--- ircd-hybrid-7.0rc9/modules/m_whois.c	Sat Feb  8 19:02:28 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/m_whois.c	Thu Feb 20 13:53:59 2003
@@ -425,11 +425,43 @@
 
       if (chptr->mode.mode & MODE_HIDEOPS && !is_any_op(chptr,source_p))
       {
-	ircsprintf(t,"%s ",chname);
+
+/* begin mpb code */
+#ifdef ADMINSSEEALLCHANS
+        if (IsAdmin(source_p) && !MPBShowChannel(source_p, chptr))
+            {
+              ircsprintf(t,"(%s) ",chname);
+            }
+        else
+            {
+              ircsprintf(t,"%s ",chname);
+            }
+#endif
+#ifndef ADMINSSEEALLCHANS
+        ircsprintf(t,"%s ",chname);
+#endif
+/* end segment */
+
       }
       else
       {
-	ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p), chname);
+
+/* begin mpb code */
+#ifdef ADMINSSEEALLCHANS
+        if (IsAdmin(source_p) && !MPBShowChannel(source_p, chptr))
+            {
+              ircsprintf(t,"(%s%s) ", channel_chanop_or_voice(chptr,target_p), chname);
+            }
+        else
+            {
+              ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p), chname);
+            }
+#endif
+#ifndef ADMINSSEEALLCHANS
+        ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p), chname);
+#endif
+/* end code segment */
+
       }
 
       tlen = strlen(t);
diff -uNrd ircd-hybrid-7.0rc9/modules/realipinwhois.c ircd-hybrid-7.0rc9+mpb-rm/modules/realipinwhois.c
--- ircd-hybrid-7.0rc9/modules/realipinwhois.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/realipinwhois.c	Thu Feb 20 13:59:04 2003
@@ -0,0 +1,65 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  Shows spoofed's user's ip in /whois to Administrators
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  realipinwhois.c,v 1.02 2002/12/25 4:39:00 PM mpb
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+#include "numeric.h"
+
+int
+show_notice(struct hook_mfunc_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_whois", (hookfn *)show_notice);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_whois", (hookfn *)show_notice);
+}
+
+const char *_version = "$Revision: 1.01 $";
+
+/* show a whois notice
+   source_p does a /whois on client_p */
+int
+show_notice(struct hook_mfunc_data *data)
+{
+  if (MyConnect(data->source_p) && MyConnect(data->client_p) && IsIPSpoof(data->client_p) &&
+      IsOper(data->source_p) && data->source_p->umodes & FLAGS_ADMIN) 
+    {
+      char ipaddr[HOSTIPLEN];
+      inetntop(data->client_p->localClient->aftype, &IN_ADDR(data->client_p->localClient->ip), ipaddr, HOSTIPLEN);
+      sendto_one(data->source_p, form_str(RPL_WHOISIP),
+                 me.name, data->source_p->name, data->client_p->name,
+                 IsOperAdmin(data->source_p) ? ipaddr : "255.255.255.255");
+    }
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/serverbot.c ircd-hybrid-7.0rc9+mpb-rm/modules/serverbot.c
--- ircd-hybrid-7.0rc9/modules/serverbot.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/serverbot.c	Thu Feb 20 13:59:26 2003
@@ -0,0 +1,61 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  Shows So and So is an IRC Administrative bot to person whois'ing tcm/oomon
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  serverbot.c,v 1.00 2003/02/08 5:25:00 AM Mike Bramel
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+#include "numeric.h"
+
+int
+show_notice(struct hook_mfunc_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_whois", (hookfn *)show_notice);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_whois", (hookfn *)show_notice);
+}
+
+const char *_version = "$Revision: 1.00 $";
+
+/* show a whois notice
+   source_p does a /whois on client_p */
+int
+show_notice(struct hook_mfunc_data *data)
+{
+  if (IsOper(data->client_p) && !IsAdmin(data->client_p) && data->client_p->umodes & FLAGS_SERVERBOT) 
+    {
+      sendto_one(data->source_p, form_str(RPL_SERVERBOT),
+                 me.name, data->source_p->name, data->client_p->name);
+    }
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_admin_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_admin_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_admin_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_admin_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,55 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_admin_notice.c: Sends a notice when someone uses ADMIN.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_admin_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int show_admin(struct hook_spy_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_admin", (hookfn *)show_admin);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_admin", (hookfn *)show_admin);
+}
+
+const char *_version = "$Revision: 1.6 $";
+
+int show_admin(struct hook_spy_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+                         "admin requested by %s (%s@%s) [%s]",
+                         data->source_p->name, data->source_p->username,
+                         data->source_p->host, data->source_p->user->server);
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_info_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_info_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_info_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_info_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,55 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_info_notice.c: Sends a notice when someone uses INFO.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_info_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int show_info(struct hook_spy_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_info", (hookfn *)show_info);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_info", (hookfn *)show_info);
+}
+
+const char *_version = "$Revision: 1.6 $";
+
+int show_info(struct hook_spy_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+                         "info requested by %s (%s@%s) [%s]",
+                         data->source_p->name, data->source_p->username,
+                         data->source_p->host, data->source_p->user->server);
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_links_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_links_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_links_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_links_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,57 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_links_notice.c: Sends a notice when someone uses LINKS.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_links_notice.c,v 1.11 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int
+show_links(struct hook_links_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_links", (hookfn *)show_links);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_links", (hookfn *)show_links);
+}
+
+const char *_version = "$Revision: 1.11 $";
+
+int
+show_links(struct hook_links_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+                         "LINKS '%s' requested by %s (%s@%s) [%s]",
+                         data->mask, data->source_p->name, data->source_p->username,
+                         data->source_p->host, data->source_p->user->server);
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_motd_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_motd_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_motd_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_motd_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,55 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_motd_notice.c: Sends a notice when someone uses MOTD.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_motd_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int show_motd(struct hook_spy_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_motd", (hookfn *)show_motd);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_motd", (hookfn *)show_motd);
+}
+
+const char *_version = "$Revision: 1.6 $";
+
+int show_motd(struct hook_spy_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+                         "motd requested by %s (%s@%s) [%s]",
+                         data->source_p->name, data->source_p->username,
+                         data->source_p->host, data->source_p->user->server);
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_stats_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_stats_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_stats_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_stats_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,81 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_stats_notice.c: Sends a notice when someone uses STATS.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_stats_notice.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int
+show_stats(struct hook_stats_data *);
+
+void
+_modinit(void)
+{
+	hook_add_hook("doing_stats", (hookfn *)show_stats);
+}
+
+void
+_moddeinit(void)
+{
+	hook_del_hook("doing_stats", (hookfn *)show_stats);
+}
+
+const char *_version = "$Revision: 1.12 $";
+
+/* show a stats request */
+int
+show_stats(struct hook_stats_data *data)
+{
+  if((data->statchar == 'L') || (data->statchar == 'l'))
+    {
+      if(data->name != NULL)
+	sendto_realops_flags(FLAGS_SPY, L_ALL,
+			     "STATS %c requested by %s (%s@%s) [%s] on %s",
+			     data->statchar,
+			     data->source_p->name,
+			     data->source_p->username,
+			     data->source_p->host,
+			     data->source_p->user->server,
+			     data->name);
+      else
+	sendto_realops_flags(FLAGS_SPY, L_ALL,
+			     "STATS %c requested by %s (%s@%s) [%s]",
+			     data->statchar,
+			     data->source_p->name,
+			     data->source_p->username,
+			     data->source_p->host,
+			     data->source_p->user->server);
+    }
+  else
+    {
+      sendto_realops_flags(FLAGS_SPY, L_ALL,
+                           "STATS %c requested by %s (%s@%s) [%s]",
+			   data->statchar, data->source_p->name, data->source_p->username,
+			   data->source_p->host, data->source_p->user->server);
+    }
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_trace_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_trace_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_trace_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_trace_notice.c	Fri May 24 19:48:34 2002
@@ -0,0 +1,67 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_trace_notice.c: Sends a notice when someone uses TRACE or LTRACE
+ *
+ *  Copyright (C) 2002 Hybrid Development Team
+ *
+ *  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
+ *
+ *  $Id: spy_trace_notice.c,v 1.6 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int show_trace(struct hook_spy_data *);
+int show_ltrace(struct hook_spy_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_trace", (hookfn *)show_trace);
+  hook_add_hook("doing_ltrace", (hookfn *)show_ltrace);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_trace", (hookfn *)show_trace);
+  hook_del_hook("doing_ltrace", (hookfn *)show_ltrace);
+}
+
+const char *_version = "$Revision: 1.6 $";
+
+int show_trace(struct hook_spy_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+                         "trace requested by %s (%s@%s) [%s]",
+                         data->source_p->name, data->source_p->username,
+                         data->source_p->host, data->source_p->user->server);
+
+  return 0;
+}
+
+int show_ltrace(struct hook_spy_data *data)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+		       "ltrace requested by %s (%s@%s) [%s]",
+		       data->source_p->name, data->source_p->username,
+		       data->source_p->host, data->source_p->user->server);
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/modules/spy_whois_notice.c ircd-hybrid-7.0rc9+mpb-rm/modules/spy_whois_notice.c
--- ircd-hybrid-7.0rc9/modules/spy_whois_notice.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-7.0rc9+mpb-rm/modules/spy_whois_notice.c	Thu Feb 20 14:12:00 2003
@@ -0,0 +1,63 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  spy_whois_notice.c: Sends a notice when someone uses WHOIS.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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
+ *
+ *  $Id: spy_whois_notice.c,v 1.10 2002/05/24 23:48:34 androsyn Exp $
+ */
+#include "stdinc.h"
+#include "modules.h"
+#include "hook.h"
+#include "client.h"
+#include "ircd.h"
+#include "send.h"
+
+int
+show_notice(struct hook_mfunc_data *);
+
+void
+_modinit(void)
+{
+  hook_add_hook("doing_whois", (hookfn *)show_notice);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_hook("doing_whois", (hookfn *)show_notice);
+}
+
+const char *_version = "$Revision: 1.10 $";
+
+/* show a whois notice
+   source_p does a /whois on client_p */
+int
+show_notice(struct hook_mfunc_data *data)
+{
+  if (MyConnect(data->source_p) && MyConnect(data->client_p) &&
+      IsOper(data->client_p) && (data->client_p != data->source_p) 
+      && data->client_p->umodes & FLAGS_SPY) 
+    {
+      sendto_one(data->client_p, ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you",
+                 me.name, data->client_p->name, data->source_p->name, data->source_p->username,
+                 data->source_p->host);
+    }
+
+  return 0;
+}
diff -uNrd ircd-hybrid-7.0rc9/src/channel.c ircd-hybrid-7.0rc9+mpb-rm/src/channel.c
--- ircd-hybrid-7.0rc9/src/channel.c	Thu Feb  6 03:46:01 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/src/channel.c	Tue Apr 15 15:50:00 2003
@@ -1098,8 +1098,24 @@
   ircsprintf(src_iphost,"%s!%s@%s", source_p->name, source_p->username,
 	     source_p->localClient->sockhost);
 
+/* modmpb code segment */
+#ifdef ADMINOWNAGE   
+  if ((check_banned(chptr, source_p, src_host, src_iphost)) == CHFL_BAN)
+    if (!IsAdmin(source_p))
+      return (ERR_BANNEDFROMCHAN);
+#endif
+#ifndef ADMINOWNAGE
   if ((check_banned(chptr, source_p, src_host, src_iphost)) == CHFL_BAN)
     return (ERR_BANNEDFROMCHAN);
+#endif
+#ifdef REPORT_ADMINOWNAGE
+  if ((check_banned(chptr, source_p, src_host, src_iphost)) == CHFL_BAN)
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) is joining channel %s past ban (+b)",
+                           source_p->name, source_p->username,
+                           source_p->host, chptr->chname);
+#endif
+ 
+/* end mpb segment */
 
   if (chptr->mode.mode & MODE_INVITEONLY)
   {
@@ -1109,8 +1125,24 @@
 
     if (lp == NULL)
     {
+
+/* continue mpb segment */
+#ifdef ADMINOWNAGE
+      if (!ConfigChannel.use_invex && !IsAdmin(source_p))
+        return (ERR_INVITEONLYCHAN);
+#endif                     
+#ifndef ADMINOWNAGE
       if (!ConfigChannel.use_invex)
         return (ERR_INVITEONLYCHAN);
+#endif
+#ifdef REPORT_ADMINOWNAGE
+      if (!ConfigChannel.use_invex)
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) is joining channel %s past lack of invite (+i)",
+                           source_p->name, source_p->username,
+                           source_p->host, chptr->chname);
+#endif
+/* end mpb segment */
+
       DLINK_FOREACH(ptr, chptr->invexlist.head)
       {
         invex = ptr->data;
@@ -1118,16 +1150,52 @@
             match_cidr(invex->banstr, src_iphost))
           break;
       }
+
+/* begin mpb segment */
+#ifdef ADMINOWNAGE
+      if (ptr == NULL && !IsAdmin(source_p))
+        return (ERR_INVITEONLYCHAN);
+#endif
+#ifndef ADMINOWNAGE
       if (ptr == NULL)
         return (ERR_INVITEONLYCHAN);
+#endif
+#ifdef REPORT_ADMINOWNAGE
+      if (ptr == NULL)
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) is joining channel %s past lack of invite (+i)",
+                           source_p->name, source_p->username,
+                           source_p->host, chptr->chname);
+#endif
+/* end code segment */
+
     }
   }
 
   if (*chptr->mode.key && (BadPtr(key) || irccmp(chptr->mode.key, key)))
-    return (ERR_BADCHANNELKEY);
 
+/* begin mpb segment */
+#ifdef ADMINOWNAGE
+    if (!IsAdmin(source_p))
+#endif
+    return (ERR_BADCHANNELKEY);
+#ifdef REPORT_ADMINOWNAGE 
+  if (*chptr->mode.key && (BadPtr(key) || irccmp(chptr->mode.key, key)))
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) is joining channel %s past lack of key (+k)",
+                           source_p->name, source_p->username,
+                           source_p->host, chptr->chname);
+#endif
   if (chptr->mode.limit && chptr->users >= chptr->mode.limit)
+#ifdef ADMINOWNAGE
+    if (!IsAdmin(source_p))
+#endif
     return (ERR_CHANNELISFULL);
+#ifdef REPORT_ADMINOWNAGE
+  if (chptr->mode.limit && chptr->users >= chptr->mode.limit)
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Admin %s (%s@%s) is joining channel %s past limit (+l)",
+                           source_p->name, source_p->username,
+                           source_p->host, chptr->chname);
+#endif
+/* end mpb segment */
 
   return 0;
 }
diff -uNrd ircd-hybrid-7.0rc9/src/ircd_lexer.l ircd-hybrid-7.0rc9+mpb-rm/src/ircd_lexer.l
--- ircd-hybrid-7.0rc9/src/ircd_lexer.l	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/src/ircd_lexer.l	Thu Feb 20 13:43:47 2003
@@ -134,6 +134,7 @@
 action		{ return ACTION; }
 admin		{ return ADMIN; }
 administrator	{ return ADMIN; }
+serverbot       { return SERVERBOT; } /* mpb variable */
 aftype		{ return AFTYPE; }
 auth		{ return AUTH; }
 autoconn	{ return AUTOCONN; }
diff -uNrd ircd-hybrid-7.0rc9/src/ircd_parser.y ircd-hybrid-7.0rc9+mpb-rm/src/ircd_parser.y
--- ircd-hybrid-7.0rc9/src/ircd_parser.y	Tue Nov 12 08:45:42 2002
+++ ircd-hybrid-7.0rc9+mpb-rm/src/ircd_parser.y	Thu Feb 20 13:46:25 2003
@@ -94,6 +94,7 @@
 %token  ACCEPT_PASSWORD
 %token  ACTION
 %token  ADMIN
+%token  SERVERBOT    /* mpb variable */
 %token  AFTYPE
 %token  ANTI_NICK_FLOOD
 %token  ANTI_SPAM_EXIT_MESSAGE_TIME
@@ -283,6 +284,9 @@
 %token  VHOST6
 %token  WARN
 %token  WARN_NO_NLINE
+%token  T_CHANNELSPY /* mpb variable */
+%token  T_SERVERBOT /* mpb variable */
+
 
 %type   <string>   QSTRING
 %type   <number>   NUMBER
@@ -741,7 +745,7 @@
 
 oper_item:      oper_name  | oper_user | oper_password |
                 oper_class | oper_global_kill | oper_remote |
-                oper_kline | oper_unkline | oper_gline | oper_nick_changes |
+                oper_kline | oper_unkline | oper_gline | oper_nick_changes | server_bot |
                 oper_die | oper_rehash | oper_admin | oper_rsa_public_key_file | error;
 
 oper_name:      NAME '=' QSTRING ';'
@@ -885,6 +889,11 @@
             |
             ADMIN '=' TNO ';' { yy_achead->port &= ~CONF_OPER_ADMIN;} ;
 
+/* mpb change in this section */  
+server_bot: SERVERBOT '=' TYES ';' { yy_achead->port |= CONF_SERVER_BOT;}
+            |
+            SERVERBOT '=' TNO ';' { yy_achead->port &= ~CONF_SERVER_BOT;} ;
+
 /***************************************************************************
  *  section class
  ***************************************************************************/
@@ -2444,7 +2453,17 @@
               | T_LOCOPS
   {
     ConfigFileEntry.oper_umodes |= FLAGS_LOCOPS;
+  }
+/* mpb variables */
+              | T_CHANNELSPY
+  {
+    ConfigFileEntry.oper_umodes |= FLAGS_CHANNELSPY;
+  }
+              | T_SERVERBOT
+  {
+    ConfigFileEntry.oper_umodes |= FLAGS_SERVERBOT;
   };
+/* resume stock code */
 
 general_oper_only_umodes: OPER_ONLY_UMODES 
   {
@@ -2518,7 +2537,17 @@
               | T_LOCOPS
   {
     ConfigFileEntry.oper_only_umodes |= FLAGS_LOCOPS;
+  }
+/* mpb variables */
+              | T_CHANNELSPY
+  {
+    ConfigFileEntry.oper_only_umodes |= FLAGS_CHANNELSPY;
+  }
+              | T_SERVERBOT
+  {
+    ConfigFileEntry.oper_only_umodes |= FLAGS_SERVERBOT;
   };
+/* resume stock code */
 
 general_min_nonwildcard:    MIN_NONWILDCARD '=' NUMBER ';'
   {
diff -uNrd ircd-hybrid-7.0rc9/src/messages.tab ircd-hybrid-7.0rc9+mpb-rm/src/messages.tab
--- ircd-hybrid-7.0rc9/src/messages.tab	Thu Jan 16 18:10:56 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/src/messages.tab	Thu Feb 20 13:48:36 2003
@@ -227,7 +227,7 @@
 /* 204 RPL_TRACEOPERATOR, */    ":%s 204 %s Oper %s %s (%s) %lu %lu",
 /* 205 RPL_TRACEUSER, */        ":%s 205 %s User %s %s (%s) %lu %lu",
 /* 206 RPL_TRACESERVER, */      ":%s 206 %s Serv %s %dS %dC %s %s!%s@%s %lu",
-/* 207 */       NULL,
+/* 207 RPL_TRACEADMINISTRATOR*/ ":%s 207 %s Root %s %s (%s) %lu %lu",
 /* 208 RPL_TRACENEWTYPE, */     ":%s 208 %s <newtype> 0 %s",
 /* 209 RPL_TRACECLASS, */       ":%s 209 %s Class %s %d",
 /* 210 */       NULL,
@@ -358,9 +358,9 @@
 /* 331 RPL_NOTOPIC, */          ":%s 331 %s %s :No topic is set.",
 /* 332 RPL_TOPIC, */            ":%s 332 %s %s :%s",
 /* 333 RPL_TOPICWHOTIME, */     ":%s 333 %s %s %s %lu",
-/* 334 */       NULL,
-/* 335 */       NULL,
-/* 336 */       NULL,
+/* 334 RPL_SERVERBOT */         ":%s 334 %s %s :is an IRC Server Administration Bot",
+/* 335 RPL_WHOISADM */          ":%s 335 %s %s :is an IRC Server Administrator",
+/* 336 RPL_WHOISIP */           ":%s 336 %s %s :is spoofed (Connecting From %s)",
 /* 337 */       NULL,
 /* 338 RPL_WHOISACTUALLY */	":%s 338 %s :%s is actually %s@%s [%s]",
 /* 339 */       NULL,
diff -uNrd ircd-hybrid-7.0rc9/src/s_conf.c ircd-hybrid-7.0rc9+mpb-rm/src/s_conf.c
--- ircd-hybrid-7.0rc9/src/s_conf.c	Sun Feb 16 17:06:46 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/src/s_conf.c	Thu Feb 20 14:41:41 2003
@@ -1825,7 +1825,16 @@
     }
   else
     *privs_ptr++ = 'a';
-  
+/* mpb variable */  
+  if (port & CONF_SERVER_BOT)
+    {
+      if (client_p)
+        SetServerBot(client_p);
+      *privs_ptr++ = 'B';
+    }
+  else
+    *privs_ptr++ = 'b';
+/* resume stock code */  
   *privs_ptr = '\0';
 
   return(privs_out);
@@ -1881,6 +1890,12 @@
     *flags_ptr++ = 'l';
   if(flags & FLAGS_CALLERID)
     *flags_ptr++ = 'g';
+/* mpb variables */  
+  if(flags & FLAGS_CHANNELSPY)
+    *flags_ptr++ = 'e';
+  if(flags & FLAGS_SERVERBOT)
+    *flags_ptr++ = 'B';
+/* resume stock code */  
   *flags_ptr = '\0';
 
   return(flags_out);
diff -uNrd ircd-hybrid-7.0rc9/src/s_user.c ircd-hybrid-7.0rc9+mpb-rm/src/s_user.c
--- ircd-hybrid-7.0rc9/src/s_user.c	Sun Feb 16 17:54:37 2003
+++ ircd-hybrid-7.0rc9+mpb-rm/src/s_user.c	Thu Feb 20 13:34:24 2003
@@ -77,6 +77,7 @@
   {FLAGS_BOTS,  'b'},
   {FLAGS_CCONN, 'c'},
   {FLAGS_DEBUG, 'd'},
+  {FLAGS_CHANNELSPY, 'e'}, /* mpb variable */
   {FLAGS_FULL,  'f'},
   {FLAGS_CALLERID, 'g'},
   {FLAGS_INVISIBLE, 'i'},
@@ -91,6 +92,7 @@
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
   {FLAGS_OPERWALL, 'z'},
+  {FLAGS_SERVERBOT, 'B'},       /* mpb variable */
   {0, 0}
 };
 
@@ -104,7 +106,7 @@
   /* 0x30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x3F */
   0,            /* @ */
   0,            /* A */
-  0,            /* B */
+  FLAGS_SERVERBOT,  /* B - mpb variable */
   0,            /* C */
   0,            /* D */
   0,            /* E */
@@ -135,7 +137,7 @@
   FLAGS_BOTS,   /* b */
   FLAGS_CCONN,  /* c */
   FLAGS_DEBUG,  /* d */
-  0,            /* e */
+  FLAGS_CHANNELSPY, /* e - mpb stuff */
   FLAGS_FULL,   /* f */
   FLAGS_CALLERID,  /* g */
   0,            /* h */
@@ -1089,7 +1091,15 @@
                  me.name, parv[0]);
       source_p->umodes &= ~FLAGS_ADMIN;
     }
-
+/* mod+mpb stuff */
+  if ((source_p->umodes & FLAGS_SERVERBOT) && !CanServerBot(source_p))
+    {
+      sendto_one(source_p,":%s NOTICE %s :*** You need oper and B flag for +B",
+                 me.name, parv[0]);
+      source_p->umodes &= ~FLAGS_SERVERBOT;
+    }
+  
+/* end mpb stuff */
 
   if (!(setflags & FLAGS_INVISIBLE) && IsInvisible(source_p))
     ++Count.invisi;
