diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/.cvsignore ircd-hybrid-fuis/.cvsignore
--- ircd-hybrid-7.0rc9/.cvsignore	Fri Dec 14 03:49:18 2001
+++ ircd-hybrid-fuis/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,7 +0,0 @@
-config.log
-config.cache
-config.status
-Makefile
-lint.out
-rsa_respond.tar.gz
-.depend
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/adns/.cvsignore ircd-hybrid-fuis/adns/.cvsignore
--- ircd-hybrid-7.0rc9/adns/.cvsignore	Tue Jul  3 00:53:02 2001
+++ ircd-hybrid-fuis/adns/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/configure ircd-hybrid-fuis/configure
--- ircd-hybrid-7.0rc9/configure	Sat Feb 15 11:32:39 2003
+++ ircd-hybrid-fuis/configure	Wed Mar 12 16:37:35 2003
@@ -6768,9 +6768,9 @@
 
 fi;
 
-ac_cv_nicklen="9"
-ac_cv_maxclients="200"
-ac_cv_topiclen="120"
+ac_cv_nicklen="18"
+ac_cv_maxclients="1000"
+ac_cv_topiclen="300"
 
 
 # Check whether --with-nicklen or --without-nicklen was given.
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/.cvsignore ircd-hybrid-fuis/contrib/.cvsignore
--- ircd-hybrid-7.0rc9/contrib/.cvsignore	Tue Jul  3 00:53:03 2001
+++ ircd-hybrid-fuis/contrib/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/m_gline.c ircd-hybrid-fuis/contrib/m_gline.c
--- ircd-hybrid-7.0rc9/contrib/m_gline.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/contrib/m_gline.c	Sun Feb 16 21:09:37 2003
@@ -0,0 +1,784 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_gline.c: Votes towards globally banning a mask.
+ *
+ *  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_gline.c,v 1.85 2002/12/28 07:02:38 bill Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "s_gline.h"
+#include "channel.h"
+#include "client.h"
+#include "common.h"
+#include "config.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "hostmask.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_misc.h"
+#include "scache.h"
+#include "send.h"
+#include "msg.h"
+#include "fileio.h"
+#include "s_serv.h"
+#include "hash.h"
+#include "parse.h"
+#include "modules.h"
+#include "list.h"
+
+#define GLINE_NOT_PLACED 0
+#define GLINE_ALREADY_VOTED -1
+#define GLINE_PLACED 1
+
+/* internal functions */
+static void set_local_gline(
+                            const char *oper_nick,
+                            const char *oper_user,
+                            const char *oper_host,
+                            const char *oper_server,
+                            const char *user,
+                            const char *host,
+                            const char *reason);
+
+static void log_gline_request(const char*,const char*,const char*,
+                              const char* oper_server,
+                              const char *,const char *,const char *);
+
+static void log_gline(struct Client *,struct gline_pending *,
+                      const char *, const char *,const char *,
+                      const char* oper_server,
+                      const char *,const char *,const char *);
+
+
+static int check_majority_gline(struct Client *source_p,
+				const char *oper_nick,
+				const char *oper_user,
+				const char *oper_host,
+				const char *oper_server,
+				const char *user, const char *host,
+				const char *reason);
+
+static void add_new_majority_gline(const char *, const char *, const char *,
+                                   const char *, const char *, const char *,
+                                   const char *);
+
+static int check_wild_gline(char *, char *);
+static int invalid_gline(struct Client *, char *, char *, char *);
+		       
+static void ms_gline(struct Client*, struct Client*, int, char**);
+static void mo_gline(struct Client*, struct Client*, int, char**);
+
+struct Message gline_msgtab = {
+    "GLINE", 0, 0, 3, 0, MFLG_SLOW, 0,
+      {m_unregistered, m_not_oper, ms_gline, mo_gline}
+};
+
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+    mod_add_cmd(&gline_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&gline_msgtab);
+}
+
+const char *_version = "$Revision: 1.85 $";
+#endif
+/*
+ * mo_gline()
+ *
+ * inputs       - The usual for a m_ function
+ * output       -
+ * side effects -
+ *
+ * Place a G line if 3 opers agree on the identical user@host
+ * 
+ */
+/* Allow this server to pass along GLINE if received and
+ * GLINES is not defined.
+ *
+ */
+
+static void
+mo_gline(struct Client *client_p, struct Client *source_p,
+	 int parc, char *parv[])
+{
+  char *user = NULL;
+  char *host = NULL;	              /* user and host of GLINE "victim" */
+  const char *reason = NULL;          /* reason for "victims" demise */
+  char tempuser[USERLEN + 2];
+  char temphost[HOSTLEN + 1];
+
+  if (!ConfigFileEntry.glines)
+  {
+    sendto_one(source_p,":%s NOTICE %s :GLINE disabled",me.name,parv[0]);  
+    return;
+  }
+
+  if (!IsOperGline(source_p))
+  {
+    sendto_one(source_p,
+	       ":%s NOTICE %s :You need gline = yes;",me.name,parv[0]);
+    return;
+  }
+			
+  if ((host = strchr(parv[1], '@')) || *parv[1] == '*')
+  {
+    /* Explicit user@host mask given */
+    
+    if(host != NULL)	/* Found user@host */
+    {
+      user = parv[1];   /* here is user part */
+      *(host++) = '\0'; /* and now here is host */
+
+      /* gline for "@host", use *@host */
+      if(*user == '\0')
+	user = "*";
+    }
+    else
+    {
+      user = "*";               /* no @ found, assume its *@somehost */
+      host = parv[1];
+    }
+	      
+    if (*host == '\0')	/* duh. no host found, assume its '*' host */
+      host = "*";
+	      
+    strlcpy(tempuser, user, USERLEN + 1);     /* allow for '*' */
+    strlcpy(temphost, host, HOSTLEN + 1);
+    user = tempuser;
+    host = temphost;
+  }
+  else
+  {
+    sendto_one(source_p,
+	       ":%s NOTICE %s :Can't G-Line a nick use user@host",
+	       me.name, parv[0]);
+    return;
+  }
+
+  if(invalid_gline(source_p, user, host, parv[2]))
+    return;
+			
+  /* Not enough non-wild characters were found,
+   * assume they are trying to gline *@*.
+   */
+
+  if (check_wild_gline(user, host))
+  {
+    if (MyClient(source_p))
+      sendto_one(source_p,
+		 ":%s NOTICE %s :Please include at least %d non-wildcard characters with the user@host",
+		 me.name, parv[0], ConfigFileEntry.min_nonwildcard);
+    return;
+  }
+			
+  reason = parv[2];
+
+  /* If at least 3 opers agree this user should be G lined then do it */
+  if (check_majority_gline(source_p, source_p->name,
+			   (const char *)source_p->username,
+			   source_p->host, me.name, user, host, reason) ==
+      GLINE_ALREADY_VOTED)
+  {
+    sendto_one(source_p,
+	       ":%s NOTICE %s :This server or oper has already voted",
+	       me.name, parv[0]);
+    return;
+  }
+
+  sendto_realops_flags(FLAGS_ALL, L_ALL,
+		       "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
+		       source_p->name, source_p->username, source_p->host,
+		       me.name, user, host, reason);
+  log_gline_request(source_p->name,
+		    (const char *)source_p->username,
+		    source_p->host,me.name, user, host, reason);
+
+
+  /* 4 param version for hyb-7 servers */
+  sendto_server(NULL, source_p, NULL, CAP_GLN|CAP_UID, NOCAPS,
+		LL_ICLIENT, ":%s GLINE %s %s :%s",
+		ID(source_p), user, host, reason);
+  sendto_server(NULL, source_p, NULL, CAP_GLN, CAP_UID,
+		LL_ICLIENT, ":%s GLINE %s %s :%s",
+		source_p->name, user, host, reason);
+
+  /* 8 param for hyb-6 */
+  sendto_server(NULL, NULL, NULL, CAP_UID, CAP_GLN, NOFLAGS,
+		":%s GLINE %s %s %s %s %s %s :%s",
+		me.name, ID(source_p), source_p->username,
+		source_p->host, source_p->user->server, user, host,
+		reason);
+  sendto_server(NULL, NULL, NULL, NOCAPS, CAP_GLN|CAP_UID, NOFLAGS,
+		":%s GLINE %s %s %s %s %s %s :%s",
+		me.name, source_p->name, source_p->username,
+		source_p->host, source_p->user->server, user, host,
+		reason);
+}
+
+/*
+ * ms_gline()
+ *
+ * inputs       - The usual for a m_ function
+ * output       -
+ * side effects -
+ *
+ * Place a G line if 3 opers agree on the identical user@host
+ * 
+ */
+/* Allow this server to pass along GLINE if received and
+ * GLINES is not defined.
+ */
+
+static void
+ms_gline(struct Client *client_p, struct Client *source_p,
+	 int parc, char *parv[])
+{
+  /* These are needed for hyb6 compatibility.. if its ever removed we can
+   * just use source_p->username etc.. 
+   */
+  const char *oper_nick = NULL;        /* nick of oper requesting GLINE */
+  const char *oper_user = NULL;        /* username of oper requesting GLINE */
+  const char *oper_host = NULL;        /* hostname of oper requesting GLINE */
+  const char *oper_server = NULL;      /* server of oper requesting GLINE */
+  char *user = NULL;
+  char *host = NULL;             /* user and host of GLINE "victim" */
+  const char *reason = NULL;           /* reason for "victims" demise */
+  struct Client *acptr;
+
+  /* hyb-7 style gline (post beta3) */
+  if(parc == 4 && IsPerson(source_p))
+    {
+      oper_nick = parv[0];
+      oper_user = source_p->username;
+      oper_host = source_p->host;
+      oper_server = source_p->user->server;
+      user = parv[1];
+      host = parv[2];
+      reason = parv[3];
+    }
+  /* or it's a hyb-6 style */
+  else if(parc == 8 && IsServer(source_p))
+    {
+      oper_nick = parv[1];
+      oper_user = parv[2];
+      oper_host = parv[3];
+      oper_server = parv[4];
+      user = parv[5];
+      host = parv[6];
+      reason = parv[7];      
+    }
+  /* none of the above */
+  else
+    return;
+
+  /* Its plausible that the server and/or client dont actually exist,
+   * and its faked, as the oper isnt sending the gline..
+   * check they're real --fl_ */
+  /* we need acptr for LL introduction anyway -davidt */
+  if((acptr = find_server(oper_server)))
+  {
+    if((acptr = find_client(oper_nick)) == NULL)
+      return;
+  }
+  else
+    return;
+
+ if(invalid_gline(acptr, user, host, (char *)reason))
+    return;
+    
+  /* send in hyb-7 to compatible servers */
+  sendto_server(client_p, acptr, NULL, CAP_GLN, NOCAPS, LL_ICLIENT,
+                ":%s GLINE %s %s :%s",
+                oper_nick, user, host, reason);
+  /* hyb-6 version to the rest */
+  sendto_server(client_p, NULL, NULL, NOCAPS, CAP_GLN, NOFLAGS,
+                ":%s GLINE %s %s %s %s %s %s :%s",
+                oper_server, oper_nick, oper_user, oper_host,
+                oper_server, user, host, reason);
+
+  if (ConfigFileEntry.glines)
+    {
+     /* I dont like the idea of checking for x non-wildcard chars in a
+      * gline.. it could lead to a desync... but we have to stop people
+      * glining *@*..   -- fl
+      */
+
+     if (check_wild_gline(user, host))
+        {
+          sendto_realops_flags(FLAGS_ALL, L_ALL, 
+                       "%s!%s@%s on %s is requesting a gline without %d non-wildcard characters for [%s@%s] [%s]",
+                       oper_nick, oper_user, oper_host, oper_server, ConfigFileEntry.min_nonwildcard,
+                       user, host, reason);
+          return;
+        }
+
+      log_gline_request(oper_nick,oper_user,oper_host,oper_server,
+			user,host,reason);
+      
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+			   "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
+			   oper_nick, oper_user, oper_host, oper_server,
+			   user, host, reason);
+
+      /* If at least 3 opers agree this user should be G lined then do it */
+      if (check_majority_gline(source_p, oper_nick, oper_user, oper_host,
+			       oper_server, user, host, reason) ==
+	  GLINE_ALREADY_VOTED)
+      {
+	sendto_realops_flags(FLAGS_ALL, L_ALL,
+			     "oper or server has already voted");
+      }
+    }
+}
+
+/*
+ * check_wild_gline
+ *
+ * inputs       - user, host of gline
+ * output       - 1 if not enough non-wildchar char's, 0 if ok
+ * side effects - NONE
+ */
+
+static int
+check_wild_gline(char *user, char *host)
+{
+  char *p;
+  char tmpch;
+  int nonwild;
+
+  nonwild = 0;
+  p = user;
+
+  while ((tmpch = *p++))
+    {
+       if (!IsKWildChar(tmpch))
+         {
+            /*
+             * If we find enough non-wild characters, we can
+             * break - no point in searching further.
+             */
+            if (++nonwild >= ConfigFileEntry.min_nonwildcard)
+              break;
+         }
+    }
+
+   if (nonwild < ConfigFileEntry.min_nonwildcard)
+    {
+       /*
+        * The user portion did not contain enough non-wild
+        * characters, try the host.
+        */
+       p = host;
+       while ((tmpch = *p++))
+         {
+           if (!IsKWildChar(tmpch))
+             if (++nonwild >= ConfigFileEntry.min_nonwildcard)
+               break;
+         }
+     }
+
+    if (nonwild < ConfigFileEntry.min_nonwildcard)
+       return 1;
+    else
+       return 0;
+}
+
+/* invalid_gline
+ *
+ * inputs	- pointer to source client
+ *		- pointer to ident
+ *		- pointer to host
+ *		- pointer to reason
+ * outputs	- 1 if invalid, 0 if valid
+ */
+static int
+invalid_gline(struct Client *source_p, char *luser, char *lhost,
+                       char *lreason)
+{
+  if(strchr(luser, '!'))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in gline",
+               me.name, source_p->name);
+    return (1);
+  }
+
+  return (0);
+}
+
+/*
+ * set_local_gline
+ *
+ * inputs	- pointer to oper nick
+ * 		- pointer to oper username
+ * 		- pointer to oper host
+ *		- pointer to oper server
+ *		- pointer to victim user
+ *		- pointer to victim host
+ *		- pointer reason
+ * output	- NONE
+ * side effects	-
+ */
+static void
+set_local_gline(const char *oper_nick,
+                            const char *oper_user,
+                            const char *oper_host,
+                            const char *oper_server,
+                            const char *user,
+                            const char *host,
+                            const char *reason)
+{
+  char buffer[IRCD_BUFSIZE];
+  struct ConfItem *aconf;
+  const char *current_date;
+
+  current_date = smalldate((time_t) 0);
+          
+  aconf = make_conf();
+  aconf->status = CONF_KILL;
+
+  ircsprintf(buffer, "%s (%s by %s)",reason,current_date, oper_nick);
+      
+  DupString(aconf->passwd, buffer);
+  DupString(aconf->name, (char *)user);
+  DupString(aconf->host, (char *)host);
+  aconf->hold = CurrentTime + ConfigFileEntry.gline_time;
+  add_gline(aconf);
+      
+  sendto_realops_flags(FLAGS_ALL, L_ALL,
+		       "%s!%s@%s on %s has triggered gline for [%s@%s] [%s]",
+		       oper_nick, oper_user, oper_host, oper_server,
+		       user, host, reason);
+  check_klines();
+}
+
+
+/*
+ * log_gline_request()
+ *
+ */
+static void
+log_gline_request(
+		  const char *oper_nick, const char *oper_user,
+		  const char *oper_host, const char* oper_server,
+		  const char *user, const char *host, const char *reason)
+{
+  char        buffer[2*BUFSIZE];
+  char        filenamebuf[PATH_MAX + 1];
+  static char timebuffer[MAX_DATE_STRING];
+  struct tm*  tmptr;
+  FBFILE*     out;
+
+  if(ConfigFileEntry.glinefile == NULL)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening glinefile");
+      return;
+    }
+
+  ircsprintf(filenamebuf, "%s.%s", 
+             ConfigFileEntry.glinefile, small_file_date((time_t)0));
+  if ( (out = fbopen(filenamebuf, "+a")) == NULL )
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening %s: %s",
+                     filenamebuf, strerror(errno));
+      return;
+    }
+
+  tmptr = localtime((const time_t*)&CurrentTime);
+  strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
+
+  ircsprintf(buffer,
+           "#Gline for %s@%s [%s] requested by %s!%s@%s on %s at %s\n",
+           user,host,reason,
+           oper_nick,oper_user,oper_host,oper_server,
+           timebuffer);
+
+  if (fbputs(buffer, out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s (%s)",
+				     filenamebuf, strerror(errno));
+    }
+  fbclose(out);
+}
+
+/*
+ * log_gline()
+ *
+ */
+static void
+log_gline(struct Client *source_p,
+	  struct gline_pending *gline_pending_ptr,
+	  const char *oper_nick, const char *oper_user, const char *oper_host,
+	  const char *oper_server, const char *user, const char *host,
+	  const char *reason)
+{
+  char         buffer[2*BUFSIZE];
+  char         filenamebuf[PATH_MAX + 1];
+  static  char timebuffer[MAX_DATE_STRING + 1];
+  struct tm*   tmptr;
+  FBFILE       *out;
+
+  if(ConfigFileEntry.glinefile == NULL)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening glinefile.");
+      return;
+    }
+
+  ircsprintf(filenamebuf, "%s.%s", 
+                ConfigFileEntry.glinefile, small_file_date((time_t) 0));
+
+  if ((out = fbopen(filenamebuf, "a")) == NULL)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+			   "*** Problem opening %s",filenamebuf);
+      return;
+    }
+
+  tmptr = localtime((const time_t*)&CurrentTime);
+  strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
+
+  ircsprintf(buffer,"#Gline for %s@%s %s added by the following\n",
+                   user,host,timebuffer);
+
+  if (fbputs(buffer,out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+			   "*** Problem writing to %s",filenamebuf);
+      fbclose(out);
+      return;
+    }
+
+  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
+                   gline_pending_ptr->oper_nick1,
+                   gline_pending_ptr->oper_user1,
+                   gline_pending_ptr->oper_host1,
+                   gline_pending_ptr->oper_server1,
+                   (gline_pending_ptr->reason1)?
+                   (gline_pending_ptr->reason1):"No reason");
+
+  if (fbputs(buffer,out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
+      return;
+    }
+
+  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
+                   gline_pending_ptr->oper_nick2,
+                   gline_pending_ptr->oper_user2,
+                   gline_pending_ptr->oper_host2,
+                   gline_pending_ptr->oper_server2,
+                   (gline_pending_ptr->reason2)?
+                   (gline_pending_ptr->reason2):"No reason");
+
+  if (fbputs(buffer,out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
+      fbclose(out);
+      return;
+    }
+
+  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
+                   oper_nick,
+                   oper_user,
+                   oper_host,
+                   oper_server,
+                   (reason)?reason:"No reason");
+
+  if (fbputs(buffer,out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
+      fbclose(out);
+      return;
+    }
+
+  ircsprintf(buffer, "\"%s\",\"%s\",\"%s %s\",\"%s\",%lu\n",
+	     user,
+	     host,
+	     reason,
+	     timebuffer,
+	     oper_nick,
+	     (unsigned long) CurrentTime);
+
+  if (fbputs(buffer,out) == -1)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
+      fbclose(out);
+      return;
+    }
+
+  fbclose(out);
+}
+
+
+/*
+ * add_new_majority_gline
+ * 
+ * inputs       - name of operator requesting gline
+ * 		- username of operator requesting gline
+ * 		- hostname of operator requesting gline
+ * 		- servername of operator requesting gline
+ * 		- username covered by the gline
+ * 		- hostname covered by the gline
+ * 		- reason for the gline
+ * output       - NONE
+ * side effects -
+ * This function is called once a majority of opers
+ * have agreed on a gline, and it can be placed. The
+ * information about an operator being passed to us
+ * happens to be the operator who pushed us over the
+ * "majority" level needed. See check_majority_gline()
+ * for more information.
+ */
+static void
+add_new_majority_gline(const char* oper_nick, const char* oper_user,
+		       const char* oper_host, const char* oper_server,
+		       const char* user, const char* host,
+		       const char* reason)
+{
+  dlink_node *pending_node;
+
+  struct gline_pending *pending = (struct gline_pending*)
+    MyMalloc(sizeof(struct gline_pending));
+
+  strlcpy(pending->oper_nick1, oper_nick, NICKLEN + 1);
+  strlcpy(pending->oper_user1, oper_user, USERLEN + 1);
+  strlcpy(pending->oper_host1, oper_host, HOSTLEN + 1);
+
+  pending->oper_server1 = find_or_add(oper_server);
+
+  strlcpy(pending->user, user, USERLEN + 1);
+  strlcpy(pending->host, host, HOSTLEN + 1);
+  DupString(pending->reason1, reason);
+  pending->reason2 = NULL;
+
+  pending->last_gline_time = CurrentTime;
+  pending->time_request1 = CurrentTime;
+
+  pending_node = make_dlink_node();
+  dlinkAdd(pending, pending_node, &pending_glines);
+}
+
+/*
+ * check_majority_gline()
+ *
+ * inputs       - oper_nick, oper_user, oper_host, oper_server
+ *                user,host reason
+ *
+ * output       - one of three results
+ *                
+ * GLINE_ALREADY_VOTED	- returned if oper/server has already voted
+ * GLINE_PLACED		- returned if this triggers a gline
+ * GLINE_NOT_PLACED	- returned if not triggered
+ *
+ * Side effects -
+ *      See if there is a majority agreement on a GLINE on the given user
+ *      There must be at least 3 different opers agreeing on this GLINE
+ *
+ */
+static int
+check_majority_gline(struct Client *source_p, const char *oper_nick,
+		     const char *oper_user, const char *oper_host,
+		     const char* oper_server, const char *user,
+		     const char *host, const char *reason)
+{
+  dlink_node *pending_node;
+  struct gline_pending *gline_pending_ptr;
+
+  /* if its already glined, why bother? :) -- fl_ */
+  if(find_is_glined(host, user))
+    return(GLINE_NOT_PLACED);
+    
+  /* special case condition where there are no pending glines */
+
+  if (dlink_list_length(&pending_glines) == 0) /* first gline request placed */
+  {
+    add_new_majority_gline(oper_nick, oper_user, oper_host, oper_server,
+                           user, host, reason);
+    return(GLINE_NOT_PLACED);
+  }
+
+  DLINK_FOREACH(pending_node, pending_glines.head)
+  {
+    gline_pending_ptr = pending_node->data;
+
+    if ((irccmp(gline_pending_ptr->user,user) == 0) &&
+	(irccmp(gline_pending_ptr->host,host) == 0))
+    {
+      if (((irccmp(gline_pending_ptr->oper_user1,oper_user) == 0) ||
+	   (irccmp(gline_pending_ptr->oper_host1,oper_host) == 0)) ||
+	  (irccmp(gline_pending_ptr->oper_server1,oper_server) == 0))
+      {
+	return(GLINE_ALREADY_VOTED);
+      }
+
+      if (gline_pending_ptr->oper_user2[0] != '\0')
+      {
+	/* if two other opers on two different servers have voted yes */
+
+	if(((irccmp(gline_pending_ptr->oper_user2,oper_user)==0) ||
+	    (irccmp(gline_pending_ptr->oper_host2,oper_host)==0)) ||
+	   (irccmp(gline_pending_ptr->oper_server2,oper_server)==0))
+	{
+	  return (GLINE_ALREADY_VOTED);
+	}
+
+	log_gline(source_p,gline_pending_ptr,
+		  oper_nick,oper_user,oper_host,oper_server,
+		  user,host,reason);
+
+	/* trigger the gline using the original reason --fl */
+	set_local_gline(oper_nick, oper_user, oper_host, oper_server,
+			user, host, gline_pending_ptr->reason1);
+	cleanup_glines();
+	return (GLINE_PLACED);
+      }
+      else
+      {
+	strlcpy(gline_pending_ptr->oper_nick2, oper_nick, NICKLEN + 1);
+	strlcpy(gline_pending_ptr->oper_user2, oper_user, USERLEN + 1);
+	strlcpy(gline_pending_ptr->oper_host2, oper_host, HOSTLEN + 1);
+	DupString(gline_pending_ptr->reason2, reason);
+	gline_pending_ptr->oper_server2 = find_or_add(oper_server);
+	gline_pending_ptr->last_gline_time = CurrentTime;
+	gline_pending_ptr->time_request2 = CurrentTime;
+	return(GLINE_NOT_PLACED);
+      }
+    }
+  }
+  /* Didn't find this user@host gline in pending gline list
+   * so add it.
+   */
+  add_new_majority_gline(oper_nick, oper_user, oper_host, oper_server,
+                         user, host, reason);
+  return(GLINE_NOT_PLACED);
+}
+
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/m_ltrace.c ircd-hybrid-fuis/contrib/m_ltrace.c
--- ircd-hybrid-7.0rc9/contrib/m_ltrace.c	Wed Jul 31 18:52:58 2002
+++ ircd-hybrid-fuis/contrib/m_ltrace.c	Wed Dec 31 19:00:00 1969
@@ -1,377 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_ltrace.c: Traces a path to a client/server.
- *
- *  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: m_ltrace.c,v 1.4 2002/07/31 22:52:58 leeh Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "class.h"
-#include "hook.h"
-#include "client.h"
-#include "hash.h"
-#include "common.h"
-#include "hash.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-
-static void m_ltrace(struct Client *, struct Client *, int, char **);
-static void mo_ltrace(struct Client*, struct Client*, int, char**);
-static struct Client* next_client_double(struct Client *next, const char* ch);
-static void ltrace_spy(struct Client *);
-
-struct Message ltrace_msgtab = {
-  "LTRACE", 0, 0, 0, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_ltrace, mo_ltrace, mo_ltrace}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  hook_add_event("doing_ltrace");
-  mod_add_cmd(&ltrace_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  hook_del_event("doing_ltrace");
-  mod_del_cmd(&ltrace_msgtab);
-}
-
-const char *_version = "$Revision: 1.4 $";
-#endif
-
-static int report_this_status(struct Client *source_p, struct Client *target_p,int dow,
-                              int link_u_p, int link_u_s);
-
-/*
- * m_ltrace()
- *
- *	parv[0] = sender prefix
- *	parv[1] = target client/server to trace
- */
-static void m_ltrace(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  char *tname;
-
-  if (parc > 1)
-    tname = parv[1];
-  else
-    tname = me.name;
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
-}
-
-/*
- * mo_ltrace
- *      parv[0] = sender prefix
- *      parv[1] = servername
- */
-static void mo_ltrace(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  struct Client       *target_p = NULL;
-  char  *tname;
-  int   doall, link_s[MAXCONNECTIONS], link_u[MAXCONNECTIONS];
-  int   wilds, dow;
-  dlink_node *ptr;
-  char *looking_for = parv[0];
-
-  if(!IsClient(source_p))
-    return;
-
-  if (parc > 1)
-    tname = parv[1];
-  else
-    tname = me.name;
-
-  if(!IsOper(source_p))
-  {
-    sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
-    return;
-  }
-
-  if (parc > 2)
-    if (hunt_server(client_p, source_p, ":%s LTRACE %s :%s", 2, parc, parv))
-      return;
-
-  switch (hunt_server(client_p, source_p, ":%s LTRACE :%s", 1, parc, parv))
-    {
-    case HUNTED_PASS: /* note: gets here only if parv[1] exists */
-      {
-        struct Client *ac2ptr;
-        
-        ac2ptr = next_client_double(GlobalClientList, tname);
-        if (ac2ptr)
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
-                     ircd_version, debugmode, tname, ac2ptr->from->name);
-        else
-          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
-                     ircd_version, debugmode, tname, "ac2ptr_is_NULL!!");
-        return;
-      }
-    case HUNTED_ISME:
-      break;
-    default:
-      return;
-    }
-
-  ltrace_spy(source_p);
-
-  doall = (parv[1] && (parc > 1)) ? match(tname, me.name): TRUE;
-  wilds = !parv[1] || strchr(tname, '*') || strchr(tname, '?');
-  dow = wilds || doall;
-  
-  set_time();
-
-  /* lusers cant issue ltrace.. */
-  if(!IsOper(source_p) || !dow)
-    {
-      const char* name;
-      const char* class_name;
-      char ipaddr[HOSTIPLEN];
-
-      target_p = find_client(tname);
-      
-      if(target_p && IsPerson(target_p)) 
-      {
-        name = get_client_name(target_p, HIDE_IP);
-        inetntop(target_p->localClient->aftype, &IN_ADDR(target_p->localClient->ip), ipaddr, HOSTIPLEN);
-
-        class_name = get_client_class(target_p);
-
-        if (IsOper(target_p))
-          sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
-                     me.name, parv[0], class_name, name, 
-#ifndef HIDE_SPOOF_IPS
-                     MyOper(source_p) ? ipaddr :
-#endif
-		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
-                     CurrentTime - target_p->lasttime,
-                     (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
-      }
-      
-      sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name,
-                 parv[0], tname);
-      return;
-    }
-
-  memset((void *)link_s,0,sizeof(link_s));
-  memset((void *)link_u,0,sizeof(link_u));
-
-  /*
-   * Count up all the servers and clients in a downlink.
-   */
-  if (doall)
-   {
-    for (target_p = GlobalClientList; target_p; target_p = target_p->next)
-     {
-      if (IsPerson(target_p))
-        {
-          link_u[target_p->from->localClient->fd]++;
-        }
-      else if (IsServer(target_p))
-	{
-	  link_s[target_p->from->localClient->fd]++;
-	}
-     }
-   }
-   
-  /* report all opers */
-  for (ptr = lclient_list.head; ptr; ptr = ptr->next)
-    {
-      target_p = ptr->data;
-
-      if(!IsOper(target_p))
-	continue;
-
-      if (!doall && wilds && !match(tname, target_p->name))
-        continue;
-
-      if (!dow && irccmp(tname, target_p->name))
-        continue;
-
-      report_this_status(source_p,target_p,dow,0,0);
-    }
-
-  /* report all servers */
-  for (ptr = serv_list.head; ptr; ptr = ptr->next)
-    {
-      target_p = ptr->data;
-
-      if (!doall && wilds && !match(tname, target_p->name))
-        continue;
-      if (!dow && irccmp(tname, target_p->name))
-        continue;
-
-      report_this_status(source_p, target_p, dow,
-                               link_u[target_p->localClient->fd],
-                               link_s[target_p->localClient->fd]);
-    }
-
-  sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name, parv[0],tname);
-}
-
-
-
-
-/*
- * report_this_status
- *
- * inputs	- pointer to client to report to
- * 		- pointer to client to report about
- * output	- counter of number of hits
- * side effects - NONE
- */
-static int report_this_status(struct Client *source_p, struct Client *target_p,
-                              int dow, int link_u_p, int link_s_p)
-{
-  const char* name;
-  const char* class_name;
-  char  ip[HOSTIPLEN];
-
-  inetntop(target_p->localClient->aftype, &IN_ADDR(target_p->localClient->ip), ip, HOSTIPLEN);
-  name = get_client_name(target_p, HIDE_IP);
-  class_name = get_client_class(target_p);
-
-  set_time();
-
-  switch(target_p->status)
-    {
-    case STAT_CONNECTING:
-      sendto_one(source_p, form_str(RPL_TRACECONNECTING), me.name,
-                 source_p->name, class_name, 
-		 IsOperAdmin(source_p) ? name : target_p->name);
-		   
-      break;
-
-    case STAT_HANDSHAKE:
-      sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE), me.name,
-                 source_p->name, class_name, 
-                 IsOperAdmin(source_p) ? name : target_p->name);
-		   
-      break;
-      
-    case STAT_ME:
-    case STAT_UNKNOWN:
-      break;
-
-    case STAT_CLIENT:
-      if (IsAdmin(target_p))
-	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
-                   me.name, source_p->name, class_name, name,
-#ifndef HIDE_SPOOF_IPS
-                   IsOperAdmin(source_p) ? ip : 
-#endif
-                   (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
-                   CurrentTime - target_p->lasttime,
-                   (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
-		       
-      else if (IsOper(target_p))
-	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
-		   me.name, source_p->name, class_name, name, 
-#ifndef HIDE_SPOOF_IPS
-		   MyOper(source_p) ? ip : 
-#endif
-		   (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
-		   CurrentTime - target_p->lasttime,
-		   (target_p->user)?(CurrentTime - target_p->user->last):0);
-
-      break;
-    case STAT_SERVER:
-      if(!IsOperAdmin(source_p))
-        name = get_client_name(target_p, MASK_IP);
-
-      sendto_one(source_p, form_str(RPL_TRACESERVER),
-		 me.name, source_p->name, class_name, link_s_p,
-		 link_u_p, name, *(target_p->serv->by) ?
-		 target_p->serv->by : "*", "*",
-		 me.name, CurrentTime - target_p->lasttime);
-      break;
-      
-    default: /* ...we actually shouldn't come here... --msa */
-      sendto_one(source_p, form_str(RPL_TRACENEWTYPE), me.name,
-		 source_p->name, name);
-      break;
-    }
-
-  return 0;
-}
-
-/* ltrace_spy()
- *
- * input        - pointer to client
- * output       - none
- * side effects - hook event doing_trace is called
- */
-static void ltrace_spy(struct Client *source_p)
-{
-  struct hook_spy_data data;
-
-  data.source_p = source_p;
-
-  hook_call_event("doing_ltrace", &data);
-}
-
-/* 
- * this slow version needs to be used for hostmasks *sigh
- *
- * next_client_double - find the next matching client. 
- * The search can be continued from the specified client entry. 
- * Normal usage loop is:
- *
- *      for (x = client; x = next_client_double(x,mask); x = x->next)
- *              HandleMatchingClient;
- *            
- */
-static struct Client* 
-next_client_double(struct Client *next, /* First client to check */
-                   const char* ch)      /* search string (may include wilds) */
-{
-  struct Client *tmp = next;
-
-  next = find_client(ch);
-
-  if (next == NULL)
-    next = tmp;
-
-  if (tmp && tmp->prev == next)
-    return NULL;
-  if (next != tmp)
-    return next;
-  for ( ; next; next = next->next)
-    {
-      if (match(ch,next->name) || match(next->name,ch))
-        break;
-    }
-  return next;
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/m_map.c ircd-hybrid-fuis/contrib/m_map.c
--- ircd-hybrid-7.0rc9/contrib/m_map.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/m_tburst.c ircd-hybrid-fuis/contrib/m_tburst.c
--- ircd-hybrid-7.0rc9/contrib/m_tburst.c	Wed Dec 18 00:33:29 2002
+++ ircd-hybrid-fuis/contrib/m_tburst.c	Wed Dec 31 19:00:00 1969
@@ -1,162 +0,0 @@
-/*  contrib/m_tburst.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_tburst.c,v 1.12 2002/12/18 05:33:29 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "common.h"
-#include "ircd.h"
-#include "send.h"
-#include "msg.h"
-#include "modules.h"
-#include "hook.h"
-#include "hash.h"
-#include "s_serv.h"
-#include "s_conf.h"
-
-
-/* TBURST_PROPAGATE
- *
- * If this is defined, when we receive a TBURST thats successful
- * (ie: our topic changes), the TBURST will be propagated to other
- * servers that support TBURST
- */
-#define TBURST_PROPAGATE
-
-
-
-static void ms_tburst(struct Client *, struct Client *, int, char **);
-static void set_topic(struct Client *, struct Channel *, 
-		      time_t, char *, char *);
-static void set_tburst_capab();
-static void unset_tburst_capab();
-int send_tburst(struct hook_burst_channel *);
-
-struct Message tburst_msgtab = {
-  "TBURST", 0, 0, 6, 0, MFLG_SLOW, 0,
-  {m_ignore, m_ignore, ms_tburst, m_ignore}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&tburst_msgtab);
-  hook_add_hook("burst_channel", (hookfn *)send_tburst);
-  set_tburst_capab();
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&tburst_msgtab);
-  hook_del_hook("burst_channel", (hookfn *)send_tburst);
-  unset_tburst_capab();
-}
-
-const char *_version = "$Revision: 1.12 $";
-#endif
-
-/* ms_tburst()
- * 
- *      parv[0] = sender prefix
- *      parv[1] = channel timestamp
- *      parv[2] = channel
- *      parv[3] = topic timestamp
- *      parv[4] = topic setter
- *      parv[5] = topic
- */
-static void ms_tburst(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  struct Channel *chptr;
-  time_t newchannelts;
-  time_t newtopicts;
-
-  newchannelts = atol(parv[1]);
-  newtopicts = atol(parv[3]);
-
-  if((chptr = hash_find_channel(parv[2])))
-  {
-    if(chptr->channelts < newchannelts)
-      return;
-
-    else if(chptr->channelts == newchannelts)
-    {
-      if(chptr->topic == NULL || (chptr->topic_time > newtopicts))
-	set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
-      else
-	return;
-    }
-
-    else
-      set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
-  }
-}
-
-static void set_topic(struct Client *source_p, struct Channel *chptr, 
-		      time_t newtopicts, char *topicwho, char *topic)
-{
-  set_channel_topic(chptr, topic, topicwho, newtopicts);
-
-  sendto_channel_local(ALL_MEMBERS, chptr, ":%s TOPIC %s :%s",
-		       ConfigServerHide.hide_servers ? me.name : me.name,
-		       chptr->chname, chptr->topic == NULL ? "" : chptr->topic);
-
-#ifdef TBURST_PROPAGATE
-  sendto_server(source_p, NULL, chptr, CAP_TBURST, NOCAPS, NOFLAGS,
-		":%s TBURST %ld %s %ld %s :%s",
-		me.name, chptr->channelts, chptr->chname,
-		chptr->topic_time, 
-                chptr->topic_info == NULL ? "" : chptr->topic_info,
-                chptr->topic == NULL ? "" : chptr->topic);
-#endif
-}
-
-static void set_tburst_capab()
-{
-  default_server_capabs |= CAP_TBURST;
-}
-
-static void unset_tburst_capab()
-{
-  default_server_capabs &= ~CAP_TBURST;
-}
-
-int send_tburst(struct hook_burst_channel *data)
-{
-  if(data->chptr->topic != NULL && IsCapable(data->client, CAP_TBURST))
-    sendto_one(data->client, ":%s TBURST %ld %s %ld %s :%s",
-               me.name, data->chptr->channelts, data->chptr->chname,
-	       data->chptr->topic_time, data->chptr->topic_info, 
-	       data->chptr->topic);
-
-  return 0;
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/s_gline.c ircd-hybrid-fuis/contrib/s_gline.c
--- ircd-hybrid-7.0rc9/contrib/s_gline.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/contrib/s_gline.c	Sun Feb 16 21:09:37 2003
@@ -0,0 +1,217 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  s_gline.c: GLine global ban functions.
+ *
+ *  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: s_gline.c,v 1.23 2002/09/05 02:48:42 db Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "client.h"
+#include "common.h"
+#include "config.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "m_kline.h"
+#include "hostmask.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_misc.h"
+#include "scache.h"
+#include "send.h"
+#include "msg.h"
+#include "fileio.h"
+#include "s_serv.h"
+#include "s_gline.h"
+#include "hash.h"
+#include "event.h"
+#include "list.h"
+#include "memory.h"
+
+
+dlink_list glines;
+
+static void expire_glines(void);
+static void expire_pending_glines(void);
+
+/* add_gline
+ *
+ * inputs       - pointer to struct ConfItem
+ * output       - none
+ * Side effects - links in given struct ConfItem into gline link list
+ */
+void
+add_gline(struct ConfItem *aconf)
+{
+  dlink_node *gline_node;
+  gline_node = make_dlink_node();
+  dlinkAdd(aconf, gline_node, &glines);
+}
+
+/* find_gkill
+ *
+ * inputs       - struct Client pointer to a Client struct
+ * output       - struct ConfItem pointer if a gline was found for this client
+ * side effects - none
+ */
+struct ConfItem*
+find_gkill(struct Client* client_p, char* username)
+{
+  assert(NULL != client_p);
+  if(client_p == NULL)
+    return NULL;
+  return (IsExemptKline(client_p)) ? 0 : find_is_glined(client_p->host, username);
+}
+
+/*
+ * find_is_glined
+ * inputs       - hostname
+ *              - username
+ * output       - pointer to struct ConfItem if user@host glined
+ * side effects -
+ */
+struct ConfItem*
+find_is_glined(const char* host, const char* name)
+{
+  dlink_node *gline_node;
+  struct ConfItem *kill_ptr; 
+
+  DLINK_FOREACH(gline_node, glines.head)
+  {
+    kill_ptr = gline_node->data;
+    if( (kill_ptr->name && (!name || match(kill_ptr->name,name)))
+	&&
+	(kill_ptr->host && (!host || match(kill_ptr->host,host))))
+    {
+      return(kill_ptr);
+    }
+  }
+
+  return((struct ConfItem *)NULL);
+}
+
+/*
+ * remove_gline_match
+ *
+ * inputs       - user@host
+ * output       - 1 if successfully removed, otherwise 0
+ * side effects -
+ */
+int
+remove_gline_match(const char* user, const char* host)
+{
+  dlink_node *gline_node;
+  struct ConfItem *kill_ptr;
+
+  DLINK_FOREACH(gline_node, glines.head)
+  {
+    kill_ptr = gline_node->data;
+    if(!irccmp(kill_ptr->host,host) && !irccmp(kill_ptr->name,user))
+    {
+      free_conf(kill_ptr);
+      dlinkDelete(gline_node, &glines);
+      free_dlink_node(gline_node);
+      return (1);
+    }
+  }
+  return (0);
+}
+
+/*
+ * cleanup_glines
+ *
+ * inputs	- NONE
+ * output	- NONE
+ * side effects - expire gline lists
+ *                This is an event started off in ircd.c
+ */
+void
+cleanup_glines()
+{
+  expire_glines();
+  expire_pending_glines();
+}
+
+/*
+ * expire_glines
+ * 
+ * inputs       - NONE
+ * output       - NONE
+ * side effects -
+ *
+ * Go through the gline list, expire any needed.
+ */
+static void
+expire_glines()
+{
+  dlink_node *gline_node;
+  dlink_node *next_node;
+  struct ConfItem *kill_ptr;
+
+  DLINK_FOREACH_SAFE(gline_node, next_node, glines.head)
+  {
+    kill_ptr = gline_node->data;
+
+    if(kill_ptr->hold <= CurrentTime)
+    {
+      free_conf(kill_ptr);
+      dlinkDelete(gline_node, &glines);
+      free_dlink_node(gline_node);
+    }
+  }
+}
+
+/*
+ * expire_pending_glines
+ * 
+ * inputs       - NONE
+ * output       - NONE
+ * side effects -
+ *
+ * Go through the pending gline list, expire any that haven't had
+ * enough "votes" in the time period allowed
+ */
+static void
+expire_pending_glines()
+{
+  dlink_node *pending_node;
+  dlink_node *next_node;
+  struct gline_pending *glp_ptr;
+
+  DLINK_FOREACH_SAFE(pending_node, next_node, pending_glines.head)
+  {
+    glp_ptr = pending_node->data;
+
+    if(((glp_ptr->last_gline_time + GLINE_PENDING_EXPIRE) <= CurrentTime)
+       || find_is_glined(glp_ptr->host, glp_ptr->user))
+      
+    {
+      MyFree(glp_ptr->reason1);
+      MyFree(glp_ptr->reason2);
+      MyFree(glp_ptr);
+      dlinkDelete(pending_node, &pending_glines);
+      free_dlink_node(pending_node);
+    }
+  }
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/s_gline.h ircd-hybrid-fuis/contrib/s_gline.h
--- ircd-hybrid-7.0rc9/contrib/s_gline.h	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/contrib/s_gline.h	Sun Feb 16 21:09:37 2003
@@ -0,0 +1,72 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  s_gline.h: A header for the gline functions.
+ *
+ *  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: s_gline.h,v 7.11 2002/05/24 23:34:08 androsyn Exp $
+ */
+
+#ifndef INCLUDED_s_gline_h
+#define INCLUDED_s_gline_h
+
+#include "config.h"
+#include "ircd_defs.h"
+
+struct Client;
+struct ConfItem;
+
+extern struct ConfItem* find_gkill(struct Client* client, char *);
+extern struct ConfItem* find_is_glined(const char* host, const char* name);
+extern int    remove_gline_match(const char *user, const char *host);
+extern void   cleanup_glines();
+extern void   add_gline(struct ConfItem *);
+
+
+typedef struct gline_pending
+{
+  char oper_nick1[NICKLEN + 1];
+  char oper_user1[USERLEN + 1];
+  char oper_host1[HOSTLEN + 1];
+  const char* oper_server1;     /* point to scache */
+  char *reason1;
+  time_t time_request1;
+
+  char oper_nick2[NICKLEN + 1];
+  char oper_user2[USERLEN + 1];
+  char oper_host2[HOSTLEN + 1];
+  const char* oper_server2;     /* point to scache */
+  char *reason2;
+  time_t time_request2;
+  
+  time_t last_gline_time;       /* for expiring entry */
+  char user[USERLEN + 1];
+  char host[HOSTLEN + 1];
+}gline_pending_t;
+
+/* how long a pending G line can be around
+ * 10 minutes should be plenty
+ */
+
+#define GLINE_PENDING_EXPIRE 600
+#define CLEANUP_GLINES_TIME  300
+
+dlink_list pending_glines;
+extern dlink_list glines;
+
+#endif
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_admin_notice.c ircd-hybrid-fuis/contrib/spy_admin_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_admin_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_info_notice.c ircd-hybrid-fuis/contrib/spy_info_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_info_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_links_notice.c ircd-hybrid-fuis/contrib/spy_links_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_links_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_motd_notice.c ircd-hybrid-fuis/contrib/spy_motd_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_motd_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_stats_notice.c ircd-hybrid-fuis/contrib/spy_stats_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_stats_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_trace_notice.c ircd-hybrid-fuis/contrib/spy_trace_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_trace_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/contrib/spy_whois_notice.c ircd-hybrid-fuis/contrib/spy_whois_notice.c
--- ircd-hybrid-7.0rc9/contrib/spy_whois_notice.c	Fri May 24 19:48:34 2002
+++ ircd-hybrid-fuis/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 -x doc -x help ircd-hybrid-7.0rc9/iauth/.cvsignore ircd-hybrid-fuis/iauth/.cvsignore
--- ircd-hybrid-7.0rc9/iauth/.cvsignore	Tue Jul  3 00:53:06 2001
+++ ircd-hybrid-fuis/iauth/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/iauth/source/.cvsignore ircd-hybrid-fuis/iauth/source/.cvsignore
--- ircd-hybrid-7.0rc9/iauth/source/.cvsignore	Tue Jul  3 00:53:07 2001
+++ ircd-hybrid-fuis/iauth/source/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/.cvsignore ircd-hybrid-fuis/include/.cvsignore
--- ircd-hybrid-7.0rc9/include/.cvsignore	Tue Jul  3 00:53:08 2001
+++ ircd-hybrid-fuis/include/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,2 +0,0 @@
-Makefile
-setup.h
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/channel.h ircd-hybrid-fuis/include/channel.h
--- ircd-hybrid-7.0rc9/include/channel.h	Fri Jan 31 18:00:25 2003
+++ ircd-hybrid-fuis/include/channel.h	Wed Mar 12 16:18:57 2003
@@ -73,6 +73,7 @@
 #ifdef HALFOPS
   dlink_list      halfops;
 #endif
+  dlink_list	  nokick;
   dlink_list      voiced;
   dlink_list      peons;                /* non ops, just members */
   dlink_list	  deopped;              /* users deopped on sjoin */
@@ -180,7 +181,8 @@
 #ifdef INTENSIVE_DEBUG
 void do_channel_integrity_check(void);
 #endif
-
+void DelNokick(struct Channel *cptr, struct Client *source_p);
+void AddNokick(struct Channel *cptr, struct Client *source_p);
 void set_channel_topic(struct Channel *chptr, const char *topic, const char *topic_info, time_t topicts); 
 void free_topic(struct Channel *);
 int allocate_topic(struct Channel *);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/channel_mode.h ircd-hybrid-fuis/include/channel_mode.h
--- ircd-hybrid-7.0rc9/include/channel_mode.h	Mon Oct 28 16:09:20 2002
+++ ircd-hybrid-fuis/include/channel_mode.h	Sun Feb  9 08:21:20 2003
@@ -100,6 +100,12 @@
 #define MODE_EXCEPTION  0x0800
 #define MODE_INVEX	0x2000
 #define MODE_HIDEOPS    0x4000
+#define MODE_NOCOLOR    0x8000
+#define MODE_JOINF	    0x10000
+#define MODE_NOCTCP	    0x20000
+#define MODE_NOTALK	    0x40000
+#define MODE_NOSPAM	    0x80000
+#define MODE_NOREPEAT   0x100000
 
 /*
  * mode flags which take another parameter (With PARAmeterS)
@@ -118,6 +124,7 @@
 #define ParanoidChannel(x)	((x) && ((x)->mode.mode &\
 			        (MODE_PRIVATE|MODE_INVITEONLY))==\
 		                (MODE_PRIVATE|MODE_INVITEONLY))
+#define NoRepeatChannel(x)      ((x) && ((x)->mode.mode & MODE_NOREPEAT))
 
 struct ChModeChange
 {
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/client.h ircd-hybrid-fuis/include/client.h
--- ircd-hybrid-7.0rc9/include/client.h	Sun Feb 16 17:54:35 2003
+++ ircd-hybrid-fuis/include/client.h	Sun Apr 13 12:17:28 2003
@@ -50,7 +50,6 @@
 
 #define CLIENT_BUFSIZE 512      /* must be at least 512 bytes */
 
-
 /*
  * pre declare structs
  */
@@ -61,6 +60,12 @@
 struct Client;
 struct LocalUser;
 
+struct Repeat {
+  struct Channel *chptr;      /* last phrase block */
+  char *text;
+  time_t lastphrase;
+};
+
 /*
  * Client structures
  */
@@ -68,6 +73,7 @@
 {
   dlink_list     channel;       /* chain of channel pointer blocks */
   dlink_list     invited;       /* chain of invite pointer blocks */
+  dlink_list    repeat;         /* chain of last phrases per channel blocks */
   char*          away;          /* pointer to away message */
   time_t         last_away;     /* Away since... */
   time_t         last;
@@ -81,6 +87,7 @@
   char id_key[IDLEN + 1];
   /* When did we detach from them, if they are detached... */
   time_t            last_detach_time;
+  int known;    /* USER came from particular type of client */
 };
 
 struct Server
@@ -180,6 +187,8 @@
    * considered a read-only field after the client has registered.
    */
   char              host[HOSTLEN + 1];     /* client's hostname */
+
+  char              realhost[HOSTLEN + 1];     /* client's hostname */
   /*
    * client->info for unix clients will normally contain the info from the 
    * gcos field in /etc/passwd but anything can go here.
@@ -202,7 +211,8 @@
   
   
   struct LocalUser *localClient;
-
+  time_t ns_reg; /* when the nick was registered in NS */
+  
 };
 
 struct LocalUser
@@ -422,35 +432,44 @@
 /* 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_NK_ID        0x80000 /* NetKeeper */
+#define FLAGS_OS_ID        0x100000 /* Idented in OS */
+#define FLAGS_NS_ID        0x200000 /* Idented in NS */
+#define FLAGS_SILENCE      0x400000 /* user's mode +S */
+#define FLAGS_AVFH         0x800000 /* user's mode +h */
+#define FLAGS_TRANSWIN     0x1000000 /* translate cyrillic Windows-1251 */
+#define FLAGS_TRANSISO     0x2000000 /* translate cyrillic ISO-8859-5 */
+#define FLAGS_NODCC        0x4000000 /* stop sending forbidden files */
+#define FLAGS_NOLIST       0x8000000 /* hide channel list from whois*/
+#define FLAGS_NOIDLE       0x10000000 /* hide idle from whois */
 
 #define FLAGS_ALL	   FLAGS_SERVNOTICE
 
 
 /* overflow flags */
-#define FLAGS2_EXEMPTGLINE  0x0001	/* client can't be G-lined */
-#define FLAGS2_EXEMPTKLINE  0x0002      /* client is exempt from kline */
-#define FLAGS2_NOLIMIT      0x0004      /* client is exempt from limits */
-#define FLAGS2_RESTRICTED   0x0008      /* client cannot op others */
+#define FLAGS2_EXEMPTKLINE  0x0001      /* client is exempt from kline */
+#define FLAGS2_NOLIMIT      0x0002      /* client is exempt from limits */
+#define FLAGS2_RESTRICTED   0x0004      /* client cannot op others */
 
 /* oper priv flags */
 #define FLAGS2_OPER_GLOBAL_KILL 0x0020  /* oper can global kill */
 #define FLAGS2_OPER_REMOTE      0x0040  /* oper can do squits/connects */
 #define FLAGS2_OPER_UNKLINE     0x0080  /* oper can use unkline */
-#define FLAGS2_OPER_GLINE       0x0100  /* oper can use gline */
 #define FLAGS2_OPER_N           0x0200  /* oper can umode n */
 #define FLAGS2_OPER_K           0x0400  /* oper can kill/kline */
 #define FLAGS2_OPER_DIE         0x0800  /* oper can die */
 #define FLAGS2_OPER_REHASH      0x1000  /* oper can rehash */
 #define FLAGS2_OPER_ADMIN       0x2000  /* oper can set umode +a */
+#define FLAGS2_OPER_OPERWALL    0x4000  /* oper can do /OPERWALL */
 #define FLAGS2_OPER_FLAGS       (FLAGS2_OPER_GLOBAL_KILL | \
                                  FLAGS2_OPER_REMOTE | \
                                  FLAGS2_OPER_UNKLINE | \
-                                 FLAGS2_OPER_GLINE | \
                                  FLAGS2_OPER_N | \
                                  FLAGS2_OPER_K | \
                                  FLAGS2_OPER_DIE | \
                                  FLAGS2_OPER_REHASH| \
-                                 FLAGS2_OPER_ADMIN)
+                                 FLAGS2_OPER_ADMIN | \
+                                FLAGS2_OPER_OPERWALL) 
 
 #define FLAGS2_CBURST		0x10000  /* connection burst being sent */
 #define FLAGS2_PING_COOKIE	0x20000		/* PING Cookie */
@@ -460,12 +479,16 @@
                                                * been ended. */
 
 #define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | \
-                      FLAGS_ADMIN)
+                      FLAGS_ADMIN | FLAGS_SILENCE)
 #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_NS_ID | \
+      			      FLAGS_OS_ID | FLAGS_NK_ID | FLAGS_SILENCE | FLAGS_AVFH | \
+					  FLAGS_TRANSWIN | FLAGS_TRANSISO | FLAGS_NODCC | \
+					  FLAGS_NOLIST | FLAGS_NOIDLE)
+
 
 #define FLAGS_ID     (FLAGS_NEEDID | FLAGS_GOTID)
 
@@ -535,16 +558,31 @@
 #define SetCallerId(x)		((x)->umodes |= FLAGS_CALLERID)
 #define IsSetCallerId(x)	((x)->umodes & FLAGS_CALLERID)
 
-#define SetSendQExceeded(x)	((x)->flags |= FLAGS_SENDQEX)
-#define IsSendQExceeded(x)	((x)->flags & FLAGS_SENDQEX)
+#define SetSendQExceeded(x)   ((x)->flags |= FLAGS_SENDQEX)
+#define IsSendQExceeded(x)    ((x)->flags & FLAGS_SENDQEX)
 
+#define IsNetKeeper(x)          ((x)->umodes & FLAGS_NK_ID)
+#define SetNetKeeper(x)         ((x)->umodes |= FLAGS_NK_ID)
+#define ClearNetKeeper(x)       ((x)->umodes &= ~FLAGS_NK_ID)
+#define IsOSId(x)               ((x)->umodes & FLAGS_OS_ID)
+#define SetOSId(x)              ((x)->umodes |= FLAGS_OS_ID)
+#define ClearOSId(x)            ((x)->umodes &= ~FLAGS_OS_ID)
+#define IsNSId(x)               ((x)->umodes & FLAGS_NS_ID)
+#define SetNSId(x)              ((x)->umodes |= FLAGS_NS_ID)
+#define ClearNSId(x)            ((x)->umodes &= ~FLAGS_NS_ID)
+#define ClearNSId(x)            ((x)->umodes &= ~FLAGS_NS_ID)
+#define HasSilence(x)           ((x)->umodes & FLAGS_SILENCE)
+#define HasNoChannelList(x)     ((x)->umodes & FLAGS_NOLIST)
+#define SetSilence(x)           ((x)->umodes |= FLAGS_SILENCE)
+#define IsSetTransWin(x)        ((x)->umodes & FLAGS_TRANSWIN)
+#define IsSetTransISO(x)        ((x)->umodes & FLAGS_TRANSISO)
 #define SetIpHash(x)            ((x)->flags |= FLAGS_IPHASH)
 #define ClearIpHash(x)          ((x)->flags &= ~FLAGS_IPHASH)
 #define IsIpHash(x)             ((x)->flags & FLAGS_IPHASH)
 
-#define SetPingSent(x)		((x)->flags |= FLAGS_PINGSENT)
-#define IsPingSent(x)		((x)->flags & FLAGS_PINGSENT)
-#define ClearPingSent(x)	((x)->flags &= ~FLAGS_PINGSENT)
+#define SetPingSent(x)        ((x)->flags |= FLAGS_PINGSENT)
+#define IsPingSent(x)     ((x)->flags & FLAGS_PINGSENT)
+#define ClearPingSent(x)  ((x)->flags &= ~FLAGS_PINGSENT)
 
 #define SetNeedId(x)            ((x)->flags |= FLAGS_NEEDID)
 #define IsNeedId(x)             (((x)->flags & FLAGS_NEEDID) != 0)
@@ -559,8 +597,6 @@
 #define SetExemptKline(x)       ((x)->flags2 |= FLAGS2_EXEMPTKLINE)
 #define IsExemptLimits(x)       ((x)->flags2 & FLAGS2_NOLIMIT)
 #define SetExemptLimits(x)      ((x)->flags2 |= FLAGS2_NOLIMIT)
-#define IsExemptGline(x)        ((x)->flags2 & FLAGS2_EXEMPTGLINE)
-#define SetExemptGline(x)       ((x)->flags2 |= FLAGS2_EXEMPTGLINE)
 #define SetIPSpoof(x)           ((x)->flags2 |= FLAGS2_IP_SPOOFING)
 #define IsIPSpoof(x)            ((x)->flags2 & FLAGS2_IP_SPOOFING)
 
@@ -574,10 +610,11 @@
 #define SetOperGlobalKill(x)    ((x)->flags2 |= FLAGS2_OPER_GLOBAL_KILL)
 #define IsOperRemote(x)         ((x)->flags2 & FLAGS2_OPER_REMOTE)
 #define SetOperRemote(x)        ((x)->flags2 |= FLAGS2_OPER_REMOTE)
+#define IsOperOperwall(x)         ((x)->flags2 & FLAGS2_OPER_OPERWALL)
+#define SetOperOperwall(x)        ((x)->flags2 |= FLAGS2_OPER_OPERWALL)
 #define IsOperUnkline(x)        ((x)->flags2 & FLAGS2_OPER_UNKLINE)
 #define SetOperUnkline(x)       ((x)->flags2 |= FLAGS2_OPER_UNKLINE)
-#define IsOperGline(x)          ((x)->flags2 & FLAGS2_OPER_GLINE)
-#define SetOperGline(x)         ((x)->flags2 |= FLAGS2_OPER_GLINE)
+
 #define IsOperN(x)              ((x)->flags2 & FLAGS2_OPER_N)
 #define SetOperN(x)             ((x)->flags2 |= FLAGS2_OPER_N)
 #define IsOperK(x)              ((x)->flags2 & FLAGS2_OPER_K)
@@ -631,8 +668,10 @@
                              char *nick);
 extern void dead_link_on_write(struct Client *client_p, int ierrno);
 extern void dead_link_on_read(struct Client *client_p, int error);
+
 extern void exit_aborted_clients(void);
 extern void free_exited_clients(void);
 
+extern char *translate(struct Client *client_p, char *buf);
 #endif /* INCLUDED_client_h */
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/config.h ircd-hybrid-fuis/include/config.h
--- ircd-hybrid-7.0rc9/include/config.h	Thu Feb  6 03:46:11 2003
+++ ircd-hybrid-fuis/include/config.h	Sun Apr 13 12:18:57 2003
@@ -1,6 +1,6 @@
 /*
  *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  config.h: The ircd compile-time-configurable header.
+ *  config.h.dist: The ircd compile-time-configurable header.
  *
  *  Copyright (C) 2002 by the past and present ircd coders, and others.
  *
@@ -102,7 +102,7 @@
 #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 OFPATH  ETCPATH "OPERS.FILE"			/* random is operator whois file */
 #define RPATH   ETCPATH "IRCD.RSA"              /* RSA private key file */
 #define MPATH   ETCPATH "IRCD.MOTD"             /* MOTD filename */
 #define LPATH   LOGPATH "IRCD.LOG"              /* logfile */
@@ -148,7 +148,7 @@
 #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 OFPATH  ETCPATH "/opers.file"           /* random is operator whois file */
 #define RPATH   ETCPATH "/ircd.rsa"             /* ircd rsa private keyfile */
 #define MPATH   ETCPATH "/ircd.motd"            /* MOTD file */
 #define LPATH   LOGPATH "/ircd.log"             /* ircd logfile */
@@ -242,7 +242,7 @@
  * The number of messages that we can receive before we disconnect the
  * remote client...
  */
-#define CLIENT_FLOOD 20
+#define CLIENT_FLOOD 10
 
 /* NICKNAMEHISTORYLENGTH - size of WHOWAS array
  * this defines the length of the nickname history.  each time a user changes
@@ -296,8 +296,8 @@
  * If you have enabled efnet specific code these will be disabled automatically
  * else they are here for anyone else.
  */
-#define VCHANS
-#define ANONOPS
+#undef VCHANS
+#undef ANONOPS
 #define HALFOPS
 
 /*
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/config.h.dist ircd-hybrid-fuis/include/config.h.dist
--- ircd-hybrid-7.0rc9/include/config.h.dist	Fri Jan 17 00:21:28 2003
+++ ircd-hybrid-fuis/include/config.h.dist	Wed Mar 12 16:20:32 2003
@@ -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.142 2003/02/06 08:46:11 a1kmm Exp $
  */
 
 #ifndef INCLUDED_config_h
@@ -102,7 +102,7 @@
 #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 OFPATH  ETCPATH "OPERS.FILE"			/* random is operator whois file */
 #define RPATH   ETCPATH "IRCD.RSA"              /* RSA private key file */
 #define MPATH   ETCPATH "IRCD.MOTD"             /* MOTD filename */
 #define LPATH   LOGPATH "IRCD.LOG"              /* logfile */
@@ -148,7 +148,7 @@
 #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 OFPATH  ETCPATH "/opers.file"           /* random is operator whois file */
 #define RPATH   ETCPATH "/ircd.rsa"             /* ircd rsa private keyfile */
 #define MPATH   ETCPATH "/ircd.motd"            /* MOTD file */
 #define LPATH   LOGPATH "/ircd.log"             /* ircd logfile */
@@ -195,7 +195,7 @@
  * doc/ts5.txt for more information.  If your network has old servers
  * (hyb5, hyb6.0, +CSr) or hybserv you should NOT define this.
  */
-#undef TS5_ONLY
+#define TS5_ONLY
 
 /* USE_LOGFILE - log errors and such to LPATH
  * If you wish to have the server send 'vital' messages about server
@@ -242,7 +242,7 @@
  * The number of messages that we can receive before we disconnect the
  * remote client...
  */
-#define CLIENT_FLOOD 20
+#define CLIENT_FLOOD 10
 
 /* NICKNAMEHISTORYLENGTH - size of WHOWAS array
  * this defines the length of the nickname history.  each time a user changes
@@ -296,8 +296,8 @@
  * If you have enabled efnet specific code these will be disabled automatically
  * else they are here for anyone else.
  */
-#define VCHANS
-#define ANONOPS
+#undef VCHANS
+#undef ANONOPS
 #define HALFOPS
 
 /* END OF CONFIGURABLE OPTIONS */
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/defaults.h ircd-hybrid-fuis/include/defaults.h
--- ircd-hybrid-7.0rc9/include/defaults.h	Sat Nov 23 12:12:55 2002
+++ ircd-hybrid-fuis/include/defaults.h	Mon Feb 10 12:42:04 2003
@@ -52,8 +52,8 @@
 #define TS_WARN_DELTA_DEFAULT 30        /* default for ts_warn_delta */
 
 /* ServerInfo default values */
-#define NETWORK_NAME_DEFAULT "EFnet"             /* default for network_name */
-#define NETWORK_DESC_DEFAULT "Eris Free Network" /* default for network_desc */
+#define NETWORK_NAME_DEFAULT "FUIS"             /* default for network_name */
+#define NETWORK_DESC_DEFAULT "Free Union Of IRC Servers" /* default for network_desc */
 
 /* General defaults */
 #define MAXIMUM_LINKS_DEFAULT 1         /* default for maximum_links */
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/ircd.h ircd-hybrid-fuis/include/ircd.h
--- ircd-hybrid-7.0rc9/include/ircd.h	Thu Feb  6 03:46:10 2003
+++ ircd-hybrid-fuis/include/ircd.h	Wed Mar 12 16:18:58 2003
@@ -94,6 +94,7 @@
 #define CurrentTime SystemTime.tv_sec
 extern time_t         nextconnect;
 extern int            default_server_capabs;
+extern int            ServicesOn;
 
 extern int splitmode;
 extern int splitchecking;
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/modules.h ircd-hybrid-fuis/include/modules.h
--- ircd-hybrid-7.0rc9/include/modules.h	Tue Nov 12 08:45:40 2002
+++ ircd-hybrid-fuis/include/modules.h	Sun Feb 16 21:09:37 2003
@@ -96,7 +96,6 @@
 extern struct Message drop_msgtab;
 extern struct Message eob_msgtab;
 extern struct Message error_msgtab;
-extern struct Message gline_msgtab;
 extern struct Message help_msgtab;
 extern struct Message info_msgtab;
 extern struct Message invite_msgtab;
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/motd.h ircd-hybrid-fuis/include/motd.h
--- ircd-hybrid-7.0rc9/include/motd.h	Fri May 24 19:34:07 2002
+++ ircd-hybrid-fuis/include/motd.h	Sun Feb  9 08:21:20 2003
@@ -33,7 +33,8 @@
 typedef enum {
   USER_MOTD,
   USER_LINKS,
-  OPER_MOTD
+  OPER_MOTD,
+  OPERS_FILE
 } MotdType;
 
 struct MessageFileLine
@@ -49,6 +50,7 @@
   char             fileName[PATH_MAX + 1];
   MotdType         motdType;
   MessageFileLine* contentsOfFile;
+  int			   linecount;
   char             lastChangedDate[MAX_DATE_STRING + 1];
 };
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/numeric.h ircd-hybrid-fuis/include/numeric.h
--- ircd-hybrid-7.0rc9/include/numeric.h	Wed Nov 27 10:46:24 2002
+++ ircd-hybrid-fuis/include/numeric.h	Sun Feb 16 11:17:57 2003
@@ -113,6 +113,7 @@
 #define RPL_STATSFLINE       224
 #define RPL_STATSDLINE       225
 #define RPL_STATSALINE	     226
+#define RPL_EQUIVALENTS      228
 
 /*	RPL_RULES	     232	unreal */
 
@@ -158,6 +159,7 @@
 
 #define RPL_LOCALUSERS       265
 #define RPL_GLOBALUSERS      266
+#define RPL_IDENTUSERS        267
 
 #define RPL_VCHANEXIST       276
 #define RPL_VCHANLIST        277
@@ -218,7 +220,6 @@
 #define RPL_WHOISUSER        311
 #define RPL_WHOISSERVER      312
 #define RPL_WHOISOPERATOR    313
-
 #define RPL_WHOWASUSER       314
 /* rpl_endofwho below (315) */
 #define RPL_ENDOFWHOWAS      369
@@ -228,22 +229,30 @@
 
 #define RPL_ENDOFWHOIS       318
 #define RPL_WHOISCHANNELS    319
+#define RPL_SERVICESCHANS    320
 /*      RPL_WHOIS_HIDDEN     320         Anothernet +h, ick! */
 /*	RPL_WHOISSPECIAL     320	unreal */
 #define RPL_LISTSTART        321
 #define RPL_LIST             322
 #define RPL_LISTEND          323
 #define RPL_CHANNELMODEIS    324
+#define RPL_NS_ID 325
+#define RPL_OS_ID 326
+#define RPL_NK_ID 327
+#define RPL_SILENCE 328
 /*      RPL_CHANNELPASSIS    325           IRCnet extension */
 /*      RPL_UNIQOPIS         325           IRCnet extension */
 /*      RPL_NOCHANPASS       326           IRCnet extension */
 /*      RPL_CHPASSUNKNOWN    327           IRCnet extension */
 /*      RPL_CHANNEL_URL      328           dalnet, anothernet */
 #define RPL_CREATIONTIME     329
+#define RPL_AVFH			 330
 /*      RPL_WHOWAS_TIME      330               ? */
 #define RPL_NOTOPIC          331
 #define RPL_TOPIC            332
 #define RPL_TOPICWHOTIME     333
+#define RPL_WHOISREALHOST	 334
+#define RPL_NOLIST			 335
 /*	RPL_COMMANDSYNTAX    334	   Dalnet */
 /*	RPL_LISTSYNTAX	     334	   unreal */
 /*      RPL_CHANPASSOK       338           IRCnet extension (?)*/
@@ -275,7 +284,7 @@
 #define RPL_BANLIST          367
 #define RPL_ENDOFBANLIST     368
 /* rpl_endofwhowas above (369) */
-
+#define RPL_LINKSUSERS		 370
 #define RPL_INFO             371
 #define RPL_MOTD             372
 #define RPL_INFOSTART        373
@@ -355,6 +364,7 @@
 #define ERR_USERSDISABLED    446
 
 #define ERR_NOTREGISTERED    451
+#define ERR_NOREPEATING      452
 
 /*      ERR_IDCOLLISION      452           IRCnet extension ? */
 /*      ERR_NICKLOST         453           IRCnet extension ? */
@@ -396,6 +406,11 @@
 #define ERR_CANTKILLSERVER   483
 #define ERR_RESTRICTED       484
 #define ERR_BANNEDNICK       485
+#define ERR_SERVICESNICKHOP  486
+#define ERR_SERVICESNICKKICK 487 
+#define ERR_NOKICK			 488
+#define ERR_NOCOLOR			 489
+#define ERR_JOINF			 490
 /*	ERR_DESYNC	     484	 Dalnet,PTlink */
 /*	ERR_ATTACKDENY	     484	 unreal */
 /*	ERR_RESTRICTED	     484	   IRCnet extension */
@@ -407,7 +422,10 @@
 /*      ERR_TSLESSCHAN       488           IRCnet extension (?) */
 /*	ERR_VOICENEEDED      489           Undernet extension */
 #define ERR_NOOPERHOST       491
+#define ERR_NOCTCP       	 492
 /*      ERR_NOSERVICEHOST    492 	   IRCnet extension */
+#define ERR_NOTALK       	 493
+#define ERR_NOSPAM       	 494
 
 #define ERR_UMODEUNKNOWNFLAG 501
 #define ERR_USERSDONTMATCH   502
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/patchlevel.h ircd-hybrid-fuis/include/patchlevel.h
--- ircd-hybrid-7.0rc9/include/patchlevel.h	Thu Feb 20 00:41:04 2003
+++ ircd-hybrid-fuis/include/patchlevel.h	Thu Mar 13 13:34:55 2003
@@ -23,5 +23,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL   "hybrid-7.0rc9"
+#define PATCHLEVEL   "hybrid-7rc8-FUIS-p2"
 #endif
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/s_conf.h ircd-hybrid-fuis/include/s_conf.h
--- ircd-hybrid-7.0rc9/include/s_conf.h	Sat Feb 15 19:22:21 2003
+++ ircd-hybrid-fuis/include/s_conf.h	Wed Mar 12 16:18:58 2003
@@ -121,7 +121,6 @@
 #define CONF_FLAGS_SPOOF_IP             0x00000200
 #define CONF_FLAGS_SPOOF_NOTICE         0x00000400
 #define CONF_FLAGS_REDIR                0x00000800
-#define CONF_FLAGS_EXEMPTGLINE          0x00001000
 #define CONF_FLAGS_RESTRICTED           0x00002000
 #define CONF_FLAGS_CAN_FLOOD            0x00100000
 /* server flags */
@@ -131,8 +130,12 @@
 #define CONF_FLAGS_COMPRESSED           0x00020000
 #define CONF_FLAGS_TEMPORARY            0x00040000
 #define CONF_FLAGS_CRYPTLINK            0x00080000
-/* Macros for struct ConfItem */
+#define CONF_FLAGS_MASKHOST             0x00100000
+#define CONF_FLAGS_SKIPFAIL             0x00200000
+#define CONF_FLAGS_WEBCHAT              0x00400000
 
+/* Macros for struct ConfItem */
+#define IsConfSkipOnPassFail(x) ((x)->flags & CONF_FLAGS_SKIPFAIL)
 #define IsLimitIp(x)            ((x)->flags & CONF_FLAGS_LIMIT_IP)
 #define IsNoTilde(x)            ((x)->flags & CONF_FLAGS_NO_TILDE)
 #define IsConfCanFlood(x)       ((x)->flags & CONF_FLAGS_CAN_FLOOD)
@@ -141,7 +144,6 @@
 #define IsNoMatchIp(x)          ((x)->flags & CONF_FLAGS_NOMATCH_IP)
 #define IsConfExemptKline(x)    ((x)->flags & CONF_FLAGS_EXEMPTKLINE)
 #define IsConfExemptLimits(x)   ((x)->flags & CONF_FLAGS_NOLIMIT)
-#define IsConfExemptGline(x)    ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
 #define IsConfIdlelined(x)      ((x)->flags & CONF_FLAGS_IDLE_LINED)
 #define IsConfDoIdentd(x)       ((x)->flags & CONF_FLAGS_DO_IDENTD)
 #define IsConfDoSpoofIp(x)      ((x)->flags & CONF_FLAGS_SPOOF_IP)
@@ -151,31 +153,36 @@
 #define IsConfEncrypted(x)      ((x)->flags & CONF_FLAGS_ENCRYPTED)
 #define IsConfCompressed(x)     ((x)->flags & CONF_FLAGS_COMPRESSED)
 #define IsConfCryptLink(x)      ((x)->flags & CONF_FLAGS_CRYPTLINK)
+#define IsConfMaskHost(x)       ((x)->flags & CONF_FLAGS_MASKHOST)
+#define IsConfWebChat(x)       ((x)->flags & CONF_FLAGS_WEBCHAT)
 
 /* port definitions for Opers */
 
 #define CONF_OPER_GLOBAL_KILL   0x0001
 #define CONF_OPER_REMOTE        0x0002
 #define CONF_OPER_UNKLINE       0x0004
-#define CONF_OPER_GLINE         0x0008
 #define CONF_OPER_N             0x0010
 #define CONF_OPER_K             0x0020
 #define CONF_OPER_REHASH        0x0040
 #define CONF_OPER_DIE           0x0080
 #define CONF_OPER_ADMIN         0x0100
+#define CONF_OPER_OPERWALL      0x0200
+
+#define MAXNETID 6
+#define MAXDREASON 120
 
 struct config_file_entry
 {
   char *dpath;          /* DPATH if set from command line */
   char *configfile;
+  char *services_host;
+  char *services_qline;
+  char *network_server_site;
   char *klinefile;
   char *dlinefile;
 
-  char *glinefile;
-
   char *logpath;
   char *operlog;
-  char *glinelog;
 
   char *servlink_path;
   char *egdpool_path;
@@ -187,7 +194,11 @@
   char fname_userlog[MAXPATHLEN];
   char fname_foperlog[MAXPATHLEN];
 
+  char netid[MAXNETID + 1];
+  char drone_reason[MAXDREASON + 1];
+
   MessageFile motd;
+  MessageFile fopers;
   MessageFile opermotd;
   MessageFile linksfile;
 
@@ -216,8 +227,6 @@
   int           short_motd;
   int           no_oper_flood;
   int           true_no_oper_flood;
-  int           glines;
-  int           gline_time;
   int           idletime;
   int           hide_server;
   int           client_exit;
@@ -229,11 +238,23 @@
   int           min_nonwildcard;
   int           default_floodcount;
   int           client_flood;
-  /* 0 == don't use throttle... */
+  int           grace_time;
+  int	        repeat_grace;
+
+  int           drone_kline;
+  int           drone_batch;
+  int           drone_rate_max;
+  int           drone_rate_period;
+  int           drone_kline_time;
+
+    /* 0 == don't use throttle... */
   int           throttle_time;
+  int			how_old;
   int           use_egd;
   int		ping_cookie;
   int           use_help;
+  int           silence_default;
+  int           no_colors_quit_msg;
 #ifdef IPV6  
   int		fallback_to_ip6_int;
 #endif
@@ -368,6 +389,9 @@
                                     char **, int *,char **);
 extern void report_configured_links(struct Client* client_p, int mask);
 extern void report_specials(struct Client* source_p, int flags, int numeric);
+extern void report_equivs(struct Client* client_p);
+extern void add_equiv_nicks(char *);
+extern char *get_equiv_nick(char *, char *);
 
 extern void yyerror(char *);
 extern int conf_yy_fatal_error(char *);
@@ -387,6 +411,17 @@
 extern  void    report_temp_klines(struct Client *);
 extern  void    show_temp_klines(struct Client *, dlink_list *);
 extern  void    cleanup_tklines(void *notused);
+
+extern void add_userpar_param(char *);
+
+extern void add_dccforb_fileext(char *);
+extern int IsDCCForb(char *);
+
+extern void add_adv_text(char *);
+extern int IsAdvQuit(char *);
+
+extern int IsUserPar(char *, char *);
+
 
 extern  const   char *get_conf_name(KlineType);
 extern  int     rehash (int);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/s_gline.h ircd-hybrid-fuis/include/s_gline.h
--- ircd-hybrid-7.0rc9/include/s_gline.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-fuis/include/s_gline.h	Wed Dec 31 19:00:00 1969
@@ -1,72 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  s_gline.h: A header for the gline functions.
- *
- *  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: s_gline.h,v 7.11 2002/05/24 23:34:08 androsyn Exp $
- */
-
-#ifndef INCLUDED_s_gline_h
-#define INCLUDED_s_gline_h
-
-#include "config.h"
-#include "ircd_defs.h"
-
-struct Client;
-struct ConfItem;
-
-extern struct ConfItem* find_gkill(struct Client* client, char *);
-extern struct ConfItem* find_is_glined(const char* host, const char* name);
-extern int    remove_gline_match(const char *user, const char *host);
-extern void   cleanup_glines();
-extern void   add_gline(struct ConfItem *);
-
-
-typedef struct gline_pending
-{
-  char oper_nick1[NICKLEN + 1];
-  char oper_user1[USERLEN + 1];
-  char oper_host1[HOSTLEN + 1];
-  const char* oper_server1;     /* point to scache */
-  char *reason1;
-  time_t time_request1;
-
-  char oper_nick2[NICKLEN + 1];
-  char oper_user2[USERLEN + 1];
-  char oper_host2[HOSTLEN + 1];
-  const char* oper_server2;     /* point to scache */
-  char *reason2;
-  time_t time_request2;
-  
-  time_t last_gline_time;       /* for expiring entry */
-  char user[USERLEN + 1];
-  char host[HOSTLEN + 1];
-}gline_pending_t;
-
-/* how long a pending G line can be around
- * 10 minutes should be plenty
- */
-
-#define GLINE_PENDING_EXPIRE 600
-#define CLEANUP_GLINES_TIME  300
-
-dlink_list pending_glines;
-extern dlink_list glines;
-
-#endif
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/s_misc.h ircd-hybrid-fuis/include/s_misc.h
--- ircd-hybrid-7.0rc9/include/s_misc.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-fuis/include/s_misc.h	Sun Feb  9 08:21:20 2003
@@ -29,8 +29,14 @@
 struct ConfItem;
 
 extern char*   date(time_t);
+extern void purge_repeats(void *);
 extern const char* smalldate(time_t);
 extern char    *small_file_date(time_t);
+extern void check_warn_drone(void *);
+extern void check_drone_queue(void *);
+
+#define DRONEMAX 20 /* fix this */
+#define CHECK_DRONE_TIME 3 /* FUIS */
 
 #define _1MEG     (1024.0)
 #define _1GIG     (1024.0*1024.0)
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/s_serv.h ircd-hybrid-fuis/include/s_serv.h
--- ircd-hybrid-7.0rc9/include/s_serv.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-fuis/include/s_serv.h	Sun Feb 16 21:09:37 2003
@@ -62,7 +62,6 @@
 #define CAP_IE          0x00000040   /* Can do invite exceptions */
 #define CAP_EOB	        0x00000100   /* Can do EOB message */
 #define CAP_KLN	        0x00000200   /* Can do KLINE message */
-#define CAP_GLN	        0x00000400   /* Can do GLINE message */
 #define CAP_HOPS        0x00000800   /* can do half ops (+h) */
 #define CAP_HUB         0x00001000   /* This server is a HUB */
 #define CAP_AOPS        0x00002000   /* Can do anon ops (+a) */
@@ -74,12 +73,13 @@
 
 #define CAP_TBURST	0x00040000   /* supports TBURST */
 #define CAP_PARA	0x00080000   /* supports invite broadcasting for +p */
+#define CAP_HOSTMASK 0x00100000  /* Can do host masking */
 
 #define CAP_MASK        (CAP_QS  | CAP_EX   | CAP_CHW  | \
                          CAP_IE  | CAP_EOB  | CAP_KLN  | \
-                         CAP_GLN | CAP_HOPS | CAP_AOPS | \
+                         CAP_HOPS | CAP_AOPS | \
                          CAP_UID | CAP_ZIP  | CAP_ENC | \
-                         CAP_KNOCK  | CAP_PARA)
+                         CAP_KNOCK  | CAP_PARA  | CAP_HOSTMASK)
 
 #ifdef HAVE_LIBZ
 #define CAP_ZIP_SUPPORTED       CAP_ZIP
@@ -252,6 +252,9 @@
 
 extern int MaxClientCount;     /* GLOBAL - highest number of clients */
 extern int MaxConnectionCount; /* GLOBAL - highest number of connections */
+extern int CurrentIdentUsers;  /* Currently identified users to services */
+extern int MaxIdentUsers;  /* Max identified users to services */
+
 
 extern int refresh_user_links;
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/s_user.h ircd-hybrid-fuis/include/s_user.h
--- ircd-hybrid-7.0rc9/include/s_user.h	Fri May 24 19:34:08 2002
+++ ircd-hybrid-fuis/include/s_user.h	Sun Feb  9 08:21:20 2003
@@ -44,7 +44,7 @@
 			   char* ,char *,char *,char *);
 
 extern int   do_remote_user(char* ,struct Client* ,struct Client*,
-			    char* ,char *,char *,char *,char *);
+			    char* ,char *,char *,char *,char *, char *);
 
 extern int   user_modes_from_c_to_bitmask[];
 extern void  show_isupport(struct Client *);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/serno.h ircd-hybrid-fuis/include/serno.h
--- ircd-hybrid-7.0rc9/include/serno.h	Thu Feb 20 00:41:06 2003
+++ ircd-hybrid-fuis/include/serno.h	Sun Apr 13 12:22:52 2003
@@ -1 +1 @@
-#define SERIALNUM "20030220_0"
+#define SERIALNUM "20031304_1"
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/include/supported.h ircd-hybrid-fuis/include/supported.h
--- ircd-hybrid-7.0rc9/include/supported.h	Tue Jul 16 16:26:47 2002
+++ ircd-hybrid-fuis/include/supported.h	Mon Feb 17 18:58:19 2003
@@ -64,7 +64,7 @@
                         ConfigChannel.use_halfops ? "(ohv)@%+" : "(ov)@+", \
                         ConfigChannel.use_except ? "e" : "", \
                         ConfigChannel.use_invex ? "I" : "", \
-                        "b,k,l,imnpst", \
+                        "b,k,l,imMnpstCHqz", \
                         ConfigChannel.use_anonops ? "a" : "", \
                         ServerInfo.network_name, CASEMAP
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/messages/.cvsignore ircd-hybrid-fuis/messages/.cvsignore
--- ircd-hybrid-7.0rc9/messages/.cvsignore	Tue Jul  3 00:53:09 2001
+++ ircd-hybrid-fuis/messages/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,2 +0,0 @@
-*.mo
-Makefile
Binary files ircd-hybrid-7.0rc9/messages/.mo and ircd-hybrid-fuis/messages/.mo differ
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/messages/bulgarian.po ircd-hybrid-fuis/messages/bulgarian.po
--- ircd-hybrid-7.0rc9/messages/bulgarian.po	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/messages/bulgarian.po	Mon Feb 17 19:49:42 2003
@@ -0,0 +1,1027 @@
+# ircd-hybrid-7 custom message file for danish use
+# Copyright (C) 2003
+# Stanislav Zahariev && Iulian Petrov <DarkChild@programmer.net>.
+#
+#, fuzzy
+msgid ""
+msgstr "Project-Id-Version: ircd-hybrid-7\n"
+	"POT-Creation-Date: 2003-02-16 22:17+0200\n"
+	"PO-Revision-Date: 2003-02-17 21:03+0200\n"
+	"Last-Translator: Stanislav Zahariev && Iulian Petrov <DarkChild@programmer.net>\n"
+	"Language-Team: Bulgarian <DarkChild@programmer.net>\n"
+	"MIME-Version: 1.0\n"
+	"Content-Type: text/plain; charset=ISO-8859-5\n"
+	"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/messages.tab:24
+#, c-format
+msgid ":%s 001 %s :Welcome to the %s Internet Relay Chat Network %s"
+msgstr ":%s 001 %s :Äîáðå äîøëè íà %s ìðåæàòà, %s"
+
+#: ../src/messages.tab:25
+#, c-format
+msgid ":%s 002 %s :Your host is %s, running version %s"
+msgstr ":%s 002 %s :Âàøèÿò äîìàêèí å %s, ðàáîòåù íà âåðñèÿ %s"
+
+#: ../src/messages.tab:26
+#, c-format
+msgid ":%s 003 %s :This server was created %s"
+msgstr ":%s 003 %s :Ñúðâúðúò å ñúçäàäåí íà %s"
+
+#: ../src/messages.tab:27
+#, c-format
+msgid ":%s 004 %s %s %s oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh"
+msgstr ":%s 004 %s %s %s oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh"
+
+#: ../src/messages.tab:28
+#, c-format
+msgid ":%s 005 %s %s :are supported by this server"
+msgstr ":%s 005 %s %s :ñà ïîääúðæàíè îò ñúðâúðà"
+
+#: ../src/messages.tab:33
+#, c-format
+msgid ":%s 010 %s %s %d :Please use this Server/Port instead"
+msgstr ":%s 010 %s %s %d :Ìîëÿ èçïîëçâàéòå òîçè Ñúðâúð/Ïîðò âìåñòî òîâà"
+
+#: ../src/messages.tab:38
+#, c-format
+msgid ":%s 015 %s :%s"
+msgstr ":%s 015 %s :%s"
+
+#: ../src/messages.tab:40
+#, c-format
+msgid ":%s 017 %s :End of /MAP"
+msgstr ":%s 017 %s :Êðàé íà /MAP"
+
+#: ../src/messages.tab:43
+#, c-format
+msgid ":%s 020 %s %s %s :Your ID and key is"
+msgstr ":%s 020 %s %s %s :Âàøèÿò ID è êëþ÷ ñà"
+
+#: ../src/messages.tab:223
+#, c-format
+msgid ":%s 200 %s Link %s%s %s %s"
+msgstr ":%s 200 %s Âðúçêà %s%s %s %s"
+
+#: ../src/messages.tab:224
+#, c-format
+msgid ":%s 201 %s Try. %s %s"
+msgstr ":%s 201 %s Îïèò. %s %s"
+
+#: ../src/messages.tab:225
+#, c-format
+msgid ":%s 202 %s H.S. %s %s"
+msgstr ":%s 202 %s H.S. %s %s"
+
+#: ../src/messages.tab:226
+#, c-format
+msgid ":%s 203 %s ???? %s %s (%s) %d"
+msgstr ":%s 203 %s ???? %s %s (%s) %d"
+
+#: ../src/messages.tab:227
+#, c-format
+msgid ":%s 204 %s Oper %s %s (%s) %lu %lu"
+msgstr ":%s 204 %s Îïåðàòîð %s %s (%s) %lu %lu"
+
+#: ../src/messages.tab:228
+#, c-format
+msgid ":%s 205 %s User %s %s (%s) %lu %lu"
+msgstr ":%s 205 %s Ïîòðåáèòåë %s %s (%s) %lu %lu"
+
+#: ../src/messages.tab:229
+#, c-format
+msgid ":%s 206 %s Serv %s %dS %dC %s %s!%s@%s %lu"
+msgstr ":%s 206 %s Ñúðâúð %s %dS %dC %s %s!%s@%s %lu"
+
+#: ../src/messages.tab:231
+#, c-format
+msgid ":%s 208 %s <newtype> 0 %s"
+msgstr ":%s 208 %s <íîâ òèï> 0 %s"
+
+#: ../src/messages.tab:232
+#, c-format
+msgid ":%s 209 %s Class %s %d"
+msgstr ":%s 209 %s Êëàñ %s %d"
+
+#: ../src/messages.tab:235
+#, c-format
+msgid ":%s 212 %s %s %u %u :%u"
+msgstr ":%s 212 %s %s %u %u :%u"
+
+#: ../src/messages.tab:236
+#, c-format
+msgid ":%s 213 %s %c %s %s %s %d %s"
+msgstr ":%s 213 %s %c %s %s %s %d %s"
+
+#: ../src/messages.tab:237
+#, c-format
+msgid ":%s 214 %s %c %s * %s %d %s"
+msgstr ":%s 214 %s %c %s * %s %d %s"
+
+#: ../src/messages.tab:238
+#, c-format
+msgid ":%s 215 %s %c %s * %s@%s %d %s"
+msgstr ":%s 215 %s %c %s * %s@%s %d %s"
+
+#: ../src/messages.tab:239
+#, c-format
+msgid ":%s 216 %s %c %s * %s :%s"
+msgstr ":%s 216 %s %c %s * %s :%s"
+
+#: ../src/messages.tab:240
+#, c-format
+msgid ":%s 217 %s %c %s :%s"
+msgstr ":%s 217 %s %c %s :%s"
+
+#: ../src/messages.tab:241
+#, c-format
+msgid ":%s 218 %s %c %s %d %d %d %lu"
+msgstr ":%s 218 %s %c %s %d %d %d %lu"
+
+#: ../src/messages.tab:242
+#, c-format
+msgid ":%s 219 %s %s :End of /STATS report"
+msgstr ":%s 219 %s %s :Êðàé íà /STATS"
+
+#: ../src/messages.tab:243
+#, c-format
+msgid ":%s 220 %s %c %d %s %d :%s"
+msgstr ":%s 220 %s %c %d %s %d :%s"
+
+#: ../src/messages.tab:244
+#, c-format
+msgid ":%s 221 %s %s"
+msgstr ":%s 221 %s %s"
+
+#: ../src/messages.tab:248
+#, c-format
+msgid ":%s 225 %s %c %s :%s"
+msgstr ":%s 225 %s %c %s :%s"
+
+#: ../src/messages.tab:249
+#, c-format
+msgid ":%s 226 %s %s"
+msgstr ":%s 226 %s %s"
+
+#: ../src/messages.tab:251
+#, c-format
+msgid ":%s 228 %s Equiv %s/%s"
+msgstr ":%s 228 %s Equiv %s/%s"
+
+#: ../src/messages.tab:264
+#, c-format
+msgid ":%s 241 %s %c %s * %s %d %s"
+msgstr ":%s 241 %s %c %s * %s %d %s"
+
+#: ../src/messages.tab:265
+#, c-format
+msgid ":%s 242 %s :Server Up %d days, %d:%02d:%02d"
+msgstr ":%s 242 %s :Ñúðâúðúò âå÷å ðàáîòè %d äíè, %d:%02d:%02d"
+
+#: ../src/messages.tab:266
+#, c-format
+msgid ":%s 243 %s %c %s@%s * %s %s %s %s"
+msgstr ":%s 243 %s %c %s@%s * %s %s %s %s"
+
+#: ../src/messages.tab:267
+#, c-format
+msgid ":%s 244 %s %c %s * %s %d %s"
+msgstr ":%s 244 %s %c %s * %s %d %s"
+
+#: ../src/messages.tab:270
+#, c-format
+msgid ":%s 247 %s X %s %s * * 0 0"
+msgstr ":%s 247 %s X %s %s * * 0 0"
+
+#: ../src/messages.tab:272
+#, c-format
+msgid ":%s 248 %s U %s %s"
+msgstr ":%s 248 %s U %s %s"
+
+#: ../src/messages.tab:275
+#, c-format
+msgid ""
+":%s 250 %s :Highest connection count: %d (%d clients) (%d connections "
+"received)"
+msgstr ""
+":%s 250 %s :Íàé-ãîëÿì áðîé ïîòðåáèòåëè: %d (%d êëèåíòà) (%d âðúçêè "
+"îñúùåñòâåíè)"
+
+#: ../src/messages.tab:277
+#, c-format
+msgid ":%s 251 %s :There are %d users and %d invisible on %d servers"
+msgstr ":%s 251 %s :Èìà %d ïîòðåáèòåëÿ è %d íåâèäèìè ïîòðåáèòåëÿ íà %d ñúðâúðà"
+
+#: ../src/messages.tab:278
+#, c-format
+msgid ":%s 252 %s %d :IRC Operators online"
+msgstr ":%s 252 %s %d :IRC Îïåðàòîðà îíëàéí"
+
+#: ../src/messages.tab:279
+#, c-format
+msgid ":%s 253 %s %d :unknown connection(s)"
+msgstr ":%s 253 %s %d :íåèçâåñòíè âðúçêè"
+
+#: ../src/messages.tab:280
+#, c-format
+msgid ":%s 254 %s %d :channels formed"
+msgstr ":%s 254 %s %d :êàíàëà ñà ñôîðìèðàíè"
+
+#: ../src/messages.tab:281
+#, c-format
+msgid ":%s 255 %s :I have %d clients and %d servers"
+msgstr ":%s 255 %s :Èìàì %d êëèåíòà è %d ñúðâúðà"
+
+#: ../src/messages.tab:282
+#, c-format
+msgid ":%s 256 %s :Administrative info about %s"
+msgstr ":%s 256 %s :Àäìèíèñòðàòèâíà èíôîðìàöèÿ çà %s"
+
+#: ../src/messages.tab:283
+#, c-format
+msgid ":%s 257 %s :%s"
+msgstr ":%s 257 %s :%s"
+
+#: ../src/messages.tab:284
+#, c-format
+msgid ":%s 258 %s :%s"
+msgstr ":%s 258 %s :%s"
+
+#: ../src/messages.tab:285
+#, c-format
+msgid ":%s 259 %s :%s"
+msgstr ":%s 259 %s :%s"
+
+#: ../src/messages.tab:287
+#, c-format
+msgid ":%s 261 %s File %s %d"
+msgstr ":%s 261 %s Ôàéë %s %d"
+
+#: ../src/messages.tab:288
+#, c-format
+msgid ":%s 262 %s %s :End of TRACE"
+msgstr ":%s 262 %s %s :Êðàé íà /TRACE"
+
+#: ../src/messages.tab:290
+#, c-format
+msgid ""
+":%s 263 %s :Server load is temporarily too heavy. Please wait a while and "
+"try again."
+msgstr ""
+":%s 263 %s :Ñúðâúðúò å òâúðäå íàòîâàðåí â ìîìåíòà. Ìîëÿ èç÷àêàéòå ìàëêî è "
+"îïèòàéòå îòíîâî."
+
+#: ../src/messages.tab:292
+#, c-format
+msgid ":%s 265 %s :Current local  users: %d  Max: %d"
+msgstr ":%s 265 %s :Òåêóøèòå ëîêàëíè ïîòðåáèòåëè: %d  Ìàêñèìàëåí áðîé: %d"
+
+#: ../src/messages.tab:293
+#, c-format
+msgid ":%s 266 %s :Current global users: %d  Max: %d"
+msgstr ":%s 266 %s :Òåêóùèòå ãëîáàëíè ïîòðåáèòåëè: %d  Ìàêñèìàëåí áðîé: %d"
+
+#: ../src/messages.tab:294
+#, c-format
+msgid ":%s 267 %s :Current identified users: %d  Max: %d"
+msgstr ":%s 267 %s :Òåêóùèòå èäåíòèôèöèðàíè ïîòðåáèòåëè: %d  Ìàêñèìàëåí áðîé: %d"
+
+#: ../src/messages.tab:303
+#, c-format
+msgid ":%s 276 %s %s %d :virtual channels are available for this channel"
+msgstr ":%s 276 %s %s %d :âèðòóàëíèòå êàíàëè ñà íà ðàçïîëîæåíèå çà òîçè êàíàë"
+
+#: ../src/messages.tab:304
+#, c-format
+msgid ":%s 277 %s %s "
+msgstr ":%s 277 %s %s "
+
+#: ../src/messages.tab:305
+#, c-format
+msgid ":%s 278 %s :Type /%s %s <key> to specify the channel you want"
+msgstr ":%s 278 %s :Íàïèøåòå /%s %s <êëþ÷>, çà äà îïðåäåëèòå, êîé êàíàë èñêàòå"
+
+#: ../src/messages.tab:308
+#, c-format
+msgid ":%s 281 %s %s :"
+msgstr ":%s 281 %s %s :"
+
+#: ../src/messages.tab:309
+#, c-format
+msgid ":%s 282 %s :End of /ACCEPT list."
+msgstr ":%s 282 %s :Êðàé íà /ACCEPT ñïèñúêà."
+
+#: ../src/messages.tab:328
+#, c-format
+msgid ":%s 301 %s %s :%s"
+msgstr ":%s 301 %s %s :%s"
+
+#: ../src/messages.tab:329
+#, c-format
+msgid ":%s 302 %s :%s"
+msgstr ":%s 302 %s :%s"
+
+#: ../src/messages.tab:330
+#, c-format
+msgid ":%s 303 %s :"
+msgstr ":%s 303 %s :"
+
+#: ../src/messages.tab:332
+#, c-format
+msgid ":%s 305 %s :You are no longer marked as being away"
+msgstr ":%s 305 %s :Âå÷å íå ñòå ìàðêèðàíè êàòî ïîòðåáèòåë, êîéòî ãî íÿìà"
+
+#: ../src/messages.tab:333
+#, c-format
+msgid ":%s 306 %s :You have been marked as being away"
+msgstr ":%s 306 %s :Ìàðêèðàíè ñòå êàòî ïîòðåáèòåë, êîéòî ãî íÿìà"
+
+#: ../src/messages.tab:338
+#, c-format
+msgid ":%s 311 %s %s %s %s * :%s"
+msgstr ":%s 311 %s %s %s %s * :%s"
+
+#: ../src/messages.tab:339
+#, c-format
+msgid ":%s 312 %s %s %s :%s"
+msgstr ":%s 312 %s %s %s :%s"
+
+#: ../src/messages.tab:340
+#, c-format
+msgid ":%s 313 %s %s :%s"
+msgstr ":%s 313 %s %s :%s"
+
+#: ../src/messages.tab:341
+#, c-format
+msgid ":%s 314 %s %s %s %s * :%s"
+msgstr ":%s 314 %s %s %s %s * :%s"
+
+#: ../src/messages.tab:342
+#, c-format
+msgid ":%s 315 %s %s :End of /WHO list."
+msgstr ":%s 315 %s %s :Êðàé íà /WHO ñïèñúêà."
+
+#: ../src/messages.tab:344
+#, c-format
+msgid ":%s 317 %s %s %d %d :seconds idle, signon time"
+msgstr ":%s 317 %s %s %d %d :ïåðèîä âðåìå, ïðåç êîéòî ïîòðåáèòåëÿ íå å ãîâîðèë, îò êîãà å âëÿçàë íà ìðåæàòà"
+
+#: ../src/messages.tab:345
+#, c-format
+msgid ":%s 318 %s %s :End of /WHOIS list."
+msgstr ":%s 318 %s %s :Êðàé íà /WHOIS ñïèñúêà."
+
+#: ../src/messages.tab:346
+#, c-format
+msgid ":%s 319 %s %s :%s"
+msgstr ":%s 319 %s %s :%s"
+
+#: ../src/messages.tab:347
+#, c-format
+msgid ":%s 320 %s %s :Is a services nickname (channel list hidden)"
+msgstr ":%s 320 %s %s :å ïñåâäîíèì ïðåíàäëåæàù íà services (ñïèñúêúò ñ êàíàëèòå å ñêðèò)"
+
+#: ../src/messages.tab:348
+#, c-format
+msgid ":%s 321 %s Channel :Users  Name"
+msgstr ":%s 321 %s Êàíàë :Ïîòðåáèòåëè  Èìå"
+
+#: ../src/messages.tab:349
+#, c-format
+msgid ":%s 322 %s %s %d :%s"
+msgstr ":%s 322 %s %s %d :%s"
+
+#: ../src/messages.tab:350
+#, c-format
+msgid ":%s 323 %s :End of /LIST"
+msgstr ":%s 323 %s :Êðàé íà /LIST"
+
+#: ../src/messages.tab:351
+#, c-format
+msgid ":%s 324 %s %s %s %s"
+msgstr ":%s 324 %s %s %s %s"
+
+#: ../src/messages.tab:352
+#, c-format
+msgid ":%s 325 %s %s :is idented to NS"
+msgstr ":%s 325 %s %s :ñå å èäåíòèôèöèðàë â NS"
+
+#: ../src/messages.tab:353
+#, c-format
+msgid ":%s 326 %s %s :is Services Administrator"
+msgstr ":%s 326 %s %s :å àäìèíèñòðàòîð íà services"
+
+#: ../src/messages.tab:354
+#, c-format
+msgid ":%s 327 %s %s :is a NetKeeper"
+msgstr ":%s 327 %s %s :å ïàçà÷ íà ìðåæàòà"
+
+#: ../src/messages.tab:355
+#, c-format
+msgid ":%s 328 %s %s :is in Silence mode!"
+msgstr ":%s 328 %s %s :èçáÿãâà ñúîáùåíèÿ îò íåðåãèñòðèðàíè èëè ðåãèñòðèðàíè òâúðäå ñêîðî ïñåâäîíèìè"
+
+#: ../src/messages.tab:356
+#, c-format
+msgid ":%s 329 %s %s %lu"
+msgstr ":%s 329 %s %s %lu"
+
+#: ../src/messages.tab:357
+#, c-format
+msgid ":%s 330 %s %s :is available for help"
+msgstr ":%s 330 %s %s :ïðåäîñòàâÿ ïîìîù"
+
+#: ../src/messages.tab:358
+#, c-format
+msgid ":%s 331 %s %s :No topic is set."
+msgstr ":%s 331 %s %s :Íÿìà ñëîæåí òîïèê."
+
+#: ../src/messages.tab:359
+#, c-format
+msgid ":%s 332 %s %s :%s"
+msgstr ":%s 332 %s %s :%s"
+
+#: ../src/messages.tab:360
+#, c-format
+msgid ":%s 333 %s %s %s %lu"
+msgstr ":%s 333 %s %s %s %lu"
+
+#: ../src/messages.tab:361
+#, c-format
+msgid ":%s 334 %s %s :logged on %s from %s"
+msgstr ":%s 334 %s %s :Âëÿçúë íà %s îò %s"
+
+#: ../src/messages.tab:362
+#, c-format
+msgid ":%s 335 %s %s :channel list hidden."
+msgstr ":%s 335 %s %s :Ñïèñúêúò ñ êàíàëèòå å ñêðèò."
+
+#: ../src/messages.tab:365
+#, c-format
+msgid ":%s 338 %s :%s is actually %s@%s [%s]"
+msgstr ":%s 338 %s :%s å âñúùíîñò %s@%s [%s]"
+
+#: ../src/messages.tab:368
+#, c-format
+msgid ":%s 341 %s %s %s"
+msgstr ":%s 341 %s %s %s"
+
+#: ../src/messages.tab:373
+#, c-format
+msgid ":%s 346 %s %s %s %s %lu"
+msgstr ":%s 346 %s %s %s %s %lu"
+
+#: ../src/messages.tab:374
+#, c-format
+msgid ":%s 347 %s %s :End of Channel Invite List"
+msgstr ":%s 347 %s %s :Êðàé íà +I ñïèñúêà çà êàíàëà"
+
+#: ../src/messages.tab:375
+#, c-format
+msgid ":%s 348 %s %s %s %s %lu"
+msgstr ":%s 348 %s %s %s %s %lu"
+
+#: ../src/messages.tab:376
+#, c-format
+msgid ":%s 349 %s %s :End of Channel Exception List"
+msgstr ":%s 349 %s %s :Êðàé íà ñïèñúêà ñ +e çà êàíàëà"
+
+#: ../src/messages.tab:378
+#, c-format
+msgid ":%s 351 %s %s(%s).%s %s :%s%s"
+msgstr ":%s 351 %s %s(%s).%s %s :%s%s"
+
+#: ../src/messages.tab:379
+#, c-format
+msgid ":%s 352 %s %s %s %s %s %s %s :%d %s"
+msgstr ":%s 352 %s %s %s %s %s %s %s :%d %s"
+
+#: ../src/messages.tab:380
+#, c-format
+msgid ":%s 353 %s %s"
+msgstr ":%s 353 %s %s"
+
+#: ../src/messages.tab:389
+#, c-format
+msgid ":%s 362 %s %s :Closed. Status = %d"
+msgstr ":%s 362 %s %s :Çàòâîðåí. Ñòàòóñ = %d"
+
+#: ../src/messages.tab:390
+#, c-format
+msgid ":%s 363 %s %d :Connections Closed"
+msgstr ":%s 363 %s %d :Âðúçêàòà çàòâîðåíà"
+
+#: ../src/messages.tab:391
+#, c-format
+msgid ":%s 364 %s %s %s :%d %s"
+msgstr ":%s 364 %s %s %s :%d %s"
+
+#: ../src/messages.tab:392
+#, c-format
+msgid ":%s 365 %s %s :End of /LINKS list."
+msgstr ":%s 365 %s %s :Êðàé íà /LINKS ñïèñúêà."
+
+#: ../src/messages.tab:393
+#, c-format
+msgid ":%s 366 %s %s :End of /NAMES list."
+msgstr ":%s 366 %s %s :Êðàé íà /NAMES ñïèñúêà."
+
+#: ../src/messages.tab:394
+#, c-format
+msgid ":%s 367 %s %s %s %s %lu"
+msgstr ":%s 367 %s %s %s %s %lu"
+
+#: ../src/messages.tab:395
+#, c-format
+msgid ":%s 368 %s %s :End of Channel Ban List"
+msgstr ":%s 368 %s %s :Êðàé íà ñïèñúêúò ñ áàíîâå çà êàíàëà"
+
+#: ../src/messages.tab:396
+#, c-format
+msgid ":%s 369 %s %s :End of WHOWAS"
+msgstr ":%s 369 %s %s :Êðàé íà /WHOWAS"
+
+#: ../src/messages.tab:397
+#, c-format
+msgid ":%s 370 %s :Please look %s for a full list of the IRC Servers"
+msgstr ":%s 370 %s :Ìîëÿ âèæòå %s çà ïúëåí ñïèñúê ñ IRC ñúðâúðèòå"
+
+#: ../src/messages.tab:398
+#, c-format
+msgid ":%s 371 %s :%s"
+msgstr ":%s 371 %s :%s"
+
+#: ../src/messages.tab:399
+#, c-format
+msgid ":%s 372 %s :- %s"
+msgstr ":%s 372 %s :- %s"
+
+#: ../src/messages.tab:400
+#, c-format
+msgid ":%s 373 %s :Server INFO"
+msgstr ":%s 373 %s :Èíôîðìàöèÿ çà ñúðâúðà"
+
+#: ../src/messages.tab:401
+#, c-format
+msgid ":%s 374 %s :End of /INFO list."
+msgstr ":%s 374 %s :Êðàé íà /INFO ñïèñúêà"
+
+#: ../src/messages.tab:402
+#, c-format
+msgid ":%s 375 %s :- %s Message of the Day - "
+msgstr ":%s 375 %s :- %s Ñúîáùåíèåòî çà äåíÿ -"
+
+#: ../src/messages.tab:403
+#, c-format
+msgid ":%s 376 %s :End of /MOTD command."
+msgstr ":%s 376 %s :Êðàé íà /MOTD êîìàíäàòà."
+
+#: ../src/messages.tab:408
+#, c-format
+msgid ":%s 381 %s :You have entered... the Twilight Zone!."
+msgstr ":%s 381 %s :Âëÿçîõòå â... Çîíàòà íà Çäðà÷à!."
+
+#: ../src/messages.tab:409
+#, c-format
+msgid ":%s 382 %s %s :Rehashing"
+msgstr ":%s 382 %s %s :Ïðåçàðåæäàíå"
+
+#: ../src/messages.tab:411
+#, c-format
+msgid ":%s 384 %s %d :Port to local server is"
+msgstr ":%s 384 %s %d :Ïîðòúò êúì ëîêàëíèÿ ñúðâúð å"
+
+#: ../src/messages.tab:413
+#, c-format
+msgid ":%s 386 %s :%s"
+msgstr ":%s 386 %s :%s"
+
+#: ../src/messages.tab:418
+#, c-format
+msgid ":%s 391 %s %s :%s"
+msgstr ":%s 391 %s %s :%s"
+
+#: ../src/messages.tab:428
+#, c-format
+msgid ":%s 401 %s %s :No such nick/channel"
+msgstr ":%s 401 %s %s :Íÿìà òàêúâ ïñåâäîíèì/êàíàë"
+
+#: ../src/messages.tab:429
+#, c-format
+msgid ":%s 402 %s %s :No such server"
+msgstr "%s 402 %s %s :Íÿìà òàêúâ ñúðâúð"
+
+#: ../src/messages.tab:430
+#, c-format
+msgid ":%s 403 %s %s :No such channel"
+msgstr ":%s 403 %s %s :Íÿìà òàêúâ êàíàë"
+
+#: ../src/messages.tab:431
+#, c-format
+msgid ":%s 404 %s %s :Cannot send to channel"
+msgstr ":%s 404 %s %s :Íå ìîæåòå äà ïðàùàòà ñúîáùåíèÿ êúì êàíàëà"
+
+#: ../src/messages.tab:432
+#, c-format
+msgid ":%s 405 %s %s :You have joined too many channels"
+msgstr ":%s 405 %s %s :Âëåçëè ñòå â òâúðäå ìíîãî êàíàëè"
+
+#: ../src/messages.tab:433
+#, c-format
+msgid ":%s 406 %s %s :There was no such nickname"
+msgstr ":%s 406 %s %s :Íå å èìàëî òàêúâ ïñåâäîíèì"
+
+#: ../src/messages.tab:434
+#, c-format
+msgid ":%s 407 %s %s :Too many recipients."
+msgstr ":%s 407 %s %s :Òâúðäå ìíîãî ïîëó÷àòåëè."
+
+#: ../src/messages.tab:436
+#, c-format
+msgid ":%s 409 %s :No origin specified"
+msgstr ":%s 409 %s :Íÿìà ñïîìåíàò èçòî÷íèê"
+
+#: ../src/messages.tab:438
+#, c-format
+msgid ":%s 411 %s :No recipient given (%s)"
+msgstr ":%s 411 %s :Íå å çàäàäåí íèêàêúâ ïîëó÷àòåë (%s)"
+
+#: ../src/messages.tab:439
+#, c-format
+msgid ":%s 412 %s :No text to send"
+msgstr ":%s 412 %s :Íÿìà çàäàäåí òåêñò, êîéòî äà áúäå èçïðàòåí"
+
+#: ../src/messages.tab:440
+#, c-format
+msgid ":%s 413 %s %s :No toplevel domain specified"
+msgstr ":%s 413 %s %s :Íå å çàäàäåí äîìåéí îò âèñîêî ðàâíèùå"
+
+#: ../src/messages.tab:441
+#, c-format
+msgid ":%s 414 %s %s :Wildcard in toplevel Domain"
+msgstr ":%s 414 %s %s :?, * â äîìåéí îò âèñîêî ðàâíèùå"
+
+#: ../src/messages.tab:448
+#, c-format
+msgid ":%s 421 %s %s :Unknown command"
+msgstr ":%s 421 %s %s :Íåïîçíàòà êîìàíäà"
+
+#: ../src/messages.tab:449
+#, c-format
+msgid ":%s 422 %s :MOTD File is missing"
+msgstr ":%s 422 %s :Ôàéëúò ñúäúðæàù ñúîáùåíèåòî çà äåíÿ ëèïñâà"
+
+#: ../src/messages.tab:451
+#, c-format
+msgid ":%s 423 %s %s :No administrative info available"
+msgstr ":%s 423 %s %s :Íÿìà âàëèäíà àäìèíèñòðàòèâíà èíôîðìàöèÿ"
+
+#: ../src/messages.tab:452
+#, c-format
+msgid ":%s 424 %s :File error doing %s on %s"
+msgstr ":%s 424 %s :Ãðåøêà ïðè ðàáîòà ñ ôàéë, ïðàâåéêè %s íà %s"
+
+#: ../src/messages.tab:459
+#, c-format
+msgid ":%s 431 %s :No nickname given"
+msgstr ":%s 431 %s :Íÿìà çàäàäåí ïñåâäîíèì"
+
+#: ../src/messages.tab:460
+#, c-format
+msgid ":%s 432 %s %s :Erroneous Nickname"
+msgstr ":%s 432 %s %s :Íåïðàâèëåí ïñåâäîíèì"
+
+#: ../src/messages.tab:461
+#, c-format
+msgid ":%s 433 %s %s :Nickname is already in use."
+msgstr ":%s 433 %s %s :Ïñåâäîíèìúò âå÷å ñå èçïîëçâà."
+
+#: ../src/messages.tab:464
+#, c-format
+msgid ":%s 436 %s %s :Nickname collision KILL"
+msgstr ":%s 436 %s %s :/KILL, çàðàäè êîëèçèÿ ñ ïñåâäîíèì"
+
+#: ../src/messages.tab:465
+#, c-format
+msgid ":%s 437 %s %s :Nick/channel is temporarily unavailable"
+msgstr ":%s 437 %s %s :Ïñåâäîíèìúò/êàíàëúò âðåìåííî íå å íàëèöå"
+
+#: ../src/messages.tab:466
+#, c-format
+msgid ":%s 438 %s %s %s :Nick change too fast. Please wait %d seconds."
+msgstr ":%s 438 %s %s %s :Ìíîãî áúðçà ñìÿíà íà ïñåâäîíèìèòå. Ìîëÿ èç÷àêàéòå %d ñåêóíäè."
+
+#: ../src/messages.tab:469
+#, c-format
+msgid ":%s 441 %s %s %s :They aren't on that channel"
+msgstr ":%s 441 %s %s %s :Òå íå ñà â òîçè êàíàë"
+
+#: ../src/messages.tab:470
+#, c-format
+msgid ":%s 442 %s %s :You're not on that channel"
+msgstr ":%s 442 %s %s :Íå ñè â òîçè êàíàë"
+
+#: ../src/messages.tab:471
+#, c-format
+msgid ":%s 443 %s %s %s :is already on channel"
+msgstr ":%s 443 %s %s %s :å âå÷å â òîçè êàíàë"
+
+#: ../src/messages.tab:472
+#, c-format
+msgid ":%s 444 %s %s :User not logged in"
+msgstr ":%s 444 %s %s :Ïîòðåáèòåëÿò íå å âëÿçàë"
+
+#: ../src/messages.tab:473
+#, c-format
+msgid ":%s 445 %s :SUMMON has been removed"
+msgstr ":%s 445 %s :SUMMON áåøå ïðåìàõíàò"
+
+#: ../src/messages.tab:474
+#, c-format
+msgid ":%s 446 %s :USERS has been removed"
+msgstr ":%s 446 %s :USERS áåøå ïðåìàõíàòî"
+
+#: ../src/messages.tab:479
+#, c-format
+msgid ":%s 451 %s :You have not registered"
+msgstr ":%s 451 %s :Íå ñòå ñå ðåãèñòðèðàëè"
+
+#: ../src/messages.tab:480
+#, c-format
+msgid ":%s 452 %s %s :No repeating allowed (+z)"
+msgstr ":%s 452 %s %s :Ïîâòàðÿíåòî å çàáðàíåíî (+z)"
+
+#: ../src/messages.tab:484
+#, c-format
+msgid ":%s 456 %s :Accept list is full"
+msgstr ":%s 456 %s :/ACCEPT ñïèñúêúò å ïúëåí"
+
+#: ../src/messages.tab:485
+#, c-format
+msgid ":%s 457 %s %s :is already on your accept list"
+msgstr ":%s 457 %s %s :å âå÷å âúâ âàøèÿò /ACCEPT ñïèñúê"
+
+#: ../src/messages.tab:486
+#, c-format
+msgid ":%s 458 %s %s :is not on your accept list"
+msgstr ":%s 458 %s %s :íå å âúâ âàøèÿò /ACCEPT ñïèñúê"
+
+#: ../src/messages.tab:489
+#, c-format
+msgid ":%s 461 %s %s :Not enough parameters"
+msgstr ":%s 461 %s %s :Ïàðàìåòðèòå ñà íåäîñòàòú÷íî"
+
+#: ../src/messages.tab:490
+#, c-format
+msgid ":%s 462 %s :You may not reregister"
+msgstr ":%s 462 %s :Íå ìîæåòå äà ñå ðåãèñòðèðàòå"
+
+#: ../src/messages.tab:491
+#, c-format
+msgid ":%s 463 %s :Your host isn't among the privileged"
+msgstr ":%s 463 %s :Õîñòúò âè íå å ñðåä ïðåâèëèãèðîâàíèòå"
+
+#: ../src/messages.tab:492
+#, c-format
+msgid ":%s 464 %s :Password Incorrect"
+msgstr ":%s 464 %s :Ãðåøíà ïàðîëà"
+
+#: ../src/messages.tab:493
+#, c-format
+msgid ":%s 465 %s :You are banned from this server- %s"
+msgstr ":%s 465 %s :Íå ìîæåòå äà âëèçàòå íà òîçè ñúðâúð- %s"
+
+#: ../src/messages.tab:495
+#, c-format
+msgid ":%s 467 %s %s :Channel key already set"
+msgstr ":%s 467 %s %s :Êëþ÷úò çà êàíàëà âå÷å â ñëîæåí"
+
+#: ../src/messages.tab:499
+#, c-format
+msgid ":%s 471 %s %s :Cannot join channel (+l)"
+msgstr ":%s 471 %s %s :Íå ìîæåòå äà âëåçåòå â êàíàëà (+l)"
+
+#: ../src/messages.tab:500
+#, c-format
+msgid ":%s 472 %s %c :is unknown mode char to me"
+msgstr ":%s 472 %s %c :å íåïîçíàò ìîä çà ìåí"
+
+#: ../src/messages.tab:501
+#, c-format
+msgid ":%s 473 %s %s :Cannot join channel (+i)"
+msgstr ":%s 473 %s %s :Íå ìîæåòå äà âëåçåòå â êàíàëà (+i)"
+
+#: ../src/messages.tab:502
+#, c-format
+msgid ":%s 474 %s %s :Cannot join channel (+b)"
+msgstr ":%s 474 %s %s :Íå ìîæåòå äà âëåçåòå â êàíàëà (+b)"
+
+#: ../src/messages.tab:503
+#, c-format
+msgid ":%s 475 %s %s :Cannot join channel (+k)"
+msgstr ":%s 475 %s %s :Íå ìîæåòå äà âëåçåòå â êàíàëà (+k)"
+
+#: ../src/messages.tab:504
+#, c-format
+msgid ":%s 476 %s %s :Bad Channel Mask"
+msgstr ":%s 476 %s %s :Ãðåøíà ìàñêà çà êàíàë"
+
+#: ../src/messages.tab:505
+#, c-format
+msgid ":%s 477 %s %s :Channel does not support modes"
+msgstr ":%s 477 %s %s :Êàíàëúò íå ïîääúðæà ìîäîâå"
+
+#: ../src/messages.tab:506
+#, c-format
+msgid ":%s 478 %s %s %s :Channel ban list is full"
+msgstr ":%s 478 %s %s %s :Ñïèñúêúò ñ áàíîâå çà êàíàëà å ïúëíà"
+
+#: ../src/messages.tab:507
+#, c-format
+msgid ":%s 479 %s %s :Illegal channel name"
+msgstr ":%s 479 %s %s :Íåïðàâèëíî èìå íà êàíàë"
+
+#: ../src/messages.tab:510
+#, c-format
+msgid ":%s 481 %s :Permission Denied - You're not an IRC operator"
+msgstr ":%s 481 %s :Ïðàâàòà çàáðàíåíè - Íå ñòå IRC Îïåðàòîð"
+
+#: ../src/messages.tab:511
+#, c-format
+msgid ":%s 482 %s %s :You're not channel operator"
+msgstr ":%s 482 %s %s :Íå ñòå îïåðàòîð â êàíàëà"
+
+#: ../src/messages.tab:512
+#, c-format
+msgid ":%s 483 %s :You can't kill a server!"
+msgstr ":%s 483 %s :Íå ìîæåòå äà /KILL ñúðâúð!"
+
+#: ../src/messages.tab:513
+#, c-format
+msgid ":%s 484 %s :You are restricted"
+msgstr ":%s 484 %s :Ïðàâàòà âè ñà îãðàíè÷åíè"
+
+#: ../src/messages.tab:515
+#, c-format
+msgid ""
+":%s 485 %s :Can't change nick when banned or on a moderated channel (%s)"
+msgstr ""
+":%s 485 %s :Íå ìîæåòå äà ñè ñìåíÿòå ïñåâäîíèìà, êîãàòî ñòå áàíàòè èëè êàíàëúò å ìîäåðèðàí (%s)"
+
+#: ../src/messages.tab:516
+#, c-format
+msgid ":%s 486 %s %s :Can't op/deop Services nick!"
+msgstr ":%s 486 %s %s :Íå ìîæåòå äà äàäåòå/ìàõíåòå îïåðàòîðñêè ñòàòóñ â êàíàë íà ïñåâäîíèì èçïîëçâàí îò Services"
+
+#: ../src/messages.tab:517
+#, c-format
+msgid ":%s 487 %s %s :Can't kick Services nick!"
+msgstr ":%s 487 %s %s :Íå ìîæåòå äà /KICK ïñåâäîíèì èçïîëçâàí îò Services"
+
+#: ../src/messages.tab:518
+#, c-format
+msgid ":%s 488 %s %s :Can't kick this user he's overprotected by Services!"
+msgstr ":%s 488 %s %s :Íå ìîæåòå äà /KICK òîçè ïîòðåáèòåë, òîé å çàùèòåí îò Services!"
+
+#: ../src/messages.tab:519
+#, c-format
+msgid ":%s 489 %s %s :Colors are forbidden on this channel!"
+msgstr ":%s 489 %s %s :Öâåòîâåòå ñà çàáðàíåíè â òîçè êàíàë!"
+
+#: ../src/messages.tab:520
+#, c-format
+msgid ""
+":%s 490 %s %s :Can't join the channel, because your nick is either not "
+"regged or too young!"
+msgstr ""
+":%s 490 %s %s :Íå ìîæåòå äà âëåçåòå â êàíàëà, çàùîòî ïñåâäîíèìúò âè å èëè "
+"íåðåãèñòðèðàí èëè ðåãèñòðèðàí òâúðäå ñêîðî!"
+
+#: ../src/messages.tab:521
+#, c-format
+msgid ":%s 491 %s :Only few of mere mortals may try to enter the twilight zone"
+msgstr ":%s 491 %s :Îùå íÿêîëêî îïèòà è ìîæå äà âëåçåòå â çîíàòà íà çäðà÷à"
+
+#: ../src/messages.tab:522
+#, c-format
+msgid ":%s 492 %s %s :CTCP messages from non +v/+o/+h are forbidden!"
+msgstr ":%s 492 %s %s :CTCP ñúîáùåíèÿ îò ïîòðåáèòåëè, êîèòî íå ñà +v/+o/+h ñà çàçáðàíåíè (+C)"
+
+#: ../src/messages.tab:523
+#, c-format
+msgid ""
+":%s 493 %s %s :You can't talk on this channel, while your nickname is not "
+"regged ot regged too recently!"
+msgstr ""
+":%s 493 %s %s :Íå ìîæåòå äà ãîâîðèòå â òîçè êàíàë, çàùîòî ïñåâäîíèìúò âè å èëè "
+"íåðåãèñòðèðàí èëè ðåãèñòðèðàí ìíîãî ñêîðî!"
+
+
+#: ../src/messages.tab:524
+#, c-format
+msgid ""
+":%s 494 %s %s :You can't send this to the channel, while it contains a spam "
+"phrase, if you think it's not contact the admin (/ADMIN)"
+msgstr ""
+":%s 494 %s %s :Íå ìîæåòå äà ïðàòèòå òîâà â êàíàëà, çàùîòî ñúäúðæà ñïàì "
+"ôðàçà, àêî ìèñëèòå, ÷å òîâà íå å ñïàì ôðàçà îáúðíåòå ñå êúì àäìèíèñòðàòîðà (/ADMIN)"
+
+#: ../src/messages.tab:531
+#, c-format
+msgid ":%s 501 %s :Unknown MODE flag"
+msgstr ":%s 501 %s :Íåïîçíàò ÌÎÄ ôëàã"
+
+#: ../src/messages.tab:532
+#, c-format
+msgid ":%s 502 %s :Can't change mode for other users"
+msgstr ":%s 502 %s :Íå ìîæåòå äà ñìåíÿòå ìîäîâåòå íà äðóãè ïîòðåáèòåëè"
+
+#: ../src/messages.tab:533
+#, c-format
+msgid ":%s 503 %s :Message could not be delivered to %s"
+msgstr ":%s 503 %s :Ñúîáùåíèåòî íå ìîæå äà áúäå äîñòàâåíî äî %s"
+
+#: ../src/messages.tab:534
+#, c-format
+msgid ":%s 504 %s %s :User is not on this server"
+msgstr ":%s 504 %s %s :Ïîòðåáèòåëÿò íå å íà òîçè ñúðâúð"
+
+#: ../src/messages.tab:536
+#, c-format
+msgid ":%s 506 %s :Virtual Channels are disabled"
+msgstr ":%s 506 %s :Âèðòóàëíèòå êàíàëè ñà èçêëþ÷åíè"
+
+#: ../src/messages.tab:537
+#, c-format
+msgid ":%s 507 %s %s :You are already on a subchan"
+msgstr ":%s 507 %s %s :Âèå âå÷å ñòå â ïîäêàíàë"
+
+#: ../src/messages.tab:543
+#, c-format
+msgid ":%s 513 %s :To connect type /QUOTE PONG %lu"
+msgstr ":%s 513 %s :Çà äà ñå ñâúðæåòå, íàïèøåòå /QUOTE PONG %lu"
+
+#: ../src/messages.tab:554
+#, c-format
+msgid ":%s 524 %s %s :Help not found"
+msgstr ":%s 524 %s %s :Õåëïúò íå å íàìåðåí"
+
+#: ../src/messages.tab:732
+#, c-format
+msgid ":%s 702 %s %s 0x%x %s %s"
+msgstr ":%s 702 %s %s 0x%x %s %s"
+
+#: ../src/messages.tab:733
+#, c-format
+msgid ":%s 703 %s :End of /MODLIST."
+msgstr ":%s 703 %s :Êðàé íà /MODLIST."
+
+#: ../src/messages.tab:734
+#, c-format
+msgid ":%s 704 %s %s :%s"
+msgstr ":%s 704 %s %s :%s"
+
+#: ../src/messages.tab:735
+#, c-format
+msgid ":%s 705 %s %s :%s"
+msgstr ":%s 705 %s %s :%s"
+
+#: ../src/messages.tab:736
+#, c-format
+msgid ":%s 706 %s %s :End of /HELP."
+msgstr ":%s 706 %s %s :Êðàé íà /HELP."
+
+#: ../src/messages.tab:740
+#, c-format
+msgid ":%s 710 %s %s %s!%s@%s :has asked for an invite."
+msgstr ":%s 710 %s %s %s!%s@%s :ïîèñêà äà áúäå ïîêàíåí."
+
+#: ../src/messages.tab:741
+#, c-format
+msgid ":%s 711 %s %s :Your KNOCK has been delivered."
+msgstr ":%s 711 %s %s :Âàøèÿò /KNOCK áåøå äîñòàâåí."
+
+#: ../src/messages.tab:742
+#, c-format
+msgid ":%s 712 %s %s :Too many KNOCKs (%s)."
+msgstr ":%s 712 %s %s :Òâúðäå ìíîãî /KNOCK êîìàíäè ñà èçïúëíåíè (%s)."
+
+#: ../src/messages.tab:743
+#, c-format
+msgid ":%s 713 %s %s :Channel is open."
+msgstr ":%s 713 %s %s :Êàíàëúò å îòâîðåí."
+
+#: ../src/messages.tab:744
+#, c-format
+msgid ":%s 714 %s %s :You are already on that channel."
+msgstr ":%s 714 %s %s :Âèå âå÷å ñòå â òîçè êàíàë"
+
+#: ../src/messages.tab:745
+#, c-format
+msgid ":%s 715 %s :KNOCKs are disabled."
+msgstr ":%s 715 %s :/KNOCK êîìàíäàòà å èçêëþ÷åíà"
+
+#: ../src/messages.tab:1029
+#, c-format
+msgid ":%s 999 %s :Last Error Message"
+msgstr ":%s 999 %s :Ïîñëåäíî ñúîáùåíèå çà ãðåøêà"
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/messages/translations/.cvsignore ircd-hybrid-fuis/messages/translations/.cvsignore
--- ircd-hybrid-7.0rc9/messages/translations/.cvsignore	Tue Jul  3 00:53:10 2001
+++ ircd-hybrid-fuis/messages/translations/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,2 +0,0 @@
-*.mo
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/.cvsignore ircd-hybrid-fuis/modules/.cvsignore
--- ircd-hybrid-7.0rc9/modules/.cvsignore	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid-fuis/modules/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-Makefile
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/.depend ircd-hybrid-fuis/modules/.depend
--- ircd-hybrid-7.0rc9/modules/.depend	Thu Jan 30 05:28:47 2003
+++ ircd-hybrid-fuis/modules/.depend	Wed Mar 12 16:25:35 2003
@@ -1,4 +1,4 @@
-m_die.o: core/m_die.c ../include/stdinc.h ../include/config.h \
+m_die.o: m_die.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/client.h ../include/ircd_defs.h \
   ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
@@ -8,7 +8,7 @@
   ../include/s_bsd.h ../include/s_log.h ../include/s_conf.h \
   ../include/motd.h ../include/class.h ../include/send.h ../include/msg.h \
   ../include/parse.h ../include/modules.h
-m_kick.o: core/m_kick.c ../include/stdinc.h ../include/config.h \
+m_kick.o: m_kick.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/channel.h ../include/ircd_defs.h \
   ../include/channel_mode.h ../include/vchannel.h ../include/client.h \
@@ -18,7 +18,7 @@
   ../include/sprintf_irc.h ../include/numeric.h ../include/send.h \
   ../include/msg.h ../include/modules.h ../include/parse.h \
   ../include/hash.h ../include/packet.h ../include/fdlist.h
-m_kill.o: core/m_kill.c ../include/stdinc.h ../include/config.h \
+m_kill.o: m_kill.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/handlers.h \
   ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
   ../include/linebuf.h ../include/tools.h ../include/channel.h \
@@ -29,7 +29,7 @@
   ../include/motd.h ../include/class.h ../include/send.h \
   ../include/whowas.h ../include/msg.h ../include/parse.h \
   ../include/modules.h
-m_message.o: core/m_message.c ../include/stdinc.h ../include/config.h \
+m_message.o: m_message.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/handlers.h \
   ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
   ../include/linebuf.h ../include/tools.h ../include/channel.h \
@@ -41,7 +41,7 @@
   ../include/parse.h ../include/modules.h ../include/channel_mode.h \
   ../include/vchannel.h ../include/hash.h ../include/packet.h \
   ../include/fdlist.h
-m_mode.o: core/m_mode.c ../include/stdinc.h ../include/config.h \
+m_mode.o: m_mode.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/channel.h ../include/ircd_defs.h \
   ../include/channel_mode.h ../include/vchannel.h ../include/client.h \
@@ -53,7 +53,7 @@
   ../include/class.h ../include/s_serv.h ../include/send.h \
   ../include/msg.h ../include/parse.h ../include/modules.h \
   ../include/packet.h ../include/fdlist.h
-m_nick.o: core/m_nick.c ../include/stdinc.h ../include/config.h \
+m_nick.o: m_nick.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/handlers.h \
   ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
   ../include/linebuf.h ../include/tools.h ../include/channel.h \
@@ -66,7 +66,7 @@
   ../include/list.h ../include/s_log.h ../include/resv.h ../include/msg.h \
   ../include/parse.h ../include/modules.h ../include/common.h \
   ../include/packet.h
-m_part.o: core/m_part.c ../include/stdinc.h ../include/config.h \
+m_part.o: m_part.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/channel.h ../include/ircd_defs.h \
   ../include/vchannel.h ../include/client.h ../include/ircd_handler.h \
@@ -78,7 +78,7 @@
   ../include/msg.h ../include/parse.h ../include/modules.h \
   ../include/s_conf.h ../include/motd.h ../include/class.h \
   ../include/packet.h ../include/fdlist.h
-m_quit.o: core/m_quit.c ../include/stdinc.h ../include/config.h \
+m_quit.o: m_quit.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/handlers.h \
   ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
   ../include/linebuf.h ../include/tools.h ../include/channel.h \
@@ -88,7 +88,7 @@
   ../include/send.h ../include/msg.h ../include/parse.h \
   ../include/modules.h ../include/s_conf.h ../include/motd.h \
   ../include/class.h
-m_server.o: core/m_server.c ../include/stdinc.h ../include/config.h \
+m_server.o: m_server.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/client.h ../include/ircd_defs.h \
   ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
@@ -100,7 +100,7 @@
   ../include/s_log.h ../include/s_serv.h ../include/s_stats.h \
   ../include/scache.h ../include/send.h ../include/msg.h \
   ../include/parse.h ../include/modules.h
-m_sjoin.o: core/m_sjoin.c ../include/stdinc.h ../include/config.h \
+m_sjoin.o: m_sjoin.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
   ../include/handlers.h ../include/channel.h ../include/ircd_defs.h \
   ../include/channel_mode.h ../include/vchannel.h ../include/client.h \
@@ -112,7 +112,7 @@
   ../include/msg.h ../include/parse.h ../include/modules.h \
   ../include/s_serv.h ../include/s_conf.h ../include/motd.h \
   ../include/class.h
-m_squit.o: core/m_squit.c ../include/stdinc.h ../include/config.h \
+m_squit.o: m_squit.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/handlers.h \
   ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
   ../include/linebuf.h ../include/tools.h ../include/channel.h \
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/Makefile.in ircd-hybrid-fuis/modules/Makefile.in
--- ircd-hybrid-7.0rc9/modules/Makefile.in	Sun Jun 16 12:31:25 2002
+++ ircd-hybrid-fuis/modules/Makefile.in	Sun Mar  9 19:15:13 2003
@@ -35,41 +35,32 @@
 INCLUDES	= -I../include -I../adns $(SSL_INCLUDES)
 CPPFLAGS	= ${INCLUDES} @CPPFLAGS@
 
-CORE_SRCS = \
-  core/m_die.c \
-  core/m_kick.c \
-  core/m_kill.c \
-  core/m_message.c \
-  core/m_mode.c \
-  core/m_nick.c \
-  core/m_part.c \
-  core/m_quit.c \
-  core/m_server.c \
-  core/m_sjoin.c \
-  core/m_squit.c
-
-SRCS =                          \
+SRCS =  \
+  m_die.c \
+  m_kick.c \
+  m_kill.c \
+  m_message.c \
+  m_mode.c \
+  m_nick.c \
+  m_part.c \
+  m_quit.c \
+  m_server.c \
+  m_sjoin.c \
   m_accept.c \
   m_admin.c \
   m_away.c \
   m_capab.c \
   m_cburst.c \
-  m_challenge.c \
-  m_cjoin.c \
-  m_close.c \
   m_connect.c \
-  m_cryptlink.c \
-  m_dmem.c \
-  m_drop.c \
   m_eob.c \
-  m_gline.c \
   m_help.c \
   m_info.c \
   m_invite.c \
+  m_svscmds.c \
+  m_servid.c \
   m_ison.c \
   m_join.c \
   m_kline.c \
-  m_knock.c \
   m_links.c \
   m_list.c \
   m_lljoin.c \
@@ -84,14 +75,12 @@
   m_pass.c \
   m_ping.c \
   m_pong.c \
-  m_post.c \
   m_rehash.c \
   m_restart.c \
   m_resv.c \
   m_set.c \
   m_stats.c \
   m_svinfo.c \
-  m_testline.c \
   m_time.c \
   m_topic.c \
   m_trace.c \
@@ -103,16 +92,17 @@
   m_wallops.c \
   m_who.c \
   m_whois.c \
-  m_whowas.c 
+  m_whowas.c \
+  m_map.c \
+  m_ltrace.c \
+  m_tburst.c \
+  m_squit.c 
 
-ALL_SRCS = $(CORE_SRCS) \
-           $(SRCS)
+ALL_SRCS = $(SRCS)
 
 SH_OBJS = ${SRCS:.c=.so}
-SH_CORE_OBJS = ${CORE_SRCS:.c=.so}
 
 HPUX_OBJS = ${SH_OBJS:.so=.sl}
-HPUX_CORE_OBJS = ${SH_CORE_OBJS:.so=.sl}
 
 S_OBJS = ${ALL_SRCS:.c=.o}
 
@@ -122,11 +112,11 @@
 build: all
 all: @MOD_TARGET@
 
-shared_modules: $(SH_CORE_OBJS) $(SH_OBJS)
+shared_modules: $(SH_OBJS)
 
-hpux_modules: $(HPUX_CORE_OBJS) $(HPUX_OBJS)
+hpux_modules: $(HPUX_OBJS)
 
-hpux_shared: $(SH_CORE_OBJS) $(SH_OBJS)
+hpux_shared: $(SH_OBJS)
 	${MAKE} hpux_modules
 
 libmodules.a: $(S_OBJS)
@@ -165,21 +155,13 @@
 # Ye olde noop here.	
 
 install_shared_modules: install-mkdirs
-	@echo "Installing core modules into $(moduledir) .."
-	@for file in $(SH_CORE_OBJS); do \
-		$(INSTALL_DATA) $$file $(moduledir); \
-	done
-	@echo "Installing modules into $(automoduledir) .."
+	@echo "Installing modules into $(moduledir) .."
 	@for file in $(SH_OBJS); do \
 		$(INSTALL_DATA) $$file $(automoduledir); \
 	done
 
 install_hpux_shared: install-mkdirs
-	@echo "Installing core modules into $(moduledir) .."
-	@for file in $(HPUX_CORE_OBJS); do \
-		$(INSTALL_DATA) $$file $(moduledir); \
-	done
-	@echo "Installing modules into $(automoduledir) .."
+	@echo "Installing modules into $(moduledir) .."
 	@for file in $(HPUX_OBJS); do \
 		$(INSTALL_DATA) $$file $(automoduledir); \
 	done
@@ -201,7 +183,6 @@
 
 clean:
 	${RM} -f *.so *.sl *~ *.o *.a
-	${RM} -f core/*.so core/*.sl core/*~ core/*.o
 
 lint:
 	lint -aacgprxhH ${CPPFLAGS} -DIRCD_PREFIX=\"@prefix@\" $(ALL_SRCS) >../lint.out
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/descrip.mms ircd-hybrid-fuis/modules/core/descrip.mms
--- ircd-hybrid-7.0rc9/modules/core/descrip.mms	Mon Feb  4 16:07:51 2002
+++ ircd-hybrid-fuis/modules/core/descrip.mms	Wed Dec 31 19:00:00 1969
@@ -1,18 +0,0 @@
-# MMS/MMK Makefile for OpenVMS
-# Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 1.1 2002/02/04 21:07:51 ejb Exp $
-
-CC=	CC
-CFLAGS=	/INCLUDE_DIRECTORY=([-.-.INCLUDE],[-.-.ADNS])/STANDARD=ISOC94
-LDFLAGS=	
-
-OBJECTS=	M_DIE.OBJ,M_KICK.OBJ,M_KILL.OBJ,M_MESSAGE.OBJ,M_MODE.OBJ,M_NICK.OBJ,-
-		M_PART.OBJ,M_QUIT.OBJ,M_SERVER.OBJ,M_SJOIN.OBJ,M_SQUIT.OBJ
-
-ALL : CORE.OLB($(OBJECTS))
-	COPY CORE.OLB [-]
-
-CLEAN :
-	DELETE *.OLB;*
-	DELETE *.OBJ;*
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_die.c ircd-hybrid-fuis/modules/core/m_die.c
--- ircd-hybrid-7.0rc9/modules/core/m_die.c	Fri Jan 24 02:01:59 2003
+++ ircd-hybrid-fuis/modules/core/m_die.c	Wed Dec 31 19:00:00 1969
@@ -1,124 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_die.c: Kills off this server.
- *
- *  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_die.c,v 1.25 2003/01/24 07:01:59 lusky Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "client.h"
-#include "ircd.h"
-#include "irc_string.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_log.h"
-#include "s_conf.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-static void mo_die(struct Client*, struct Client*, int, char**);
-
-struct Message die_msgtab = {
-  "DIE", 0, 0, 1, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_not_oper, m_ignore, mo_die}
-};
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&die_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&die_msgtab);
-}
-
-const char *_version = "$Revision: 1.25 $";
-#endif
-/*
- * mo_die - DIE command handler
- */
-static void mo_die(struct Client *client_p, struct Client *source_p,
-                  int parc, char *parv[])
-{
-  struct Client* target_p;
-  dlink_node *ptr;
-
-  if (!IsOperDie(source_p))
-    {
-      sendto_one(source_p,":%s NOTICE %s :You need die = yes;", me.name, parv[0]);
-      return;
-    }
-
-  if (parc < 2)
-    {
-      sendto_one(source_p,":%s NOTICE %s :Need server name /die %s",
-                 me.name,source_p->name,me.name);
-      return;
-    }
-  else
-    {
-      if (irccmp(parv[1], me.name))
-        {
-          sendto_one(source_p,":%s NOTICE %s :Mismatch on /die %s",
-                     me.name,source_p->name,me.name);
-          return;
-        }
-    }
-
-  for(ptr = lclient_list.head; ptr; ptr = ptr->next)
-    {
-      target_p = ptr->data;
-
-      sendto_one(target_p,
-		 ":%s NOTICE %s :Server Terminating. %s",
-		 me.name, target_p->name,
-		 get_client_name(source_p, HIDE_IP));
-    }
-
-  for(ptr = serv_list.head; ptr; ptr = ptr->next)
-    {
-      target_p = ptr->data;
-
-      sendto_one(target_p, ":%s ERROR :Terminated by %s",
-		 me.name, get_client_name(source_p, HIDE_IP));
-    }
-
-  /*
-   * XXX we called flush_connections() here. Read server_reboot()
-   * for an explanation as to what we should do.
-   *     -- adrian
-   */
-  ilog(L_NOTICE, "Server terminated by %s", get_oper_name(source_p));
-  /* 
-   * this is a normal exit, tell the os it's ok 
-   */
-  unlink(pidFileName);
-  exit(0);
-  /* NOT REACHED */
-}
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_kick.c ircd-hybrid-fuis/modules/core/m_kick.c
--- ircd-hybrid-7.0rc9/modules/core/m_kick.c	Sat Feb  1 15:12:24 2003
+++ ircd-hybrid-fuis/modules/core/m_kick.c	Wed Dec 31 19:00:00 1969
@@ -1,268 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_kick.c: Kicks a user from a channel.
- *
- *  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_kick.c,v 1.50 2003/02/01 20:12:24 db Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "channel_mode.h"
-#include "vchannel.h"
-#include "client.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "send.h"
-#include "msg.h"
-#include "modules.h"
-#include "parse.h"
-#include "hash.h"
-#include "packet.h"
-
-
-static void m_kick(struct Client*, struct Client*, int, char**);
-static void ms_kick(struct Client*, struct Client*, int, char**);
-
-struct Message kick_msgtab = {
-  "KICK", 0, 0, 3, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_kick, ms_kick, m_kick}
-};
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&kick_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&kick_msgtab);
-}
-
-const char *_version = "$Revision: 1.50 $";
-#endif
-/*
-** m_kick
-**      parv[0] = sender prefix
-**      parv[1] = channel
-**      parv[2] = client to kick
-**      parv[3] = kick comment
-*/
-static void 
-m_kick(struct Client *client_p, struct Client *source_p,
-                  int parc, char *parv[])
-{
-  struct Client *who;
-  struct Channel *chptr;
-#ifdef VCHANS
-  struct Channel *vchan;
-#endif
-  int   chasing = 0;
-  char  *comment;
-  char  *name;
-  char  *p = (char *)NULL;
-  char  *user;
-  static char     buf[BUFSIZE];
-
-  if (*parv[2] == '\0')
-    {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-                 me.name, parv[0], "KICK");
-      return;
-    }
-
-  if(MyClient(source_p) && !IsFloodDone(source_p))
-    flood_endgrace(source_p);
-
-  comment = (BadPtr(parv[3])) ? parv[2] : parv[3];
-  if (strlen(comment) > (size_t) TOPICLEN)
-    comment[TOPICLEN] = '\0';
-
-  *buf = '\0';
-  name = parv[1];
-  while (*name == ',')
-    name++;
-  if((p = strchr(name,',')) != NULL)
-    *p = '\0';
-  if (!*name)
-    return;
-
-  chptr = hash_find_channel(name);
-  if (!chptr)
-    {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-                 me.name, parv[0], name);
-      return;
-    }
-
-#ifdef VCHANS
-  if (HasVchans(chptr))
-    {
-      vchan = map_vchan(chptr,source_p);
-      if(vchan != 0)
-	{
-	  chptr = vchan;
-	}
-    }
-#endif
-
-  if (!IsServer(source_p) && !is_any_op(chptr, source_p) ) 
-    { 
-      /* was a user, not a server, and user isn't seen as a chanop here */
-      
-      if(MyConnect(source_p))
-        {
-          /* user on _my_ server, with no chanops.. so go away */
-          
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
-                     me.name, parv[0], name);
-          return;
-        }
-
-      if(chptr->channelts == 0)
-        {
-          /* If its a TS 0 channel, do it the old way */
-          
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
-                     me.name, parv[0], name);
-          return;
-        }
-
-      /* Its a user doing a kick, but is not showing as chanop locally
-       * its also not a user ON -my- server, and the channel has a TS.
-       * There are two cases we can get to this point then...
-       *
-       *     1) connect burst is happening, and for some reason a legit
-       *        op has sent a KICK, but the SJOIN hasn't happened yet or 
-       *        been seen. (who knows.. due to lag...)
-       *
-       *     2) The channel is desynced. That can STILL happen with TS
-       *        
-       *     Now, the old code roger wrote, would allow the KICK to 
-       *     go through. Thats quite legit, but lets weird things like
-       *     KICKS by users who appear not to be chanopped happen,
-       *     or even neater, they appear not to be on the channel.
-       *     This fits every definition of a desync, doesn't it? ;-)
-       *     So I will allow the KICK, otherwise, things are MUCH worse.
-       *     But I will warn it as a possible desync.
-       *
-       *     -Dianora
-       */
-    }
-
-  user = parv[2];
-  while (*user == ',')
-    user++;
-  if((p = strchr(user,',')) != NULL)
-    *p = '\0';
-  if (!*user)
-    return;
-
-  if (!(who = find_chasing(source_p, user, &chasing)))
-    {
-      return;
-    }
-
-  if (IsMember(who, chptr))
-    {
-      /* half ops cannot kick other halfops on private channels */
-#ifdef HALFOPS
-      if (is_half_op(chptr,source_p))
-      {
-	if (((chptr->mode.mode & MODE_PRIVATE) && is_any_op(chptr, who)) ||
-             is_chan_op(chptr, who))
-	{
-          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
-                     me.name, parv[0], name);
-	  return;
-	}
-      }
-#endif
-      /* jdc
-       * - In the case of a server kicking a user (i.e. CLEARCHAN),
-       *   the kick should show up as coming from the server which did
-       *   the kick.
-       * - Personally, flame and I believe that server kicks shouldn't
-       *   be sent anyways.  Just waiting for some oper to abuse it...
-       */
-      if (IsServer(source_p))
-      {
-        sendto_channel_local(ALL_MEMBERS, chptr, ":%s KICK %s %s :%s",
-          source_p->name, name, who->name, comment);
-      }
-#ifdef ANONOPS
-      else if(chptr->mode.mode & MODE_HIDEOPS)
-	{
-	  /* jdc -- Non-chanops get kicked from me.name, not
-	   *        who->name (themselves).
-	   */
-	  sendto_channel_local(NON_CHANOPS, chptr,
-			       ":%s KICK %s %s :%s",
-			       me.name,
-			       name, who->name, comment);
-
-	  sendto_channel_local(ONLY_CHANOPS_HALFOPS, chptr,
-			       ":%s!%s@%s KICK %s %s :%s",
-			       source_p->name,
-			       source_p->username,
-			       source_p->host,
-			       name,
-			       who->name, comment);
-	}
-      else
-#endif
-	{
-	  sendto_channel_local(ALL_MEMBERS, chptr,
-			       ":%s!%s@%s KICK %s %s :%s",
-			       source_p->name,
-			       source_p->username,
-			       source_p->host,
-			       name, who->name, comment);
-	}
-
-      sendto_server(client_p, NULL, chptr, NOCAPS, NOCAPS, NOFLAGS,
-                    ":%s KICK %s %s :%s",
-                    parv[0], chptr->chname,
-                    who->name, comment);
-      if (!IsDefunct(who))
-	remove_user_from_channel(chptr, who);
-    }
-  else
-    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
-               me.name, parv[0], user, name);
-}
-
-static void
-ms_kick(struct Client *client_p, struct Client *source_p,
-                   int parc, char *parv[])
-{
-  if (*parv[2] == '\0')
-    {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-                 me.name, parv[0], "KICK");
-      return;
-    }
-
-  m_kick(client_p, source_p, parc, parv);
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_kill.c ircd-hybrid-fuis/modules/core/m_kill.c
--- ircd-hybrid-7.0rc9/modules/core/m_kill.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-fuis/modules/core/m_kill.c	Wed Dec 31 19:00:00 1969
@@ -1,373 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_kill.c: Kills 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_kill.c,v 1.68 2003/02/14 23:01:53 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "hash.h"       /* for find_client() */
-#include "ircd.h"
-#include "numeric.h"
-#include "s_log.h"
-#include "s_serv.h"
-#include "s_conf.h"
-#include "send.h"
-#include "whowas.h"
-#include "irc_string.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-
-static char buf[BUFSIZE];
-
-static void ms_kill(struct Client*, struct Client*, int, char**);
-static void mo_kill(struct Client*, struct Client*, int, char**);
-static void relay_kill(struct Client *, struct Client *, struct Client *,
-                       const char *, const char *);
-
-struct Message kill_msgtab = {
-  "KILL", 0, 0, 2, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_not_oper, ms_kill, mo_kill}
-};
-#ifndef STATIC_MODULES
-
-void
-_modinit(void)
-{
-  mod_add_cmd(&kill_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&kill_msgtab);
-}
-
-const char *_version = "$Revision: 1.68 $";
-#endif
-/*
-** mo_kill
-**      parv[0] = sender prefix
-**      parv[1] = kill victim
-**      parv[2] = kill path
-*/
-static void
-mo_kill(struct Client *client_p, struct Client *source_p,
-	int parc, char *parv[])
-{
-  struct Client*    target_p;
-  const char* inpath = client_p->name;
-  char*       user;
-  char*       reason;
-
-  user = parv[1];
-  reason = parv[2]; /* Either defined or NULL (parc >= 2!!) */
-
-  if (!IsOperK(source_p))
-    {
-      sendto_one(source_p,":%s NOTICE %s :You need kline = yes;",me.name,parv[0]);
-      return;
-    }
-
-  if (!BadPtr(reason))
-    {
-      if(strlen(reason) > (size_t) KILLLEN)
-	reason[KILLLEN] = '\0';
-    }
-  else
-    reason = "<No reason given>";
-
-  if ((target_p = find_client(user)) == NULL)
-    {
-      /*
-      ** If the user has recently changed nick, automatically
-      ** rewrite the KILL for this new nickname--this keeps
-      ** servers in synch when nick change and kill collide
-      */
-      if ((target_p = get_history(user, (long)KILLCHASETIMELIMIT)) == NULL)
-        {
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
-                     me.name, parv[0], user);
-          return;
-        }
-      sendto_one(source_p,":%s NOTICE %s :KILL changed from %s to %s",
-                 me.name, parv[0], user, target_p->name);
-    }
-  if (IsServer(target_p) || IsMe(target_p))
-    {
-      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
-                 me.name, parv[0]);
-      return;
-    }
-
-  if (!MyConnect(target_p) && (!IsOperGlobalKill(source_p)))
-    {
-      sendto_one(source_p, ":%s NOTICE %s :Nick %s isnt on your server",
-                 me.name, parv[0], target_p->name);
-      return;
-    }
-
-  if(MyConnect(target_p))
-    sendto_one(target_p, ":%s!%s@%s KILL %s :%s", 
-	       source_p->name, source_p->username, source_p->host,
-	       target_p->name, reason);
-
-  /* Do not change the format of this message.  There's no point in changing messages
-   * that have been around for ever, for no reason.. */
-  sendto_realops_flags(FLAGS_ALL, L_ALL,
-		       "Received KILL message for %s. From %s Path: %s (%s)", 
-		       target_p->name, parv[0], me.name, reason);
-
-  ilog(L_INFO,"KILL From %s For %s Path %s (%s)",
-       parv[0], target_p->name, me.name, reason);
-
-
-  /*
-  ** And pass on the message to other servers. Note, that if KILL
-  ** was changed, the message has to be sent to all links, also
-  ** back.
-  ** Suicide kills are NOT passed on --SRB
-  */
-  if (!MyConnect(target_p))
-    {
-      relay_kill(client_p, source_p, target_p, inpath, reason);
-      /*
-      ** Set FLAGS_KILLED. This prevents exit_one_client from sending
-      ** the unnecessary QUIT for this. (This flag should never be
-      ** set in any other place)
-      */
-      target_p->flags |= FLAGS_KILLED;
-    }
-
-  ircsprintf(buf, "Killed (%s (%s))", source_p->name, reason);
-  
-  exit_client(client_p, target_p, source_p, buf);
-}
-
-/*
- * ms_kill
- *      parv[0] = sender prefix
- *      parv[1] = kill victim
- *      parv[2] = kill path and reason
- */
-static void
-ms_kill(struct Client *client_p, struct Client *source_p,
-	int parc, char *parv[])
-{
-  struct Client *target_p;
-  char *user;
-  char *reason;
-  char *path;
-  int chasing = 0;
-
-  *buf = '\0';
-
-  if (*parv[1] == '\0')
-    {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-                 me.name, parv[0], "KILL");
-      return;
-    }
-
-  user = parv[1];
-
-  if(BadPtr(parv[2]))
-  {
-    reason = "<No reason given>";
-
-    /* hyb6 takes the nick of the killer from the path *sigh* --fl_ */
-    path = source_p->name;
-  }
-  else
-  {
-    reason = strchr(parv[2], ' ');
-      
-    if(reason)
-    {
-      *reason = '\0';
-      reason++;
-    }
-    else
-      reason = "<No reason given>";
-
-    path = parv[2];
-  }
-
-  if ((target_p = find_client(user)) == NULL)
-    {
-      /*
-       * If the user has recently changed nick, but only if its 
-       * not an uid, automatically rewrite the KILL for this new nickname.
-       * --this keeps servers in synch when nick change and kill collide
-       */
-      if( (*user == '.')  ||
-	  (!(target_p = get_history(user, (long)KILLCHASETIMELIMIT))))
-        {
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
-                     me.name, parv[0], user);
-          return;
-        }
-      sendto_one(source_p,":%s NOTICE %s :KILL changed from %s to %s",
-                 me.name, parv[0], user, target_p->name);
-      chasing = 1;
-    }
-    
-  if (IsServer(target_p) || IsMe(target_p))
-    {
-      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
-                 me.name, parv[0]);
-      return;
-    }
-
-  if(MyConnect(target_p))
-  {
-    if(IsServer(source_p))
-    {
-      /* dont send clients kills from a hidden server */
-      if(ConfigServerHide.hide_servers && !IsOper(target_p))
-        sendto_one(target_p, ":%s KILL %s :%s",
- 		   me.name, target_p->name, reason);
-      else
-	sendto_one(target_p, ":%s KILL %s :%s",
-	           source_p->name, target_p->name, reason);
-    }
-    else
-      sendto_one(target_p, ":%s!%s@%s KILL %s :%s",
-		 source_p->name, source_p->username, source_p->host,
-		 target_p->name, reason);
-  }
-
-  /* Be warned, this message must be From %s, or it confuses clients
-   * so dont change it to From: or the case or anything! -- fl -- db */
-  /* path must contain at least 2 !'s, or bitchx falsely declares it
-   * local --fl
-   */
-  if (IsOper(source_p)) /* send it normally */
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-		"Received KILL message for %s. From %s Path: %s!%s!%s!%s %s",
-		target_p->name, parv[0], source_p->user->server, 
-                source_p->host, source_p->username, source_p->name, reason);
-    }
-  else
-    {
-      sendto_realops_flags(FLAGS_SKILL, L_ALL,
-			   "Received KILL message for %s. From %s %s",
-			   target_p->name, parv[0], reason);
-    }
-
-  ilog(L_INFO,"KILL From %s For %s Path %s %s",
-       parv[0], target_p->name, parv[0], reason);
-
-  relay_kill(client_p, source_p, target_p, path, reason);
-
-  /* FLAGS_KILLED prevents a quit being sent out */ 
-  SetKilled(target_p);
-
-  /* reason comes supplied with its own ()'s */
-  if(ConfigServerHide.hide_servers && IsServer(source_p))
-    ircsprintf(buf, "Killed (%s %s)", me.name, reason);
-  else
-    ircsprintf(buf, "Killed (%s %s)", source_p->name, reason);
-    
-  exit_client(client_p, target_p, source_p, buf);
-}
-
-static void
-relay_kill(struct Client *one, struct Client *source_p,
-	   struct Client *target_p, const char *inpath, const char *reason)
-{
-  dlink_node *ptr;
-  struct Client *client_p;
-  int introduce_killed_client;
-  char* user; 
-  
-  /* LazyLinks:
-   * Check if each lazylink knows about target_p.
-   *   If it does, send the kill, introducing source_p if required.
-   *   If it doesn't either:
-   *     a) don't send the kill (risk ghosts)
-   *     b) introduce the client (and source_p, if required)
-   *        [rather redundant]
-   *
-   * Use a) if IsServer(source_p), but if an oper kills someone,
-   * ensure we blow away any ghosts.
-   *
-   * -davidt
-   */
-
-  if(IsServer(source_p))
-    introduce_killed_client = 0;
-  else
-    introduce_killed_client = 1;
-
-  for( ptr = serv_list.head; ptr; ptr = ptr->next )
-  {
-    client_p = (struct Client *) ptr->data;
-    
-    if( !client_p || client_p == one )
-      continue;
-
-    if( !introduce_killed_client )
-    {
-      if( ServerInfo.hub && IsCapable(client_p, CAP_LL) )
-      {
-        if(((client_p->localClient->serverMask &
-             target_p->lazyLinkClientExists) == 0))
-        {
-          /* target isn't known to lazy leaf, skip it */
-          continue;
-        }
-      }
-    }
-    /* force introduction of killed client but check that
-     * its not on the server we're bursting too.. */
-    else if(strcmp(target_p->user->server,client_p->name))
-      client_burst_if_needed(client_p, target_p);
-
-    /* introduce source of kill */
-    client_burst_if_needed(client_p, source_p);
-
-    /* check the server supports UID */
-    if (IsCapable(client_p, CAP_UID))
-      user = ID(target_p);
-    else
-      user = target_p->name;
-
-    if(MyClient(source_p))
-      {
-        sendto_one(client_p, ":%s KILL %s :%s!%s!%s!%s (%s)",
-                   source_p->name, user,
-                   me.name, source_p->host, source_p->username,
-                   source_p->name, reason);
-      }
-    else
-      {
-        sendto_one(client_p, ":%s KILL %s :%s %s",
-                   source_p->name, user,
-                   inpath, reason);
-      }
-  }
-}
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_message.c ircd-hybrid-fuis/modules/core/m_message.c
--- ircd-hybrid-7.0rc9/modules/core/m_message.c	Mon Feb  3 00:25:47 2003
+++ ircd-hybrid-fuis/modules/core/m_message.c	Wed Dec 31 19:00:00 1969
@@ -1,981 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_message.c: Sends a (PRIVMSG|NOTICE) message to a user or channel.
- *
- *  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_message.c,v 1.107 2003/02/03 05:25:47 bill Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "common.h"
-#include "s_conf.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-#include "channel.h"
-#include "channel_mode.h"
-#include "vchannel.h"
-#include "irc_string.h"
-#include "hash.h"
-#include "class.h"
-#include "msg.h"
-#include "packet.h"
-
-
-struct entity
-{
-  void *ptr;
-  int type;
-  int flags;
-};
-
-static int build_target_list(int p_or_n, char *command,
-                             struct Client *client_p,
-                             struct Client *source_p,
-                             char *nicks_channels, char *text);
-
-static int flood_attack_client(int p_or_n, struct Client *source_p,
-                               struct Client *target_p);
-static int flood_attack_channel(int p_or_n, struct Client *source_p,
-                                struct Channel *chptr, char *chname);
-static struct Client* find_userhost (char *, char *, int *);
-
-#define ENTITY_NONE    0
-#define ENTITY_CHANNEL 1
-#define ENTITY_CHANOPS_ON_CHANNEL 2
-#define ENTITY_CLIENT  3
-
-static struct entity targets[512];
-static int ntargets = 0;
-
-static int duplicate_ptr(void *);
-
-static void m_message(int, char *, struct Client *,
-                      struct Client *, int, char **);
-
-static void m_privmsg(struct Client *, struct Client *, int, char **);
-static void m_notice(struct Client *, struct Client *, int, char **);
-
-static void msg_channel(int p_or_n, char *command,
-                        struct Client *client_p,
-                        struct Client *source_p,
-                        struct Channel *chptr, char *text);
-
-static void msg_channel_flags(int p_or_n, char *command,
-                              struct Client *client_p,
-                              struct Client *source_p,
-                              struct Channel *chptr, int flags, char *text);
-
-static void msg_client(int p_or_n, char *command,
-                       struct Client *source_p, struct Client *target_p,
-                       char *text);
-
-static void handle_special(int p_or_n, char *command,
-			   struct Client *client_p,
-			   struct Client *source_p, char *nick, char *text);
-
-struct Message privmsg_msgtab = {
-  "PRIVMSG", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0L,
-  {m_unregistered, m_privmsg, m_privmsg, m_privmsg}
-};
-
-struct Message notice_msgtab = {
-  "NOTICE", 0, 0, 1, 0, MFLG_SLOW, 0L,
-  {m_unregistered, m_notice, m_notice, m_notice}
-};
-
-#ifndef STATIC_MODULES
-
-void
-_modinit(void)
-{
-  mod_add_cmd(&privmsg_msgtab);
-  mod_add_cmd(&notice_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&privmsg_msgtab);
-  mod_del_cmd(&notice_msgtab);
-}
-
-const char *_version = "$Revision: 1.107 $";
-#endif
-
-/*
-** m_privmsg
-**
-** massive cleanup
-** rev argv 6/91
-**
-**   Another massive cleanup Nov, 2000
-** (I don't think there is a single line left from 6/91. Maybe.)
-** m_privmsg and m_notice do basically the same thing.
-** in the original 2.8.2 code base, they were the same function
-** "m_message.c." When we did the great cleanup in conjuncton with bleep
-** of ircu fame, we split m_privmsg.c and m_notice.c.
-** I don't see the point of that now. Its harder to maintain, its
-** easier to introduce bugs into one version and not the other etc.
-** Really, the penalty of an extra function call isn't that big a deal folks.
-** -db Nov 13, 2000
-**
-*/
-
-#define PRIVMSG 0
-#define NOTICE  1
-
-static void
-m_privmsg(struct Client *client_p,
-          struct Client *source_p, int parc, char *parv[])
-{
-  /* servers have no reason to send privmsgs, yet sometimes there is cause
-   * for a notice.. (for example remote kline replies) --fl_
-   */
-  if (!IsPerson(source_p))
-    return;
-
-  m_message(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
-}
-
-static void
-m_notice(struct Client *client_p,
-         struct Client *source_p, int parc, char *parv[])
-{
-  m_message(NOTICE, "NOTICE", client_p, source_p, parc, parv);
-}
-
-/*
- * inputs	- flag privmsg or notice
- * 		- pointer to command "PRIVMSG" or "NOTICE"
- *		- pointer to client_p
- *		- pointer to source_p
- *		- pointer to channel
- */
-static void
-m_message(int p_or_n,
-          char *command,
-          struct Client *client_p,
-          struct Client *source_p, int parc, char *parv[])
-{
-  int i;
-
-  if (parc < 2 || *parv[1] == '\0')
-  {
-    if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_NORECIPIENT), me.name,
-                 source_p->name, command);
-    return;
-  }
-
-  if (parc < 3 || *parv[2] == '\0')
-  {
-    if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name,
-                 source_p->name);
-    return;
-  }
-
-  /* Finish the flood grace period... */
-  if(MyClient(source_p) && !IsFloodDone(source_p))
-    flood_endgrace(source_p);
-
-  if (build_target_list(p_or_n, command, client_p, source_p, parv[1],
-                        parv[2]) < 0)
-  {
-    /* Sigh.  We need to relay this command to the hub */
-    if (!ServerInfo.hub && (uplink != NULL))
-      sendto_one(uplink, ":%s %s %s :%s",
-		 source_p->name, command, parv[1], parv[2]);
-    return;
-  }
-
-  for (i = 0; i < ntargets; i++)
-  {
-    switch (targets[i].type)
-    {
-      case ENTITY_CHANNEL:
-        msg_channel(p_or_n, command, client_p, source_p,
-                    (struct Channel *)targets[i].ptr, parv[2]);
-        break;
-
-      case ENTITY_CHANOPS_ON_CHANNEL:
-        msg_channel_flags(p_or_n, command, client_p, source_p,
-                          (struct Channel *)targets[i].ptr,
-                          targets[i].flags, parv[2]);
-        break;
-
-      case ENTITY_CLIENT:
-        msg_client(p_or_n, command, source_p,
-                   (struct Client *)targets[i].ptr, parv[2]);
-        break;
-    }
-  }
-}
-
-/*
- * build_target_list
- *
- * inputs	- pointer to given client_p (server)
- *		- pointer to given source (oper/client etc.)
- *		- pointer to list of nicks/channels
- *		- pointer to table to place results
- *		- pointer to text (only used if source_p is an oper)
- * output	- number of valid entities
- * side effects	- target_table is modified to contain a list of
- *		  pointers to channels or clients
- *		  if source client is an oper
- *		  all the classic old bizzare oper privmsg tricks
- *		  are parsed and sent as is, if prefixed with $
- *		  to disambiguate.
- *
- */
-
-static int
-build_target_list(int p_or_n, char *command, struct Client *client_p,
-                  struct Client *source_p, char *nicks_channels,
-                  char *text)
-{
-  int type;
-  char *p, *nick, *target_list, ncbuf[BUFSIZE];
-  struct Channel *chptr=NULL;
-  struct Client *target_p;
-
-  /* Sigh, we can't mutilate parv[1] incase we need it to send to a hub */
-  if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
-  {
-    strncpy(ncbuf, nicks_channels, BUFSIZE);
-    target_list = ncbuf;
-  }
-  else
-    target_list = nicks_channels; /* skip strcpy for non-lazyleafs */
-
-  ntargets = 0;
-
-  for (nick = strtoken(&p, target_list, ","); nick;
-       nick = strtoken(&p, (char *)NULL, ","))
-  {
-    char *with_prefix;
-    /*
-     * channels are privmsg'd a lot more than other clients, moved up
-     * here plain old channel msg?
-     */
-
-    if (IsChanPrefix(*nick))
-    {
-      /* ignore send of local channel to a server (should not happen) */
-      if (IsServer(client_p) && *nick == '&')
-        continue;
-
-      if ((chptr = hash_find_channel(nick)) != NULL)
-      {
-        if (!duplicate_ptr(chptr))
-        {
-          if (ntargets >= ConfigFileEntry.max_targets)
-	    {
-	      sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
-			 me.name, source_p->name, nick);
-	      return (1);
-	    }
-          targets[ntargets].ptr = (void *)chptr;
-          targets[ntargets++].type = ENTITY_CHANNEL;
-        }
-      }
-      else
-      {
-        if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
-          return -1;
-        else if (p_or_n != NOTICE)
-          sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-                     source_p->name, nick);
-      }
-      continue;
-    }
-
-    /* look for a privmsg to another client */
-    if ((target_p = find_person(nick)) != NULL)
-    {
-      if (!duplicate_ptr(target_p))
-      {
-        if (ntargets >= ConfigFileEntry.max_targets)
-	  {
-	    sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
-		       me.name, source_p->name, nick);
-	    return (1);
-	  }
-        targets[ntargets].ptr = (void *)target_p;
-        targets[ntargets].type = ENTITY_CLIENT;
-        targets[ntargets++].flags = 0;
-      }
-      continue;
-    }
-    
-    /* @#channel or +#channel message ? */
-
-    type = 0;
-    with_prefix = nick;
-    /*  allow %+@ if someone wants to do that */
-    for (;;)
-    {
-      if (*nick == '@')
-        type |= MODE_CHANOP;
-      else if (*nick == '%')
-        type |= MODE_CHANOP | MODE_HALFOP;
-      else if (*nick == '+')
-        type |= MODE_CHANOP | MODE_HALFOP | MODE_VOICE;
-      else
-        break;
-      nick++;
-    }
-
-    if (type != 0)
-    {
-      /* suggested by Mortiis */
-      if (*nick == '\0')      /* if its a '\0' dump it, there is no recipient */
-	{
-	  sendto_one(source_p, form_str(ERR_NORECIPIENT),
-		     me.name, source_p->name, command);
-	  continue;
-	}
-
-      /* At this point, nick+1 should be a channel name i.e. #foo or &foo
-       * if the channel is found, fine, if not report an error
-       */
-
-      if ((chptr = hash_find_channel(nick)) != NULL)
-	{
-	  if(!is_any_op(chptr, source_p) && !is_voiced(chptr, source_p))
-	    {
-	      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
-			 source_p->name, with_prefix);
-	      return(-1);
-	    }
-
-	  if (!duplicate_ptr(chptr))
-	    {
-	      if (ntargets >= ConfigFileEntry.max_targets)
-		{
-		  sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
-			     me.name, source_p->name, nick);
-		  return (1);
-		}
-	      targets[ntargets].ptr = (void *)chptr;
-	      targets[ntargets].type = ENTITY_CHANOPS_ON_CHANNEL;
-	      targets[ntargets++].flags = type;
-	    }
-	}
-      else
-	{
-	  if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
-	    return -1;
-	  else if (p_or_n != NOTICE)
-	    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-		       source_p->name, nick);
-	}
-      continue;
-    }
-
-    if(((*nick == '$') || strchr(nick, '@')))
-    {
-      handle_special(p_or_n, command, client_p, source_p, nick, text);
-    }
-    else
-    {
-      if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
-        return -1;
-      else if(p_or_n != NOTICE)
-        sendto_one(source_p, form_str(ERR_NOSUCHNICK),
-	           me.name, source_p->name, nick);
-    }
-    /* continue; */
-  }
-  return (1);
-}
-
-/*
- * duplicate_ptr
- *
- * inputs	- pointer to check
- *		- pointer to table of entities
- *		- number of valid entities so far
- * output	- YES if duplicate pointer in table, NO if not.
- *		  note, this does the canonize using pointers
- * side effects	- NONE
- */
-static int
-duplicate_ptr(void *ptr)
-{
-  int i;
-  for (i = 0; i < ntargets; i++)
-    if (targets[i].ptr == ptr)
-      return YES;
-  return NO;
-}
-
-/*
- * msg_channel
- *
- * inputs	- flag privmsg or notice
- * 		- pointer to command "PRIVMSG" or "NOTICE"
- *		- pointer to client_p
- *		- pointer to source_p
- *		- pointer to channel
- * output	- NONE
- * side effects	- message given channel
- */
-static void
-msg_channel(int p_or_n, char *command,
-            struct Client *client_p,
-            struct Client *source_p, struct Channel *chptr, char *text)
-{
-  struct Channel *vchan = NULL;
-  char *chname = NULL;
-  int result;
-
-  chname = RootChan(chptr)->chname;
-
-#ifdef VCHANS
-  if (HasVchans(chptr))
-    vchan = map_vchan(chptr, source_p);
-#endif
-  
-  if (!vchan)
-    vchan = chptr;
-
-  if (MyClient(source_p))
-  {
-    /* idle time shouldnt be reset by notices --fl */
-    if ((p_or_n != NOTICE) && source_p->user)
-      source_p->user->last = CurrentTime;
-  }
-
-  /* chanops and voiced can flood their own channel with impunity */
-  if ((result = can_send(vchan, source_p)))
-  {
-    if (result == CAN_SEND_OPV ||
-        !flood_attack_channel(p_or_n, source_p, vchan, chname))
-    {
-      sendto_channel_butone(client_p, source_p, vchan, command, ":%s", text);
-    }
-  }
-  else
-  {
-    if (p_or_n != NOTICE)
-      sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN),
-                 me.name, source_p->name, chname);
-  }
-}
-
-/*
- * msg_channel_flags
- *
- * inputs	- flag 0 if PRIVMSG 1 if NOTICE. RFC 
- *		  say NOTICE must not auto reply
- *		- pointer to command, "PRIVMSG" or "NOTICE"
- *		- pointer to client_p
- *		- pointer to source_p
- *		- pointer to channel
- *		- flags
- *		- pointer to text to send
- * output	- NONE
- * side effects	- message given channel either chanop or voice
- */
-static void
-msg_channel_flags(int p_or_n, char *command, struct Client *client_p,
-                  struct Client *source_p, struct Channel *chptr,
-                  int flags, char *text)
-{
-  struct Channel *vchan = NULL;
-  char *chname = NULL;
-  int type;
-  char c;
-
-  if (flags & MODE_VOICE)
-  {
-    type = ONLY_CHANOPS_HALFOPS_VOICED;
-    c = '+';
-  }
-  else if (flags & MODE_HALFOP)
-  {
-    type = ONLY_CHANOPS_HALFOPS;
-    c = '%';
-  }
-  else
-  {
-    type = ONLY_CHANOPS;
-    c = '@';
-  }
-
-  chname = RootChan(chptr)->chname;
-
-#ifdef VCHANS
-  if (HasVchans(chptr))
-    vchan = map_vchan(chptr, source_p);
-#endif
-
-  if (!vchan)
-    vchan = chptr;
-
-  if (MyClient(source_p))
-  {
-    /* idletime shouldnt be reset by notice --fl */
-    if ((p_or_n != NOTICE) && source_p->user)
-      source_p->user->last = CurrentTime;
-
-    sendto_channel_local_butone(source_p, type, vchan, ":%s!%s@%s %s %c%s :%s",
-                                source_p->name, source_p->username,
-                                source_p->host, command, c, chname, text);
-  }
-  else
-  {
-    /*
-     * another good catch, lee.  we never would echo to remote clients anyway,
-     * so use slightly less intensive sendto_channel_local()
-     */
-    sendto_channel_local(type, vchan, ":%s!%s@%s %s %c%s :%s",
-                         source_p->name, source_p->username,
-                         source_p->host, command, c, chname, text);
-  }
-
-  if (chptr->chname[0] == '&')
-    return;
-
-  sendto_channel_remote(source_p, client_p, type, CAP_CHW, CAP_UID, vchan,
-                ":%s %s %c%s :%s", source_p->name, command, c,
-                vchan->chname, text);
-  sendto_channel_remote(source_p, client_p, type, CAP_CHW|CAP_UID, NOCAPS, vchan,
-                ":%s %s %c%s :%s", ID(source_p), command, c,
-                vchan->chname, text);
-
-  /* non CAP_CHW servers? */
-}
-
-/*
- * msg_client
- *
- * inputs	- flag 0 if PRIVMSG 1 if NOTICE. RFC 
- *		  say NOTICE must not auto reply
- *		- pointer to command, "PRIVMSG" or "NOTICE"
- * 		- pointer to source_p source (struct Client *)
- *		- pointer to target_p target (struct Client *)
- *		- pointer to text
- * output	- NONE
- * side effects	- message given channel either chanop or voice
- */
-static void
-msg_client(int p_or_n, char *command,
-           struct Client *source_p, struct Client *target_p, char *text)
-{
-  if (MyClient(source_p))
-  {
-    /* reset idle time for message only if its not to self 
-     * and its not a notice */
-    if ((p_or_n != NOTICE) && (source_p != target_p) && source_p->user)
-      source_p->user->last = CurrentTime;
-  }
-
-  if (MyConnect(source_p) && (p_or_n != NOTICE) &&
-      target_p->user && target_p->user->away)
-    sendto_one(source_p, form_str(RPL_AWAY), me.name,
-               source_p->name, target_p->name, target_p->user->away);
-
-  if (MyClient(target_p))
-  {
-    if (!IsServer(source_p) && IsSetCallerId(target_p))
-    {
-      /* Here is the anti-flood bot/spambot code -db */
-      if (accept_message(source_p, target_p))
-      {
-        sendto_one(target_p, ":%s!%s@%s %s %s :%s",
-                   source_p->name,
-                   source_p->username,
-                   source_p->host, command, target_p->name, text);
-      }
-      else
-      {
-        /* check for accept, flag recipient incoming message */
-        if (p_or_n != NOTICE)
-          sendto_anywhere(source_p, target_p,
-                          "NOTICE %s :*** I'm in +g mode (server side ignore).",
-                          source_p->name);
-
-        if ((target_p->localClient->last_caller_id_time +
-             ConfigFileEntry.caller_id_wait) < CurrentTime)
-        {
-          if (p_or_n != NOTICE)
-            sendto_anywhere(source_p, target_p,
-                            "NOTICE %s :*** I've been informed you messaged me.",
-                            source_p->name);
-
-          sendto_one(target_p,
-                     ":%s NOTICE %s :*** Client %s is messaging you and you are +g",
-                     me.name, target_p->name,
-                     get_client_name(source_p, HIDE_IP));
-
-          target_p->localClient->last_caller_id_time = CurrentTime;
-
-        }
-        /* Only so opers can watch for floods */
-        (void)flood_attack_client(p_or_n, source_p, target_p);
-      }
-    }
-    else
-    {
-      /* If the client is remote, we dont perform a special check for
-       * flooding.. as we wouldnt block their message anyway.. this means
-       * we dont give warnings.. we then check if theyre opered 
-       * (to avoid flood warnings), lastly if theyre our client
-       * and flooding    -- fl */
-      if (!MyClient(source_p) || IsOper(source_p) ||
-          (MyClient(source_p) &&
-           !flood_attack_client(p_or_n, source_p, target_p)))
-        sendto_anywhere(target_p, source_p, "%s %s :%s",
-                        command, target_p->name, text);
-    }
-  }
-  else
-    /* The target is a remote user.. same things apply  -- fl */
-  if (!MyClient(source_p) || IsOper(source_p) ||
-        (MyClient(source_p)
-           && !flood_attack_client(p_or_n, source_p, target_p)))
-    sendto_anywhere(target_p, source_p, "%s %s :%s", command, target_p->name,
-                    text);
-  return;
-}
-
-/*
- * flood_attack_client
- * inputs       - flag 0 if PRIVMSG 1 if NOTICE. RFC
- *                say NOTICE must not auto reply
- *              - pointer to source Client 
- *		- pointer to target Client
- * output	- 1 if target is under flood attack
- * side effects	- check for flood attack on target target_p
- */
-static int
-flood_attack_client(int p_or_n, struct Client *source_p,
-                    struct Client *target_p)
-{
-  int delta;
-
-  if (GlobalSetOptions.floodcount && MyConnect(target_p)
-      && IsClient(source_p) && !IsConfCanFlood(source_p))
-  {
-    if ((target_p->localClient->first_received_message_time + 1)
-        < CurrentTime)
-    {
-      delta =
-        CurrentTime - target_p->localClient->first_received_message_time;
-      target_p->localClient->received_number_of_privmsgs -= delta;
-      target_p->localClient->first_received_message_time = CurrentTime;
-      if (target_p->localClient->received_number_of_privmsgs <= 0)
-      {
-        target_p->localClient->received_number_of_privmsgs = 0;
-        target_p->localClient->flood_noticed = 0;
-      }
-    }
-
-    if ((target_p->localClient->received_number_of_privmsgs >=
-         GlobalSetOptions.floodcount) || target_p->localClient->flood_noticed)
-    {
-      if (target_p->localClient->flood_noticed == 0)
-      {
-        sendto_realops_flags(FLAGS_BOTS, L_ALL,
-                             "Possible Flooder %s on %s target: %s",
-                             get_client_name(source_p, HIDE_IP),
-                             source_p->user->server, target_p->name);
-        target_p->localClient->flood_noticed = 1;
-        /* add a bit of penalty */
-        target_p->localClient->received_number_of_privmsgs += 2;
-      }
-      if (MyClient(source_p) && (p_or_n != NOTICE))
-        sendto_one(source_p,
-                   ":%s NOTICE %s :*** Message to %s throttled due to flooding",
-                   me.name, source_p->name, target_p->name);
-      return 1;
-    }
-    else
-      target_p->localClient->received_number_of_privmsgs++;
-  }
-
-  return 0;
-}
-
-/*
- * flood_attack_channel
- * inputs       - flag 0 if PRIVMSG 1 if NOTICE. RFC
- *                says NOTICE must not auto reply
- *              - pointer to source Client 
- *		- pointer to target channel
- * output	- 1 if target is under flood attack
- * side effects	- check for flood attack on target chptr
- */
-static int
-flood_attack_channel(int p_or_n, struct Client *source_p,
-                     struct Channel *chptr, char *chname)
-{
-  int delta;
-
-  if (GlobalSetOptions.floodcount && !IsConfCanFlood(source_p))
-  {
-    if ((chptr->first_received_message_time + 1) < CurrentTime)
-    {
-      delta = CurrentTime - chptr->first_received_message_time;
-      chptr->received_number_of_privmsgs -= delta;
-      chptr->first_received_message_time = CurrentTime;
-      if (chptr->received_number_of_privmsgs <= 0)
-      {
-        chptr->received_number_of_privmsgs = 0;
-        chptr->flood_noticed = 0;
-      }
-    }
-
-    if ((chptr->received_number_of_privmsgs >= GlobalSetOptions.floodcount)
-        || chptr->flood_noticed)
-    {
-      if (chptr->flood_noticed == 0)
-      {
-        sendto_realops_flags(FLAGS_BOTS, L_ALL,
-                             "Possible Flooder %s on %s target: %s",
-                             get_client_name(source_p, HIDE_IP),
-                             source_p->user->server, chptr->chname);
-        chptr->flood_noticed = 1;
-
-        /* Add a bit of penalty */
-        chptr->received_number_of_privmsgs += 2;
-      }
-      if (MyClient(source_p) && (p_or_n != NOTICE))
-        sendto_one(source_p,
-                   ":%s NOTICE %s :*** Message to %s throttled due to flooding",
-                   me.name, source_p->name, chname);
-      return 1;
-    }
-    else
-      chptr->received_number_of_privmsgs++;
-  }
-
-  return 0;
-}
-
-
-/*
- * handle_special
- *
- * inputs	- server pointer
- *		- client pointer
- *		- nick stuff to grok for opers
- *		- text to send if grok
- * output	- none
- * side effects	- old style username@server is handled here for non opers
- *		  opers are allowed username%hostname@server
- *		  all the traditional oper type messages are also parsed here.
- *		  i.e. "/msg #some.host."
- *		  However, syntax has been changed.
- *		  previous syntax "/msg #some.host.mask"
- *		  now becomes     "/msg $#some.host.mask"
- *		  previous syntax of: "/msg $some.server.mask" remains
- *		  This disambiguates the syntax.
- *
- * XXX		  N.B. dalnet changed it to nick@server as have other servers.
- *		  we will stick with tradition for now.
- *		- Dianora
- */
-static void
-handle_special(int p_or_n, char *command, struct Client *client_p,
-	       struct Client *source_p, char *nick, char *text)
-{
-  struct Client *target_p;
-  char *host;
-  char *server;
-  char *s;
-  int count;
-
-  /*
-   * user[%host]@server addressed?
-   */
-  if ((server = strchr(nick, '@')) != NULL)
-  {
-    count = 0;
-
-    if ((host = strchr(nick, '%')) && !IsOper(source_p))
-    {
-      sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
-		 me.name, source_p->name);
-      return;
-    }
-    if ((target_p = find_server(server + 1)) != NULL)
-    {
-      if (!IsMe(target_p))
-      {
-	/*
-	 * Not destined for a user on me :-(
-	 */
-
-	sendto_one(target_p, ":%s %s %s :%s", source_p->name,
-		   command, nick, text);
-	if ((p_or_n != NOTICE) && source_p->user)
-	  source_p->user->last = CurrentTime;
-	return;
-      }
-
-      *server = '\0';
-
-      if (host != NULL)
-	*host++ = '\0';
-
-      /* Check if someones msg'ing opers@our.server */
-      if (strcmp(nick, "opers") == 0)
-      {
-	if (!IsOper(source_p))
-	  sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
-		     me.name, source_p->name);
-	else
-	  sendto_realops_flags(FLAGS_ALL, L_ALL, "To opers: From: %s: %s",
-			       source_p->name, text);
-	return;
-      }
-
-      /*
-       * Look for users which match the destination host
-       * (no host == wildcard) and if one and one only is
-       * found connected to me, deliver message!
-       */
-      target_p = find_userhost(nick, host, &count);
-
-      if (target_p != NULL)
-      {
-	if (server != NULL)
-	  *server = '@';
-	if (host != NULL)
-	  *--host = '%';
-
-	if (count == 1)
-	{
-	  sendto_one(target_p, ":%s %s %s :%s",
-		     source_p->name, command, nick, text);
-	  if ((p_or_n != NOTICE) && source_p->user)
-	    source_p->user->last = CurrentTime;
-	}
-	else
-	  sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
-		     me.name, source_p->name, nick);
-      }
-    }
-    else if (server && *(server+1) && (target_p == NULL))
-	sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
-		   source_p->name, server+1);
-    else if (server && (target_p == NULL))
-	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-		   source_p->name, nick);
-    return;
-  }
-
-  if (!IsOper(source_p))
-  {
-    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
-	       me.name, source_p->name);
-    return;
-  }
-  /*
-   * the following two cases allow masks in NOTICEs
-   * (for OPERs only)
-   *
-   * Armin, 8Jun90 (gruner@informatik.tu-muenchen.de)
-   */
-  if(*nick == '$')
-  {
-    if((*(nick+1) == '$' || *(nick+1) == '#'))
-      nick++;
-    else if(MyOper(source_p))
-    {
-      sendto_one(source_p, 
-                 ":%s NOTICE %s :The command %s %s is no longer supported, please use $%s",
-		 me.name, source_p->name, command, nick, nick);
-      return;
-    }
-      
-    if ((s = strrchr(nick, '.')) == NULL)
-    {
-      sendto_one(source_p, form_str(ERR_NOTOPLEVEL),
-                 me.name, source_p->name, nick);
-      return;
-    }
-    while (*++s)
-      if (*s == '.' || *s == '*' || *s == '?')
-        break;
-    if (*s == '*' || *s == '?')
-    {
-      sendto_one(source_p, form_str(ERR_WILDTOPLEVEL),
-                 me.name, source_p->name, nick);
-      return;
-    }
-    
-    sendto_match_butone(IsServer(client_p) ? client_p : NULL, source_p,
-                        nick + 1,
-                        (*nick == '#') ? MATCH_HOST : MATCH_SERVER,
-                        "%s $%s :%s", command, nick, text);
-
-    if ((p_or_n != NOTICE) && source_p->user)
-      source_p->user->last = CurrentTime;
-
-    return;
-  }
-
-}
-
-/*
- * find_userhost - find a user@host (server or user).
- * inputs       - user name to look for
- *              - host name to look for
- *		- pointer to count of number of matches found
- * outputs	- pointer to client if found
- *		- count is updated
- * side effects	- none
- *
- */
-static struct Client *
-find_userhost(char *user, char *host, int *count)
-{
-  struct Client *c2ptr;
-  struct Client *res = NULL;
-
-  *count = 0;
-  if (collapse(user) != NULL)
-    {
-      for (c2ptr = GlobalClientList; c2ptr; c2ptr = c2ptr->next) 
-	{
-	  if (!MyClient(c2ptr)) /* implies mine and an user */
-	    continue;
-	  if ((!host || match(host, c2ptr->host)) &&
-	      irccmp(user, c2ptr->username) == 0)
-	    {
-	      (*count)++;
-	      res = c2ptr;
-	    }
-	}
-    }
-  return (res);
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_mode.c ircd-hybrid-fuis/modules/core/m_mode.c
--- ircd-hybrid-7.0rc9/modules/core/m_mode.c	Sun Jul 21 12:17:45 2002
+++ ircd-hybrid-fuis/modules/core/m_mode.c	Wed Dec 31 19:00:00 1969
@@ -1,228 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_mode.c: Sets a user or channel mode.
- *
- *  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_mode.c,v 1.55 2002/07/21 16:17:45 leeh Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "channel_mode.h"
-#include "vchannel.h"
-#include "client.h"
-#include "hash.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "s_user.h"
-#include "s_conf.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "packet.h"
-
-static void m_mode(struct Client*, struct Client*, int, char**);
-
-struct Message mode_msgtab = {
-  "MODE", 0, 0, 2, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_mode, m_mode, m_mode}
-};
-#ifndef STATIC_MODULES
-
-void
-_modinit(void)
-{
-  mod_add_cmd(&mode_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&mode_msgtab);
-}
-
-
-const char *_version = "$Revision: 1.55 $";
-#endif
-/*
- * m_mode - MODE command handler
- * parv[0] - sender
- * parv[1] - channel
- */
-static void m_mode(struct Client *client_p, struct Client *source_p,
-              int parc, char *parv[])
-{
-  struct Channel* chptr=NULL;
-  struct Channel* root;
-  static char     modebuf[MODEBUFLEN];
-  static char     parabuf[MODEBUFLEN];
-  dlink_node	*ptr;
-  int n = 2;
-#ifdef VCHANS
-  struct Channel* vchan;
-#endif
-
-  /* Now, try to find the channel in question */
-  if (!IsChanPrefix(parv[1][0]))
-    {
-      /* if here, it has to be a non-channel name */
-      user_mode(client_p, source_p, parc, parv);
-      return;
-    }
-
-  if (!check_channel_name(parv[1]))
-    { 
-      sendto_one(source_p, form_str(ERR_BADCHANNAME),
-		 me.name, parv[0], (unsigned char *)parv[1]);
-      return;
-    }
-	  
-  chptr = hash_find_channel(parv[1]);
-
-  if (chptr == NULL)
-    {
-      /* if chptr isn't found locally, it =could= exist
-       * on the uplink. So ask.
-       */
-      
-      /* LazyLinks */
-      /* this was segfaulting if we had no servers linked.
-       *  -pro
-       */
-      /* only send a mode upstream if a local client sent this request
-       * -davidt
-       */
-      if (MyClient(source_p) && !ServerInfo.hub && uplink &&
-	   IsCapable(uplink, CAP_LL))
-	{
-#if 0
-	  /* cache the channel if it exists on uplink
-	   * If the channel as seen by the uplink, has vchans,
-	   * the uplink will have to SJOIN all of those.
-	   */
-	  /* Lets not for now -db */
-
-	  sendto_one(uplink, ":%s CBURST %s",
-                     me.name, parv[1]);
-	  
-#endif
-	  sendto_one(uplink, ":%s MODE %s %s",
-		     source_p->name, parv[1], (parv[2] ? parv[2] : ""));
-	  return;
-	}
-      else
-	{
-	  sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-		     me.name, parv[0], parv[1]);
-	  return;
-	}
-    }
-  
-  /* Now known the channel exists */
-
-  root = chptr;
-
-#ifdef VCHANS
-  if ((parc > 2) && parv[2][0] == '!')
-    {
-     struct Client *target_p;
-     if (!(target_p = find_client(++parv[2])))
-       {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
-                   parv[0], root->chname);
-        return;
-       }
-     if ((chptr = map_vchan(root, target_p)) == NULL)
-       {
-        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
-                   parv[0], root->chname);
-        return;
-       }
-     n++;
-    }
-
-  else
-    {
-      if (HasVchans(chptr))
-        {
-          if ((vchan = map_vchan(chptr,source_p)) != NULL)
-            chptr = vchan; /* root = chptr, chptr = vchan */
-
-          /* XXX - else? the user isn't on any vchan, so we
-           *       end up giving them the mode of the root
-           *       channel.  MODE #vchan !nick ? (ugh)
-           */
-        }
-      else if (IsVchan(chptr))
-        {
-          vchan = find_bchan(chptr);
-          root = vchan;  /* root = vchan, chptr = chptr */
-
-          /* XXX - else? the user isn't on any vchan,
-           *       but they asked for MODE ##vchan_12345
-           *       we send MODE #vchan
-           */
-        }
-    }
-#endif
-
-  if (parc < n+1)
-    {
-      channel_modes(chptr, source_p, modebuf, parabuf);
-      sendto_one(source_p, form_str(RPL_CHANNELMODEIS),
-		 me.name, parv[0], parv[1],
-		 modebuf, parabuf);
-      
-      /* Let opers see the "true" TS everyone else see's
-       * the top root chan TS
-       */
-      if (!IsOper(source_p))
-	sendto_one(source_p, form_str(RPL_CREATIONTIME),
-		   me.name, parv[0],
-		   parv[1], root->channelts);
-      else
-	sendto_one(source_p, form_str(RPL_CREATIONTIME),
-		   me.name, parv[0],
-		   parv[1], chptr->channelts);
-    }
-  /* bounce all modes from people we deop on sjoin */
-  else if((ptr = find_user_link(&chptr->deopped, source_p)) == NULL)
-  {
-    /* Finish the flood grace period... */
-    if(MyClient(source_p) && !IsFloodDone(source_p))
-    {
-      if((parc == n) && (parv[n-1][0] == 'b') && (parv[n-1][1] == '\0'))
-        ;
-      else
-        flood_endgrace(source_p);
-    }
-
-    set_channel_mode(client_p, source_p, chptr, parc - n, parv + n, 
-                     root->chname);
-  }
-}
-
-
-
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_nick.c ircd-hybrid-fuis/modules/core/m_nick.c
--- ircd-hybrid-7.0rc9/modules/core/m_nick.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-fuis/modules/core/m_nick.c	Wed Dec 31 19:00:00 1969
@@ -1,1018 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_nick.c: Sets a users nick.
- *
- *  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_nick.c,v 1.100 2003/02/14 23:01:53 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "hash.h"
-#include "fdlist.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "s_conf.h"
-#include "s_stats.h"
-#include "s_user.h"
-#include "hash.h"
-#include "whowas.h"
-#include "s_serv.h"
-#include "send.h"
-#include "list.h"
-#include "channel.h"
-#include "s_log.h"
-#include "resv.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "common.h"
-#include "packet.h"
-
-
-static void mr_nick(struct Client *, struct Client *, int, char**);
-static void m_nick(struct Client *, struct Client *, int, char**);
-static void ms_nick(struct Client *, struct Client *, int, char**);
-
-static void ms_client(struct Client *, struct Client *, int, char**);
-
-static int nick_from_server(struct Client *, struct Client *, int, char **,
-                            time_t, char *);
-static int client_from_server(struct Client *, struct Client *, int, char **,
-                              time_t, char *);
-
-static int check_clean_nick(struct Client *, struct Client *, 
-                            char *, char *, char *);
-static int check_clean_user(struct Client *, char *, char *, char *);
-static int check_clean_host(struct Client *, char *, char *, char *);
-
-static int clean_nick_name(char *);
-static int clean_user_name(char *);
-static int clean_host_name(char *);
-
-static int perform_nick_collides(struct Client *, struct Client *,
-                                 struct Client *, int, char **, time_t, char *);
-                            
-
-struct Message nick_msgtab = {
-  "NICK", 0, 0, 1, 0, MFLG_SLOW, 0,
-  {mr_nick, m_nick, ms_nick, m_nick}
-};
-
-struct Message client_msgtab = {
-  "CLIENT", 0, 0, 10, 0, MFLG_SLOW, 0,
-  {m_ignore, m_ignore, ms_client, m_ignore}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&nick_msgtab);
-  mod_add_cmd(&client_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&nick_msgtab);
-  mod_del_cmd(&client_msgtab);
-}
-
-const char *_version = "$Revision: 1.100 $";
-#endif
-
-/*
- * mr_nick()
- *
- *       parv[0] = sender prefix
- *       parv[1] = nickname
- */
-static void
-mr_nick(struct Client *client_p, struct Client *source_p,
-        int parc, char *parv[])
-{
-  struct   Client *target_p, *uclient_p;
-  char     nick[NICKLEN];
-  char*    s;
-  dlink_node *ptr;
-   
-  if(parc < 2 || BadPtr(parv[1]))
-  {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
-               me.name, BadPtr(parv[0]) ? "*" : parv[0]);
-    return;
-  }
-
-  /* Terminate the nick at the first ~ */
-  if ((s = strchr(parv[1], '~')))
-    *s = '\0';
-                               
-  /* copy the nick and terminate it */
-  strlcpy(nick, parv[1], NICKLEN);
-
-  /* check the nickname is ok */
-  if(!clean_nick_name(nick))
-  {
-    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
-               me.name, BadPtr(parv[0]) ? "*" : parv[0], parv[1]);
-    return;
-  }
-
-  /* check if the nick is resv'd */
-  if(find_nick_resv(nick) &&
-     !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
-  {
-    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
-               me.name, BadPtr(parv[0]) ? "*" : parv[0], nick);
-    return;
-  }
-
-  if ((target_p = find_client(nick)) == NULL)
-  {
-    if(!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
-    {
-      /* We don't know anyone called nick, but our hub might */
-      for(ptr = unknown_list.head; ptr; ptr = ptr->next)
-      {
-        uclient_p = ptr->data;
-
-	if(!strcmp(nick, uclient_p->llname))
-	{
-	
-	  /* We're already waiting for a reply about this nick
-	   * for someone else. */
-
-	  sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
-	  return;
-	}
-      }
-
-      /* Set their llname so we can find them later */
-      strcpy(source_p->llname, nick);
-
-      /* Ask the hub about their requested name */
-      sendto_one(uplink, ":%s NBURST %s %s !%s", me.name, nick,
-                 nick, nick);
-
-      /* wait for LLNICK */
-      return;
-    }
-    else
-    {
-      set_initial_nick(client_p, source_p, nick);
-      return;
-    }
-  }
-  else if(source_p == target_p)
-  {
-    strcpy(source_p->name, nick);
-    return;
-  }
-  else
-  {
-    sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
-  }
-}
-
-/*
- * m_nick()
- *
- *     parv[0] = sender prefix
- *     parv[1] = nickname
- */
- static void
- m_nick(struct Client *client_p, struct Client *source_p,
-	int parc, char *parv[])
-{
-  char     nick[NICKLEN];
-  struct   Client *target_p;
-
-  /* XXX BadPtr is needed */
-  if(parc < 2 || BadPtr(parv[1]))
-  {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
-               me.name, parv[0]);
-    return;
-  }
-
-  /* mark end of grace period, to prevent nickflooding */
-  if(!IsFloodDone(source_p))
-    flood_endgrace(source_p);
-
-  /* terminate nick to NICKLEN */
-  strlcpy(nick, parv[1], NICKLEN);
-
-  /* check the nickname is ok */
-  if(!clean_nick_name(nick))
-  {
-    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
-               me.name, parv[0], nick);
-    return;
-  }
-
-  if(find_nick_resv(nick) &&
-     !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
-  {
-    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
-               me.name, parv[0], nick);
-    return;
-  }
-
-  if ((target_p = find_client(nick)))
-  {
-    /* If(target_p == source_p) the client is changing nicks between
-     * equivalent nicknames ie: [nick] -> {nick}
-     */
-
-    if(target_p == source_p)
-    {
-      /* check the nick isnt exactly the same */
-      if(strcmp(target_p->name, nick))
-      {
-        change_local_nick(client_p, source_p, nick);
-	return;
-      }
-      else
-      {
-        /* client is doing :old NICK old
-	 * ignore it..
-	 */
-        return;
-      }
-    }
-
-    /* if the client that has the nick isnt registered yet (nick but no
-     * user) then drop the unregged client
-     */
-    if(IsUnknown(target_p))
-    {
-      /* the old code had an if(MyConnect(target_p)) here.. but I cant see
-       * how that can happen, m_nick() is local only --fl_
-       */
-      
-      exit_client(NULL, target_p, &me, "Overridden");
-      change_local_nick(client_p, source_p, nick);
-      return;
-    }
-    else
-    {
-      sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name,
-                 parv[0], nick);
-      return;
-    }
-
-  }
-  else
-  {
-    if(!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
-    {
-      /* The uplink might know someone by this name already. */
-      sendto_one(uplink, ":%s NBURST %s %s %s", me.name, nick,
-                 nick, source_p->name);
-      return;
-    }
-    else
-    {
-      change_local_nick(client_p,source_p,nick);
-      return;
-    }
-  }
-}
-
-/*
- * ms_nick()
- *      
- * server -> server nick change
- *    parv[0] = sender prefix
- *    parv[1] = nickname
- *    parv[2] = TS when nick change
- *
- * server introducing new nick
- *    parv[0] = sender prefix
- *    parv[1] = nickname
- *    parv[2] = hop count
- *    parv[3] = TS
- *    parv[4] = umode
- *    parv[5] = username
- *    parv[6] = hostname
- *    parv[7] = server
- *    parv[8] = ircname
- */
-static void
-ms_nick(struct Client *client_p, struct Client *source_p,
-	int parc, char *parv[])
-{
-  struct Client* target_p;
-  char     nick[NICKLEN];
-  time_t   newts = 0;
-
-  /* XXX BadPtr is needed */
-  if(parc < 2 || BadPtr(parv[1]))
-  {
-    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN), me.name, parv[0]);
-    return;
-  }
-
-  /* parc == 3 on nickchange, parc == 9 on new nick */
-  if((IsClient(source_p) && (parc != 3)) || (IsServer(source_p) && (parc != 9)))
-  {
-    char tbuf[BUFSIZE] = { 0 };
-    int j;
-
-    for(j = 0; j < parc; j++)
-    {
-      strcat(tbuf, parv[j]);
-      strcat(tbuf, " ");
-    }
-
-    sendto_realops_flags(FLAGS_ALL, L_ALL,
-                         "Dropping server %s due to (invalid) command 'NICK' "
-                         "with only %d arguments.  (Buf: '%s')",
-                         client_p->name, parc, tbuf);
-    ilog(L_CRIT, "Insufficient parameters (%d) for command 'NICK' from %s.  Buf: %s",
-         parc, client_p->name, tbuf);
-    exit_client(client_p, client_p, client_p, "Not enough arguments to server command.");
-    return;
-  }
-
-  /* fix the length of the nick */
-  strlcpy(nick, parv[1], NICKLEN);
-
-  if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]))
-    return;
-
-  if (parc == 9)
-    {
-      if (check_clean_user(client_p, nick, parv[5], parv[7]) ||
-          check_clean_host(client_p, nick, parv[6], parv[7]))
-        return;
-
-      /* check the length of the clients gecos */
-      if(strlen(parv[8]) > REALLEN)
-        {
-          sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
-                         parv[7], parv[1]);
-          parv[8][REALLEN] = '\0';
-        }
-
-      if (IsServer(source_p))
-        newts = atol(parv[3]);
-    }
-  else
-    {
-      if (!IsServer(source_p))
-        newts = atol(parv[2]);
-    }
-
-  /* if the nick doesnt exist, allow it and process like normal */
-  if (!(target_p = find_client(nick)))
-  {
-    nick_from_server(client_p,source_p,parc,parv,newts,nick);
-    return;
-  }
-
-  /* we're not living in the past anymore, an unknown client is local only. */
-  if(IsUnknown(target_p))
-  {
-    exit_client(NULL, target_p, &me, "Overridden");
-    nick_from_server(client_p,source_p,parc,parv,newts,nick);
-    return;
-  }
-
-  if(target_p == source_p)
-  {
-    if(strcmp(target_p->name, nick))
-    {
-      /* client changing case of nick */
-      nick_from_server(client_p,source_p,parc,parv,newts,nick);
-      return;
-    }
-    else
-      /* client not changing nicks at all */
-      return;
-  }
-
-  perform_nick_collides(source_p, client_p, target_p,
-                        parc, parv, newts, nick);
-			
-
-}
-
-/*
- * ms_client()
- */
-static void
-ms_client(struct Client *client_p, struct Client *source_p,
-	  int parc, char *parv[])
-{
-  struct Client* target_p;
-  char     nick[NICKLEN];
-  time_t   newts = 0;
-  char    *id;
-  char    *name;
-
-  id = parv[8];
-  name = parv[9];
-
-  /* XXX can this happen ? */
-  if (BadPtr(parv[1]))
-    return;
-
-  /* parse the nickname */
-  strlcpy(nick, parv[1], NICKLEN);
-
-  /* check the nicknames, usernames and hostnames are ok */
-  if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]) ||
-     check_clean_user(client_p, nick, parv[5], parv[7]) ||
-     check_clean_host(client_p, nick, parv[6], parv[7]))
-    return;
-
-  /* check length of clients gecos */
-  if (strlen(name) > REALLEN)
-  {
-    sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
-                         parv[0], parv[1]);
-    name[REALLEN] = '\0';			 
-  }
-
-  newts = atol(parv[3]);
- 
-  /* if there is an ID collision, kill our client, and kill theirs.
-   * this may generate 401's, but it ensures that both clients always
-   * go, even if the other server refuses to do the right thing.
-   */
-  if((target_p = find_id(id)))
-  {
-    sendto_realops_flags(FLAGS_ALL, L_ALL,
-		         "ID collision on %s(%s <- %s)(both killed)",
-			 target_p->name, target_p->from->name,
-			 client_p->name);
-
-    if(ServerInfo.hub && IsCapable(client_p, CAP_LL))
-      add_lazylinkclient(client_p, source_p);
-
-    kill_client_ll_serv_butone(NULL, target_p, "%s (ID collision)",
-		               me.name);
-
-    ServerStats->is_kill++;
-	    
-    SetKilled(target_p);
-    exit_client(client_p, target_p, &me, "ID Collision");
-    return;
-  }
-    
-  if (!(target_p = find_client(nick)))
-  {
-    client_from_server(client_p,source_p,parc,parv,newts,nick);
-    return;
-  }
-
-
-  if(IsUnknown(target_p))
-  {
-    exit_client(NULL, target_p, &me, "Overridden");
-    client_from_server(client_p,source_p,parc,parv,newts,nick);
-    return;
-  }
-
-  perform_nick_collides(source_p, client_p, target_p,
-                        parc, parv, newts, nick);
-}			  
-
-
-/* 
- * check_clean_nick()
- * 
- * input	- pointer to source
- *		- nickname
- *		- truncated nickname
- *		- origin of client
- * output	- none
- * side effects - if nickname is erroneous, or a different length to
- *                truncated nickname, return 1
- */
-static int
-check_clean_nick(struct Client *client_p, struct Client *source_p, 
-		 char *nick, char *newnick, char *server)
-{
-  /* the old code did some wacky stuff here, if the nick is invalid, kill it
-   * and dont bother messing at all
-   */
-
-  if(!clean_nick_name(nick) || strcmp(nick, newnick))
-  {
-    ServerStats->is_kill++;
-    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-                         "Bad Nick: %s From: %s(via %s)",
-                         nick, server, client_p->name);
-
-    sendto_one(client_p, ":%s KILL %s :%s (Bad Nickname)",
-               me.name, newnick, me.name);
-
-    /* bad nick change */
-    if(source_p != client_p)
-    {
-      kill_client_ll_serv_butone(client_p, source_p,
-                                 "%s (Bad Nickname)",
-				 me.name);
-      SetKilled(source_p);
-      exit_client(client_p, source_p, &me, "Bad Nickname");
-    }
-
-    return (1);
-  }
-
-  return (0);
-}
-
-/* check_clean_user()
- * 
- * input	- pointer to client sending data
- *              - nickname
- *              - username to check
- *		- origin of NICK
- * output	- none
- * side effects - if username is erroneous, return 1
- */
-static int
-check_clean_user(struct Client *client_p, char *nick, 
-		 char *user, char *server)
-{
-  if(strlen(user) > USERLEN)
-  {
-    ServerStats->is_kill++;
-    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-                         "Long Username: %s Nickname: %s From: %s(via %s)",
-			 user, nick, server, client_p->name);
-
-    sendto_one(client_p, ":%s KILL %s :%s (Bad Username)",
-               me.name, nick, me.name);
-  
-    return (1);
-  }
-
-  if(!clean_user_name(user))
-    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-                         "Bad Username: %s Nickname: %s From: %s(via %s)",
-			 user, nick, server, client_p->name);
-			 
-  return (0);
-}
-
-/* check_clean_host()
- * 
- * input	- pointer to client sending us data
- *              - nickname
- *              - hostname to check
- *		- source name
- * output	- none
- * side effects - if hostname is erroneous, return 1
- */
-static int
-check_clean_host(struct Client *client_p, char *nick,
-		 char *host, char *server)
-{
-  if(strlen(host) > HOSTLEN)
-  {
-    ServerStats->is_kill++;
-    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-                         "Long Hostname: %s Nickname: %s From: %s(via %s)",
-			 host, nick, server, client_p->name);
-
-    sendto_one(client_p, ":%s KILL %s :%s (Bad Hostname)",
-               me.name, nick, me.name);
-
-    return (1);
-  }
-
-  if(!clean_host_name(host))
-    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-                         "Bad Hostname: %s Nickname: %s From: %s(via %s)",
-			 host, nick, server, client_p->name);
-
-  return (0);
-}
-
-/* clean_nick_name()
- *
- * input	- nickname
- * output	- none
- * side effects - walks through the nickname, returning 0 if erroneous
- */
-static int
-clean_nick_name(char *nick)
-{
-  assert(nick);
-  if(nick == NULL)
-    return (0);
-
-  /* nicks cant start with a digit or - or be 0 length */
-  /* This closer duplicates behaviour of hybrid-6 */
-
-  if (*nick == '-' || IsDigit(*nick) || *nick == '\0')
-    return (0);
-
-  for(; *nick; nick++)
-  {
-    if(!IsNickChar(*nick))
-      return (0);
-  }
-
-  return (1);
-}
-
-/* clean_user_name()
- *
- * input	- username
- * output	- none
- * side effects - walks through the username, returning 0 if erroneous
- */
-static int
-clean_user_name(char *user)
-{
-  assert(user);
-  if(user == NULL)
-    return 0;
-    
-  for(; *user; user++)
-  {
-    if(!IsUserChar(*user))
-      return 0;
-    
-  }
-
-  return 1;
-}
-
-/* clean_host_name()
- * input	- hostname
- * output	- none
- * side effects - walks through the hostname, returning 0 if erroneous
- */
-static int
-clean_host_name(char *host)
-{
-  assert(host);
-  if(host == NULL)
-    return 0;
-  for(; *host; host++)
-  {
-    if(!IsHostChar(*host))
-      return 0;
-  }
-
-  return 1;
-}
-
-
-/*
- * nick_from_server()
- */
-static int
-nick_from_server(struct Client *client_p, struct Client *source_p, int parc,
-                 char *parv[], time_t newts,char *nick)
-{
-  if(IsServer(source_p))
-  {
-    /* A server introducing a new client, change source */
-    source_p = make_client(client_p);
-    add_client_to_list(source_p);
-
-    /* We don't need to introduce leafs clients back to them! */
-    if (ConfigFileEntry.hub && IsCapable(client_p, CAP_LL))
-      add_lazylinkclient(client_p, source_p);
-
-    if(parc > 2)
-      source_p->hopcount = atoi(parv[2]);
-    if(newts)
-      source_p->tsinfo = newts;
-    else
-    {
-      newts = source_p->tsinfo = CurrentTime;
-      ts_warn("Remote nick %s (%s) introduced without a TS", nick, parv[0]);
-    }
-
-    /* copy the nick in place */
-    (void)strcpy(source_p->name, nick);
-    (void)add_to_client_hash_table(nick, source_p);
-
-    if (parc > 8)
-    {
-       int   flag;
-       char *m;
-
-       /* parse usermodes */
-       m = &parv[4][1];
-       while (*m)
-       {
-         flag = user_modes_from_c_to_bitmask[(unsigned char)*m];
-	 if(!(source_p->umodes & FLAGS_INVISIBLE) && (flag & FLAGS_INVISIBLE))
-	   Count.invisi++;
-	 if(!(source_p->umodes & FLAGS_OPER) && (flag & FLAGS_OPER))
-	   Count.oper++;
-
-	 source_p->umodes |= flag & SEND_UMODES;
-	 m++;
-      }
-
-      return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                            parv[7], parv[8], NULL);
-    }
-  }
-  else if(source_p->name[0])
-  {
-    /* client changing their nick */
-    if(irccmp(parv[0], nick))
-      source_p->tsinfo = newts ? newts : CurrentTime;
-
-    sendto_common_channels_local(source_p, 1,
-                                 ":%s!%s@%s NICK :%s",
-                                 source_p->name,source_p->username,source_p->host,
-                                 nick);
-
-    if (source_p->user)
-    {
-      add_history(source_p,1);
-      sendto_server(client_p, source_p, NULL, NOCAPS, NOCAPS, NOFLAGS,
-                    ":%s NICK %s :%lu",
-		      parv[0], nick, (unsigned long) source_p->tsinfo);
-    }
-  }
-
-  /* set the new nick name */
-  if(source_p->name[0])
-    del_from_client_hash_table(source_p->name, source_p);
-
-  strcpy(source_p->name, nick);
-  add_to_client_hash_table(nick, source_p);
-
-  /* remove all accepts pointing to the client */
-  del_all_accepts(source_p);
-
-  return 0;
-}
-
-
-/*
- * client_from_server()
- */
-static int
-client_from_server(struct Client *client_p, struct Client *source_p, int parc,
-                   char *parv[], time_t newts,char *nick)
-{
-  char *name;
-  char *id;
-  int flag;
-  char *m;
-
-  id = parv[8];
-  name = parv[9];
-
-  source_p = make_client(client_p);
-  add_client_to_list(source_p);
-
-  /* We don't need to introduce leafs clients back to them! */
-  if (ConfigFileEntry.hub && IsCapable(client_p, CAP_LL))
-    add_lazylinkclient(client_p, source_p);
-
-  source_p->hopcount = atoi(parv[2]);
-  source_p->tsinfo = newts;
-
-  /* copy the nick in place */
-  (void)strcpy(source_p->name, nick);
-  (void)add_to_client_hash_table(nick, source_p);
-  add_to_id_hash_table(id, source_p);
-
-  /* parse usermodes */
-  m = &parv[4][1];
-  while (*m)
-  {
-    flag = user_modes_from_c_to_bitmask[(unsigned char)*m];
-    if(flag & FLAGS_INVISIBLE)
-      Count.invisi++;
-    if(flag & FLAGS_OPER)
-      Count.oper++;
-
-    source_p->umodes |= flag & SEND_UMODES;
-    m++;
-
-  }
-
-  return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                        parv[7], name, id);
-}			
-  
-static int 
-perform_nick_collides(struct Client *source_p, struct Client *client_p, 
-                      struct Client *target_p, int parc, char *parv[], 
-		      time_t newts, char *nick)
-{
-  int sameuser;
-  
-  /* server introducing new nick */
-  if(IsServer(source_p))
-  {
-    /* if we dont have a ts, or their TS's are the same, kill both */
-    if(!newts || !target_p->tsinfo ||
-       (newts == target_p->tsinfo))
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-                           "Nick collision on %s(%s <- %s)(both killed)",
-			   target_p->name, target_p->from->name,
-			   client_p->name);
-      
-      if(ServerInfo.hub && IsCapable(client_p,CAP_LL))
-        add_lazylinkclient(client_p, target_p);
-
-      kill_client_ll_serv_butone(NULL, target_p,
-                                 "%s (Nick collision (new))",
-				 me.name);
-      ServerStats->is_kill++;
-      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
-                 me.name, target_p->name, target_p->name);
-
-      SetKilled(target_p);
-      exit_client(client_p, target_p, &me, "Nick collision (new)");
-      return 0;
-    }
-    /* the timestamps are different */
-    else
-    {
-      sameuser = (target_p->user) && !irccmp(target_p->username, parv[5])
-                 && !irccmp(target_p->host, parv[6]);
-   
-      /* if the users are the same (loaded a client on a different server)
-       * and the new users ts is older, or the users are different and the
-       * new users ts is newer, ignore the new client and let it do the kill
-       */
-      if ((sameuser && newts < target_p->tsinfo) ||
-         (!sameuser && newts > target_p->tsinfo))
-      {
-        client_burst_if_needed(client_p, target_p);
-	return 0;
-      }
-      else
-      {
-        if(sameuser)
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-	                  "Nick collision on %s(%s <- %s)(older killed)",
-			  target_p->name, target_p->from->name,
-			  client_p->name);
-        else
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-	                  "Nick collision on %s(%s <- %s)(newer killed)",
-			  target_p->name, target_p->from->name,
-			  client_p->name);
-
-        ServerStats->is_kill++;
-	sendto_one(target_p, form_str(ERR_NICKCOLLISION),
-	           me.name, target_p->name, target_p->name);
-
-        /* if it came from a LL server, itd have been source_p,
-	 * so we dont need to mark target_p as known
-	 */
-	kill_client_ll_serv_butone(source_p, target_p,
-	                           "%s (Nick collision (new))",
-				   me.name);
-
-        SetKilled(target_p);
-	exit_client(client_p, target_p, &me, "Nick collision");
-	
-	if(parc == 9)
-	  nick_from_server(client_p,source_p,parc,parv,newts,nick);
-	else if(parc == 10)
-	  client_from_server(client_p,source_p,parc,parv,newts,nick);
-	  
-	return 0;
-      }
-    }
-  }
-
-  /* its a client changing nick and causing a collide */
-  if(!newts || !target_p->tsinfo || (newts == target_p->tsinfo) ||
-       !source_p->user)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-                 "Nick change collision from %s to %s(%s <- %s)(both killed)",
-		 source_p->name, target_p->name, target_p->from->name,
-		 client_p->name);
-    
-      ServerStats->is_kill++;
-      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
-                 me.name, target_p->name, target_p->name);
-
-      /* if we got the message from a LL, it knows about source_p */
-      kill_client_ll_serv_butone(NULL, source_p,
-                                  "%s (Nick change collision)",
-				  me.name);
-
-      ServerStats->is_kill++;
-      /* If we got the message from a LL, ensure it gets the kill */
-      if(ServerInfo.hub && IsCapable(client_p,CAP_LL))
-        add_lazylinkclient(client_p, target_p);
-
-      kill_client_ll_serv_butone(NULL, target_p,
-                                 "%s (Nick change collision)",
-				 me.name);
-
-      SetKilled(target_p);
-      exit_client(NULL, target_p, &me, "Nick collision(new)");
-      SetKilled(source_p);
-      exit_client(client_p, source_p, &me, "Nick collision(old)");
-      return 0;
-    }
-    else
-    {
-      sameuser = !irccmp(target_p->username, source_p->username) &&
-                 !irccmp(target_p->host, source_p->host);
-
-      if ((sameuser && newts < target_p->tsinfo) ||
-          (!sameuser && newts > target_p->tsinfo))
-      {
-        if(sameuser)
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
- 	       "Nick change collision from %s to %s(%s <- %s)(older killed)",
-	       source_p->name, target_p->name, target_p->from->name,
-	       client_p->name);
-        else
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-	       "Nick change collision from %s to %s(%s <- %s)(newer killed)",
-	       source_p->name, target_p->name, target_p->from->name,
-	       client_p->name);
-
-        ServerStats->is_kill++;
-
-	/* this won't go back to the incoming link, so LL doesnt matter */
-        kill_client_ll_serv_butone(client_p, source_p,
-	                           "%s (Nick change collision)",
-				   me.name);
-
-        SetKilled(source_p);
-	
-	if(sameuser)
-	  exit_client(client_p, source_p, &me, "Nick collision(old)");
-	else
-	  exit_client(client_p, source_p, &me, "Nick collision(new)");
-	return 0;
-     }
-     else
-     {
-       if(sameuser)
-         sendto_realops_flags(FLAGS_ALL, L_ALL,
-	                      "Nick collision on %s(%s <- %s)(older killed)",
-			      target_p->name, target_p->from->name,
-			      client_p->name);
-       else
-         sendto_realops_flags(FLAGS_ALL, L_ALL,
-	                      "Nick collision on %s(%s <- %s)(newer killed)",
-			      target_p->name, target_p->from->name,
-			      client_p->name);
-  			      
-       kill_client_ll_serv_butone(source_p, target_p,
-                                 "%s (Nick collision)",
-				 me.name);
-
-       ServerStats->is_kill++;
-       sendto_one(target_p, form_str(ERR_NICKCOLLISION),
-                  me.name, target_p->name, target_p->name);
-
-       SetKilled(target_p);
-       exit_client(client_p, target_p, &me, "Nick collision");
-     }
-   }
-
-   /*
-   if(HasID(source_p))
-     client_from_server(client_p,source_p,parc,parv,newts,nick);
-   else
-   */
-   
-   /* we should only ever call nick_from_server() here, as
-    * this is a client changing nick, not a new client
-    */
-   nick_from_server(client_p,source_p,parc,parv,newts,nick);
-
-  return 0;
-}
-
-	    
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_part.c ircd-hybrid-fuis/modules/core/m_part.c
--- ircd-hybrid-7.0rc9/modules/core/m_part.c	Thu Feb  6 03:46:06 2003
+++ ircd-hybrid-fuis/modules/core/m_part.c	Wed Dec 31 19:00:00 1969
@@ -1,200 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_part.c: Parts a user from a channel.
- *
- *  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_part.c,v 1.63 2003/02/06 08:46:06 a1kmm Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "vchannel.h"
-#include "client.h"
-#include "common.h"  
-#include "hash.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "list.h"
-#include "numeric.h"
-#include "send.h"
-#include "s_serv.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "s_conf.h"
-#include "packet.h"
-
-static void m_part(struct Client*, struct Client*, int, char**);
-void check_spambot_warning(struct Client *source_p, const char *name);
-
-struct Message part_msgtab = {
-  "PART", 0, 0, 2, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_part, m_part, m_part}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&part_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&part_msgtab);
-}
-const char *_version = "$Revision: 1.63 $";
-#endif
-
-static void part_one_client(struct Client *client_p,
-			    struct Client *source_p,
-			    char *name, char *reason);
-
-/*
-** m_part
-**      parv[0] = sender prefix
-**      parv[1] = channel
-**      parv[2] = reason
-*/
-static void
-m_part(struct Client *client_p, struct Client *source_p,
-       int parc, char *parv[])
-{
-  char  *p, *name;
-  char reason[TOPICLEN+1];
-
-  if (*parv[1] == '\0')
-    {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-                 me.name, parv[0], "PART");
-      return;
-    }
-
-  reason[0] = '\0';
-
-  if (parc > 2)
-    strlcpy(reason, parv[2], TOPICLEN);
-
-  name = strtoken( &p, parv[1], ",");
-
-  /* Finish the flood grace period... */
-  if(MyClient(source_p) && !IsFloodDone(source_p))
-    flood_endgrace(source_p);
-
-  while(name)
-  {
-    part_one_client(client_p, source_p, name, reason);
-    name = strtoken(&p, (char *)NULL, ",");
-  }
-  return;
-}
-
-/*
- * part_one_client
- *
- * inputs	- pointer to server
- * 		- pointer to source client to remove
- *		- char pointer of name of channel to remove from
- * output	- none
- * side effects	- remove ONE client given the channel name 
- */
-static void
-part_one_client(struct Client *client_p, struct Client *source_p,
-                char *name, char *reason)
-{
-  struct Channel *chptr;
-  struct Channel *bchan;
-
-  if ((chptr = hash_find_channel(name)) == NULL)
-    {
-      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
-		 me.name, source_p->name, name);
-      return;
-    }
-
-#ifdef VCHANS
-  if (IsVchan(chptr) || HasVchans(chptr))
-    {
-      if(HasVchans(chptr))
-        {
-          /* Set chptr to actual channel, bchan to the base channel */
-          bchan = chptr;
-          chptr = map_vchan(bchan,source_p);
-        }
-      else
-        {
-          /* chptr = chptr; */
-          bchan = find_bchan(chptr);
-        }
-    }
-  else
-#endif
-    bchan = chptr; /* not a vchan */
-
-  if (!chptr || !bchan || !IsMember(source_p, chptr))
-    {
-      sendto_one(source_p, form_str(ERR_NOTONCHANNEL),
-                 me.name, source_p->name, name);
-      return;
-    }
-  if (MyConnect(source_p) && !IsOper(source_p))
-    check_spambot_warning(source_p, NULL);
-  
-  /*
-   *  Remove user from the old channel (if any)
-   *  only allow /part reasons in -m chans
-   */
-  if (reason[0] &&
-      (is_any_op(chptr, source_p) || !MyConnect(source_p) ||
-       ((can_send(chptr, source_p) > 0 && 
-         (source_p->firsttime + ConfigFileEntry.anti_spam_exit_message_time)
-         < CurrentTime))))
-  {
-    sendto_server(client_p, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
-                  ":%s PART %s :%s", ID(source_p), chptr->chname,
-                  reason);
-    sendto_server(client_p, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
-                  ":%s PART %s :%s", source_p->name, chptr->chname,
-                  reason);
-    sendto_channel_local(ALL_MEMBERS,
-                         chptr, ":%s!%s@%s PART %s :%s",
-                         source_p->name,
-                         source_p->username,
-                         source_p->host,
-                         bchan->chname,
-                         reason);
-  }
-  else
-  {
-    sendto_server(client_p, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
-                  ":%s PART %s", ID(source_p), chptr->chname);
-    sendto_server(client_p, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
-                  ":%s PART %s", source_p->name, chptr->chname);
-    sendto_channel_local(ALL_MEMBERS,
-                         chptr, ":%s!%s@%s PART %s",
-                         source_p->name,
-                         source_p->username,
-                         source_p->host,
-                         bchan->chname);
-  }
-  remove_user_from_channel(chptr, source_p);
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_quit.c ircd-hybrid-fuis/modules/core/m_quit.c
--- ircd-hybrid-7.0rc9/modules/core/m_quit.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-fuis/modules/core/m_quit.c	Wed Dec 31 19:00:00 1969
@@ -1,113 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_quit.c: Makes a user quit from IRC.
- *
- *  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_quit.c,v 1.28 2003/02/14 23:01:53 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "s_serv.h"
-#include "send.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "s_conf.h"
-
-static void m_quit(struct Client*, struct Client*, int, char**);
-static void ms_quit(struct Client*, struct Client*, int, char**);
-
-struct Message quit_msgtab = {
-  "QUIT", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0,
-  {m_quit, m_quit, ms_quit, m_quit}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&quit_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&quit_msgtab);
-}
-
-const char *_version = "$Revision: 1.28 $";
-#endif
-/*
-** m_quit
-**      parv[0] = sender prefix
-**      parv[1] = comment
-*/
-static void
-m_quit(struct Client *client_p, struct Client *source_p,
-       int parc, char *parv[])
-{
-  char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
-  char reason [TOPICLEN + 1];
-
-  source_p->flags |= FLAGS_NORMALEX;
-  if (strlen(comment) > (size_t) TOPICLEN)
-    comment[TOPICLEN] = '\0';
-
-  if (ConfigFileEntry.client_exit && comment[0])
-    {
-#ifndef VMS
-      snprintf(reason, TOPICLEN, "Quit: %s", comment);
-#else
-      sprintf(reason, "Quit: %s", comment);
-#endif
-      comment = reason;
-    }
-  
-  if(!IsOper(source_p) && 
-     (source_p->firsttime + ConfigFileEntry.anti_spam_exit_message_time)
-     > CurrentTime)
-    {
-      comment = "Client Quit";
-    }
-
-  exit_client(client_p, source_p, source_p, comment);
-}
-
-/*
-** ms_quit
-**      parv[0] = sender prefix
-**      parv[1] = comment
-*/
-static void
-ms_quit(struct Client *client_p, struct Client *source_p,
-	int parc, char *parv[])
-{
-  char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
-
-  source_p->flags |= FLAGS_NORMALEX;
-  if (strlen(comment) > (size_t) TOPICLEN)
-    comment[TOPICLEN] = '\0';
-
-  exit_client(client_p, source_p, source_p, comment);
-}
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_server.c ircd-hybrid-fuis/modules/core/m_server.c
--- ircd-hybrid-7.0rc9/modules/core/m_server.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-fuis/modules/core/m_server.c	Wed Dec 31 19:00:00 1969
@@ -1,655 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_server.c: Introduces a server.
- *
- *  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_server.c,v 1.92 2003/02/14 23:01:53 db Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"  /* m_server prototype */
-#include "client.h"      /* client struct */
-#include "common.h"      /* TRUE bleah */
-#include "event.h"
-#include "hash.h"        /* add_to_client_hash_table */
-#include "irc_string.h" 
-#include "ircd.h"        /* me */
-#include "list.h"        /* make_server */
-#include "numeric.h"     /* ERR_xxx */
-#include "s_conf.h"      /* struct ConfItem */
-#include "s_log.h"       /* log level defines */
-#include "s_serv.h"      /* server_estab, check_server, my_name_for_link */
-#include "s_stats.h"     /* ServerStats */
-#include "scache.h"      /* find_or_add */
-#include "send.h"        /* sendto_one */
-#include "motd.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-
-
-static void mr_server(struct Client*, struct Client*, int, char **);
-static void ms_server(struct Client*, struct Client*, int, char **);
-
-static int set_server_gecos(struct Client *, char *);
-
-struct Message server_msgtab = {
-  "SERVER", 0, 0, 4, 0, MFLG_SLOW | MFLG_UNREG, 0,
-  {mr_server, m_registered, ms_server, m_registered}
-};
-
-#ifndef STATIC_MODULES
-void 
-_modinit(void)
-{
-  mod_add_cmd(&server_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&server_msgtab);
-}
-const char *_version = "$Revision: 1.92 $";
-#endif
-
-int bogus_host(char *host);
-struct Client *server_exists(char *);
-
-/*
- * mr_server - SERVER message handler
- *      parv[0] = sender prefix
- *      parv[1] = servername
- *      parv[2] = serverinfo/hopcount
- *      parv[3] = serverinfo
- */
-static void mr_server(struct Client *client_p, struct Client *source_p,
-                      int parc, char *parv[])
-{
-  char             info[REALLEN + 1];
-  char             *name;
-  struct Client    *target_p;
-  int hop;
-
-  if (parc < 4)
-  {
-    sendto_one(client_p,"ERROR :No servername");
-    exit_client(client_p, client_p, client_p, "Wrong number of args");
-    return;
-  }
-
-  name = parv[1];
-  hop = atoi(parv[2]);
-  strlcpy(info, parv[3], REALLEN);
-
-  /* 
-   * Reject a direct nonTS server connection if we're TS_ONLY -orabidoo
-   */
-  if (!DoesTS(client_p))
-  {
-    sendto_realops_flags(FLAGS_ALL, L_ADMIN,"Link %s dropped, non-TS server",
-			 get_client_name(client_p, HIDE_IP));
-    sendto_realops_flags(FLAGS_ALL, L_OPER,"Link %s dropped, non-TS server",
-			 get_client_name(client_p, MASK_IP));
-    exit_client(client_p, client_p, client_p, "Non-TS server");
-    return;
-  }
-
-  if (bogus_host(name))
-  {
-    exit_client(client_p, client_p, client_p, "Bogus server name");
-    return;
-  }
-
-  /* Now we just have to call check_server and everything should be
-   * check for us... -A1kmm. */
-  switch (check_server(name, client_p, CHECK_SERVER_NOCRYPTLINK))
-  {
-    case -1:
-      if (ConfigFileEntry.warn_no_nline)
-      {
-        sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-           "Unauthorized server connection attempt from %s: No entry for "
-           "servername %s", get_client_name(client_p, HIDE_IP), name);
-
-        sendto_realops_flags(FLAGS_ALL, L_OPER,
-           "Unauthorized server connection attempt from %s: No entry for "
-           "servername %s", get_client_name(client_p, MASK_IP), name);
-      }
-      
-      exit_client(client_p, client_p, client_p, "Invalid servername.");
-      return;
-      /* NOT REACHED */
-      break;
-      
-    case -2:
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-           "Unauthorized server connection attempt from %s: Bad password "
-           "for server %s", get_client_name(client_p, HIDE_IP), name);
-
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-           "Unauthorized server connection attempt from %s: Bad password "
-           "for server %s", get_client_name(client_p, MASK_IP), name);
-
-      exit_client(client_p, client_p, client_p, "Invalid password.");
-      return;
-      /* NOT REACHED */
-      break;
-      
-    case -3:
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-           "Unauthorized server connection attempt from %s: Invalid host "
-           "for server %s", get_client_name(client_p, HIDE_IP), name);
-
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-           "Unauthorized server connection attempt from %s: Invalid host "
-           "for server %s", get_client_name(client_p, MASK_IP), name);
-
-      exit_client(client_p, client_p, client_p, "Invalid host.");
-      return;
-      /* NOT REACHED */
-      break;
-    
-    /* servername is > HOSTLEN */
-    case -4:
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-                           "Invalid servername %s from %s",
-			   name, get_client_name(client_p, HIDE_IP));
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-		           "Invalid servername %s from %s",
-			   name, get_client_name(client_p, MASK_IP));
-
-      exit_client(client_p, client_p, client_p, "Invalid servername.");
-      return;
-      /* NOT REACHED */
-      break;
-  }
-    
-  if ((target_p = server_exists(name)))
-    {
-      /*
-       * This link is trying feed me a server that I already have
-       * access through another path -- multiple paths not accepted
-       * currently, kill this link immediately!!
-       *
-       * Rather than KILL the link which introduced it, KILL the
-       * youngest of the two links. -avalon
-       *
-       * Definitely don't do that here. This is from an unregistered
-       * connect - A1kmm.
-       */
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-         "Attempt to re-introduce server %s from %s", name,
-         get_client_name(client_p, HIDE_IP));
-
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-         "Attempt to re-introduce server %s from %s", name,
-         get_client_name(client_p, MASK_IP));
-
-      sendto_one(client_p, "ERROR :Server already exists.");
-      exit_client(client_p, client_p, client_p, "Server Exists");
-      return;
-    }
-
-  if(ServerInfo.hub && IsCapable(client_p, CAP_LL))
-    {
-      if(IsCapable(client_p, CAP_HUB))
-        {
-          ClearCap(client_p,CAP_LL);
-          sendto_realops_flags(FLAGS_ALL, L_ALL,
-               "*** LazyLinks to a hub from a hub, thats a no-no.");
-        }
-      else
-        {
-          client_p->localClient->serverMask = nextFreeMask();
-
-          if(!client_p->localClient->serverMask)
-            {
-              sendto_realops_flags(FLAGS_ALL, L_ALL,
-                                   "serverMask is full!");
-              /* try and negotiate a non LL connect */
-              ClearCap(client_p,CAP_LL);
-            }
-        }
-    }
-  else if (IsCapable(client_p, CAP_LL))
-    {
-      if(!IsCapable(client_p, CAP_HUB))
-        {
-          ClearCap(client_p,CAP_LL);
-          sendto_realops_flags(FLAGS_ALL, L_ALL,
-               "*** LazyLinks to a leaf from a leaf, thats a no-no.");
-        }
-    }
-
-  /*
-   * if we are connecting (Handshake), we already have the name from the
-   * C:line in client_p->name
-   */
-
-  strlcpy(client_p->name, name, HOSTLEN+1);
-  set_server_gecos(client_p, info);
-  client_p->hopcount = hop;
-  server_estab(client_p);
-}
-
-/*
- * ms_server - SERVER message handler
- *      parv[0] = sender prefix
- *      parv[1] = servername
- *      parv[2] = serverinfo/hopcount
- *      parv[3] = serverinfo
- */
-static void ms_server(struct Client *client_p, struct Client *source_p,
-                      int parc, char *parv[])
-{
-  char             info[REALLEN + 1];
-                   /* same size as in s_misc.c */
-  char*            name;
-  struct Client*   target_p;
-  struct Client*   bclient_p;
-  struct ConfItem* aconf;
-  int              hop;
-  int              hlined = 0;
-  int              llined = 0;
-  dlink_node	   *ptr;
-
-  /* Just to be sure -A1kmm. */
-  if (!IsServer(source_p))
-   return;
-
-  if (parc < 4)
-    {
-      sendto_one(client_p,"ERROR :No servername");
-      return;
-    }
-
-  name = parv[1];
-  hop = atoi(parv[2]);
-  strlcpy(info, parv[3], REALLEN);
-
-  if ((target_p = server_exists(name)))
-    {
-      /*
-       * This link is trying feed me a server that I already have
-       * access through another path -- multiple paths not accepted
-       * currently, kill this link immediately!!
-       *
-       * Rather than KILL the link which introduced it, KILL the
-       * youngest of the two links. -avalon
-       *
-       * I think that we should exit the link itself, not the introducer,
-       * and we should always exit the most recently received(i.e. the
-       * one we are receiving this SERVER for. -A1kmm
-       *
-       * You *cant* do this, if you link somewhere, it bursts you a server
-       * that already exists, then sends you a client burst, you squit the
-       * server, but you keep getting the burst of clients on a server that
-       * doesnt exist, although ircd can handle it, its not a realistic
-       * solution.. --fl_ 
-       */
-      /* It is behind a host-masked server. Completely ignore the
-       * server message(don't propagate or we will delink from whoever
-       * we propagate to). -A1kmm */
-      if (irccmp(target_p->name, name) && target_p->from==client_p)
-        return;
-
-      sendto_one(client_p, "ERROR :Server %s already exists", name);
-	
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-	                   "Link %s cancelled, server %s already exists",
-		 	   get_client_name(client_p, SHOW_IP), name);
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-	                   "Link %s cancelled, server %s already exists",
-		 	   client_p->name, name);
-      
-      exit_client(client_p, client_p, &me, "Server Exists");
-      return;
-    }
-  
-  /* 
-   * User nicks never have '.' in them and server names
-   * must always have '.' in them.
-   */
-  if (strchr(name,'.') == NULL)
-    {
-      /*
-       * Server trying to use the same name as a person. Would
-       * cause a fair bit of confusion. Enough to make it hellish
-       * for a while and servers to send stuff to the wrong place.
-       */
-      sendto_one(client_p,"ERROR :Nickname %s already exists!", name);
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-			   "Link %s cancelled: Server/nick collision on %s",
-		/* inpath */ get_client_name(client_p, HIDE_IP), name);
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-          "Link %s cancelled: Server/nick collision on %s",
-	  get_client_name(client_p, MASK_IP), name);
-      exit_client(client_p, client_p, client_p, "Nick as Server");
-      return;
-    }
-
-  /*
-   * Server is informing about a new server behind
-   * this link. Create REMOTE server structure,
-   * add it to list and propagate word to my other
-   * server links...
-   */
-  if (parc == 1 || info[0] == '\0')
-    {
-      sendto_one(client_p, "ERROR :No server info specified for %s", name);
-      return;
-    }
-
-  /*
-   * See if the newly found server is behind a guaranteed
-   * leaf. If so, close the link.
-   *
-   */
-
-  for (aconf = ConfigItemList; aconf; aconf=aconf->next)
-    {
-     if ((aconf->status & (CONF_LEAF|CONF_HUB)) == 0)
-       continue;
-
-     if (match(aconf->name, client_p->name))
-       {
-        if (aconf->status == CONF_HUB)
-	  {
-	    if(match(aconf->host, name))
-	      hlined++;
-	  }
-        else if (aconf->status == CONF_LEAF)
-	  {
-	    if(match(aconf->host, name))
-	      llined++;
-	  }
-       }
-    }
-
-  /* Ok, this way this works is
-   *
-   * A server can have a CONF_HUB allowing it to introduce servers
-   * behind it.
-   *
-   * connect {
-   *            name = "irc.bighub.net";
-   *            hub_mask="*";
-   *            ...
-   * 
-   * That would allow "irc.bighub.net" to introduce anything it wanted..
-   *
-   * However
-   *
-   * connect {
-   *            name = "irc.somehub.fi";
-   *		hub_mask="*";
-   *		leaf_mask="*.edu";
-   *...
-   * Would allow this server in finland to hub anything but
-   * .edu's
-   */
-
-  /* Ok, check client_p can hub the new server, and make sure it's not a LL */
-  if (!hlined || (IsCapable(client_p, CAP_LL) && !IsCapable(client_p, CAP_HUB)))
-    {
-      /* OOOPs nope can't HUB */
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN, "Non-Hub link %s introduced %s.",
-                get_client_name(client_p, HIDE_IP), name);
-
-      sendto_realops_flags(FLAGS_ALL, L_OPER,
-          "Non-Hub link %s introduced %s.",
-	  get_client_name(client_p, MASK_IP), name);
-
-      exit_client(NULL, source_p, &me, "No matching hub_mask.");
-      return;
-    }
-
-  /* Check for the new server being leafed behind this HUB */
-  if (llined)
-    {
-      /* OOOPs nope can't HUB this leaf */
-      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
-            "Link %s introduced leafed server %s.",
-	    get_client_name(client_p, HIDE_IP), name);
-      sendto_realops_flags(FLAGS_ALL, L_OPER, 
-            "Link %s introduced leafed server %s.",
-            client_p->name, name);
-      /* If it is new, we are probably misconfigured, so split the
-       * non-hub server introducing this. Otherwise, split the new
-       * server. -A1kmm.
-       */
-      /* wastes too much bandwidth, generates too many errors on
-       * larger networks, dont bother. --fl_
-       */
-#if 0
-      if ((CurrentTime - source_p->firsttime) < 20)
-        {
-          exit_client(NULL, source_p, &me, "Leafed Server.");
-          return;
-        }
-      else
-        {
-          sendto_one(source_p, ":%s SQUIT %s :Sorry, Leafed server.",
-                     me.name, name);
-          return;
-        }
-#endif
-
-      exit_client(NULL, client_p, &me, "Leafed Server.");
-      return;
-    }
-  
-
-
-  if(strlen(name) > HOSTLEN)
-  {
-    sendto_realops_flags(FLAGS_ALL, L_ADMIN,
- 		         "Link %s introduced server with invalid servername %s",
-		         get_client_name(client_p, HIDE_IP), name);
-    sendto_realops_flags(FLAGS_ALL, L_OPER,
-		         "Link %s introduced server with invalid servername %s",
-			 client_p->name, name);
-    
-    exit_client(NULL, client_p, &me, "Invalid servername introduced.");
-    return;
-  }
-
-  target_p = make_client(client_p);
-  make_server(target_p);
-  target_p->hopcount = hop;
-
-  strlcpy(target_p->name, name, HOSTLEN+1);
-  
-  set_server_gecos(target_p, info);
-
-  target_p->serv->up = find_or_add(parv[0]);
-  target_p->servptr = source_p;
-
-  SetServer(target_p);
-
-  Count.server++;
-
-  add_client_to_list(target_p);
-  add_server_to_list(target_p);
-  add_to_client_hash_table(target_p->name, target_p);
-  add_client_to_llist(&(target_p->servptr->serv->servers), target_p);
-
-
-  /*
-   * Old sendto_serv_but_one() call removed because we now
-   * need to send different names to different servers
-   * (domain name matching)
-   */
-  for (ptr = serv_list.head; ptr; ptr = ptr->next)
-    {
-      bclient_p = ptr->data;
-
-      if (bclient_p == client_p)
-	continue;
-      if (!(aconf = bclient_p->serv->sconf))
-	{
-	  sendto_realops_flags(FLAGS_ALL, L_ADMIN, 
-	        "Lost N-line for %s on %s. Closing",
-		get_client_name(client_p, HIDE_IP), name);
-	  sendto_realops_flags(FLAGS_ALL, L_OPER, 
-	        "Lost N-line for %s on %s. Closing",
-		get_client_name(client_p, MASK_IP), name);
-	  exit_client(client_p, client_p, client_p, "Lost connect{} block");
-          return;
-	}
-      if (match(my_name_for_link(me.name, aconf), target_p->name))
-	continue;
-
-      sendto_one(bclient_p, ":%s SERVER %s %d :%s%s",
-		 parv[0], target_p->name, hop + 1,
-		 target_p->hidden_server ? "(H) " : "",
-		 target_p->info);
-    }
-      
-  sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
-                       "Server %s being introduced by %s",
-		       target_p->name, source_p->name);
-
-}
-
-/* set_server_gecos()
- *
- * input	- pointer to client
- * output	- none
- * side effects - servers gecos field is set
- */
-static int set_server_gecos(struct Client *client_p, char *info)
-{
-  /* check the info for [IP] */
-  if(info[0])
-  {
-    char *p;
-    char *s;
-    char *t;
-    
-    s = info;
-    
-    /* we should only check the first word for an ip */
-    if((p = strchr(s, ' ')))
-      *p = '\0';
-      
-    /* check for a ] which would symbolise an [IP] */
-    if((t = strchr(s, ']')))
-    {
-      /* set s to after the first space */
-      if(p)
-        s = ++p;
-      else
-        s = NULL;
-    }
-    /* no ], put the space back */
-    else if(p)
-      *p = ' ';
-
-    /* p may have been set to a trailing space, so check s exists and that
-     * it isnt \0 */
-    if(s && (*s != '\0'))
-    {
-      /* a space? if not (H) could be the last part of info.. */
-      if((p = strchr(s, ' ')))
-        *p = '\0';
-      
-      /* check for (H) which is a hidden server */
-      if(!strcmp(s, "(H)"))
-      {
-        client_p->hidden_server = 1;
-
-        /* if there was no space.. theres nothing to set info to */
-        if(p)
-	  s = ++p;
-	else
-	  s = NULL;
-      }
-      else if(p)
-        *p = ' ';
-      
-      /* if there was a trailing space, s could point to \0, so check */
-      if(s && (*s != '\0'))
-        strlcpy(client_p->info, s, REALLEN);
-      else
-        strlcpy(client_p->info, "(Unknown Location)", REALLEN);
-    }
-    else
-      strlcpy(client_p->info, "(Unknown Location)", REALLEN);
-  }
-  else
-    strlcpy(client_p->info, "(Unknown Location)", REALLEN);
-
-  return 1;
-}
-
-/*
- * bogus_host
- *
- * inputs	- hostname
- * output	- 1 if a bogus hostname input, 0 if its valid
- * side effects	- none
- */
-int bogus_host(char *host)
-{
-  int bogus_server = 0;
-  char *s;
-  int dots = 0;
-
-  for( s = host; *s; s++ )
-    {
-      if (!IsServChar(*s))
-	{
-	  bogus_server = 1;
-	  break;
-	}
-      if ('.' == *s)
-	++dots;
-    }
-
-  if (!dots || bogus_server )
-    return 1;
-
-  return 0;
-}
-
-/*
- * server_exists()
- * 
- * inputs	- servername
- * output	- 1 if server exists, 0 if doesnt exist
- */
-struct Client *server_exists(char *servername)
-{
-  struct Client *target_p;
-  dlink_node *ptr;
-
-  for(ptr = global_serv_list.head; ptr; ptr = ptr->next)
-  {
-    target_p = ptr->data;
-
-    if(match(target_p->name, servername) || 
-         match(servername, target_p->name))
-      return target_p;
-  }
-
-  return NULL;
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_sjoin.c ircd-hybrid-fuis/modules/core/m_sjoin.c
--- ircd-hybrid-7.0rc9/modules/core/m_sjoin.c	Thu Jul  4 12:07:23 2002
+++ ircd-hybrid-fuis/modules/core/m_sjoin.c	Wed Dec 31 19:00:00 1969
@@ -1,935 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_sjoin.c: Joins a user to a channel.
- *
- *  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_sjoin.c,v 1.140 2002/07/04 16:07:23 androsyn Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "channel_mode.h"
-#include "vchannel.h"
-#include "client.h"
-#include "hash.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "list.h"
-#include "numeric.h"
-#include "send.h"
-#include "common.h"
-#include "msg.h"
-#include "parse.h"
-#include "modules.h"
-#include "s_serv.h"
-#include "s_conf.h"
-
-
-static void ms_sjoin(struct Client*, struct Client*, int, char**);
-
-struct Message sjoin_msgtab = {
-  "SJOIN", 0, 0, 0, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_ignore, ms_sjoin, m_ignore}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&sjoin_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&sjoin_msgtab);
-}
-
-const char *_version = "$Revision: 1.140 $";
-#endif
-/*
- * ms_sjoin
- * parv[0] - sender
- * parv[1] - TS
- * parv[2] - channel
- * parv[3] - modes + n arguments (key and/or limit)
- * parv[4+n] - flags+nick list (all in one parameter)
- * 
- * process a SJOIN, taking the TS's into account to either ignore the
- * incoming modes or undo the existing ones or merge them, and JOIN
- * all the specified users while sending JOIN/MODEs to local clients
- */
-
-static char    modebuf[MODEBUFLEN];
-static char    parabuf[MODEBUFLEN];
-static char    *para[MAXMODEPARAMS];
-static char    *mbuf;
-static int     pargs;
-
-static void set_final_mode(struct Mode *mode,struct Mode *oldmode);
-static void remove_our_modes(int type,
-		      struct Channel *chptr, struct Channel *top_chptr,
-		      struct Client *source_p);
-
-static void remove_a_mode(int hide_or_not,
-                          struct Channel *chptr, struct Channel *top_chptr,
-                          struct Client *source_p, dlink_list *list, char flag);
-
-
-static void ms_sjoin(struct Client *client_p,
-                    struct Client *source_p,
-                    int parc,
-                    char *parv[])
-{
-  struct Channel *chptr;
-  struct Channel *top_chptr=NULL;	/* XXX vchans */
-  struct Client  *target_p, *lclient_p;
-  time_t         newts;
-  time_t         oldts;
-  time_t         tstosend;
-  static         struct Mode mode, *oldmode;
-  int            args = 0;
-  int            keep_our_modes = 1;
-  int            keep_new_modes = 1;
-  int            doesop = 0;
-  int            fl;
-  int            people = 0;
-  int		 num_prefix=0;
-  int            isnew;
-  int		 buflen = 0;
-  register       char *s, *nhops;
-  static         char buf[2*BUFSIZE]; /* buffer for modes and prefix */
-  static         char sjbuf_nhops[BUFSIZE]; /* buffer with halfops as @ */
-  char           *p; /* pointer used making sjbuf */
-  int hide_or_not;
-  int i;
-  dlink_node *m;
-#ifdef HALFOPS
-  static         char sjbuf_hops[BUFSIZE]; /* buffer with halfops as % */
-  register char  *hops;
-#endif
-#ifdef VCHANS
-  int            vc_ts = 0;
-#endif
-
-  *buf = '\0';
-#ifdef HALFOPS
-  *sjbuf_hops = '\0';
-#endif
-  *sjbuf_nhops = '\0';
-
-  if (IsClient(source_p) || parc < 5)
-    return;
-  
-  if (!IsChannelName(parv[2]))
-    return;
-  if (!check_channel_name(parv[2]))
-    return;
-
-  /* SJOIN's for local channels can't happen. */
-  if (*parv[2] == '&')
-    return;
-
-  mbuf = modebuf;
-  *mbuf = '\0';
-  pargs = 0;
-  newts = atol(parv[1]);
-
-  mode.mode = 0;
-  mode.limit = 0;
-  mode.key[0] = '\0';;
-  s = parv[3];
-  while (*s)
-    switch(*(s++))
-      {
-      case 'i':
-        mode.mode |= MODE_INVITEONLY;
-        break;
-      case 'n':
-        mode.mode |= MODE_NOPRIVMSGS;
-        break;
-      case 'p':
-        mode.mode |= MODE_PRIVATE;
-        break;
-      case 's':
-        mode.mode |= MODE_SECRET;
-        break;
-      case 'm':
-        mode.mode |= MODE_MODERATED;
-        break;
-      case 't':
-        mode.mode |= MODE_TOPICLIMIT;
-        break;
-#ifdef ANONOPS
-      case 'a':
-	if(ConfigChannel.use_anonops)
-          mode.mode |= MODE_HIDEOPS;
-        break;
-#endif
-      case 'k':
-        strlcpy(mode.key, parv[4 + args], KEYLEN);
-        args++;
-        if (parc < 5+args)
-          return;
-        break;
-      case 'l':
-        mode.limit = atoi(parv[4+args]);
-        args++;
-        if (parc < 5+args)
-          return;
-        break;
-      }
-
-  *parabuf = '\0';
-
-  if ((chptr = get_or_create_channel(source_p, parv[2], &isnew)) == NULL)
-    return; /* channel name too long? */
-
-  /* XXX vchan cruft */
-  /* vchans are encoded as "##mainchanname_timestamp" */
-
-#ifdef VCHANS
-  if ( (parv[2][1] == '#') && (ConfigChannel.use_vchans) )
-    {
-      char *subp;
-
-      /* possible sub vchan being sent along ? */
-      if ((subp = strrchr(parv[2],'_')))
-	{
-          vc_ts = atol(subp+1);
-	  /* 
-           * XXX - Could be a vchan, but we can't be _sure_
-           *
-           * We now test the timestamp matches below,
-           * but that can still be faked.
-           *
-           * If there was some way to pass an extra bit of
-           * information over non-hybrid-7 servers, through SJOIN,
-           * we could tell other servers that it's a vchan.
-           * That's probably not possible, unfortunately :(
-           */
-
-	  *subp = '\0';	/* fugly hack for now ... */
-
-	  /* + 1 skip the extra '#' in the name */
-	  if ((top_chptr = hash_find_channel(parv[2] + 1)) != NULL)
-	    {
-	      /* If the vchan is already in the vchan_list for this
-	       * root, don't re-add it.
-	       */
-              /* Compare timestamps too */
-	      if (dlinkFind(&top_chptr->vchan_list,chptr) == NULL &&
-                 newts == vc_ts)
-		{
-		  m = make_dlink_node();
-		  dlinkAdd(chptr, m, &top_chptr->vchan_list);
-		  chptr->root_chptr=top_chptr;
-		}
-	    }
-          /* check TS before creating a root channel */
-	  else if (newts == vc_ts)
-	    {
-	      top_chptr = get_or_create_channel(source_p, (parv[2] + 1), NULL);
-	      m = make_dlink_node();
-	      dlinkAdd(chptr, m, &top_chptr->vchan_list);
-	      chptr->root_chptr=top_chptr;
-              /* let users access it somehow... */
-              chptr->vchan_id[0] = '!';
-              chptr->vchan_id[1] = '\0';
-	    }
-
-	  *subp = '_';	/* fugly hack, restore '_' */
-	}
-    }
-#endif
-
-  oldts = chptr->channelts;
-
-  doesop = (parv[4+args][0] == '@' || parv[4+args][1] == '@');
-
-  oldmode = &chptr->mode;
-
-#ifdef IGNORE_BOGUS_TS
-  if (newts < 800000000)
-    {
-      sendto_realops_flags(FLAGS_DEBUG, L_ALL,
-			"*** Bogus TS %lu on %s ignored from %s",
-			(unsigned long) newts,
-			chptr->chname,
-			client_p->name);
-
-      newts = (oldts==0) ? oldts : 800000000;
-    }
-#else
-
-  if(!isnew && !newts && oldts)
-  {
-    sendto_channel_local(ALL_MEMBERS, chptr,
- 		":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to 0",
-		me.name, chptr->chname, chptr->chname, oldts);
-    sendto_realops_flags(FLAGS_ALL, L_ALL,
-		         "Server %s changing TS on %s from %lu to 0",
-			 source_p->name, chptr->chname, oldts);
-  }
-#endif
-
-  /*
-   * XXX - this no doubt destroys vchans
-   */
-  if (isnew)
-    chptr->channelts = tstosend = newts;
-  /* Remote is sending users to a permanent channel.. we need to drop our
-   * version and use theirs, to keep compatibility -- fl */
-  else if (chptr->users == 0 && parv[4+args][0])
-    {
-       keep_our_modes = NO;
-       chptr->channelts = tstosend = newts;
-    }
-  /* They're not sending users, lets just ignore it and carry on */
-  else if (chptr->users == 0 && !parv[4+args][0])
-    return;
-
-  /* It isnt a perm channel, do normal timestamp rules */
-  else if (newts == 0 || oldts == 0)
-    chptr->channelts = tstosend = 0;
-  else if (!newts)
-    chptr->channelts = tstosend = oldts;
-  else if (newts == oldts)
-    tstosend = oldts;
-  else if (newts < oldts)
-    {
-      keep_our_modes = NO;
-      chptr->channelts = tstosend = newts;
-    }
-  else
-    {
-      keep_new_modes = NO;
-      tstosend = oldts;
-    }
-
-  if (!keep_new_modes)
-    mode = *oldmode;
-  else if (keep_our_modes)
-    {
-      mode.mode |= oldmode->mode;
-      if (oldmode->limit > mode.limit)
-        mode.limit = oldmode->limit;
-      if (strcmp(mode.key, oldmode->key) < 0)
-        strcpy(mode.key, oldmode->key);
-    }
-
-#ifdef ANONOPS
-  if (mode.mode & MODE_HIDEOPS)
-    hide_or_not = ONLY_CHANOPS_HALFOPS;
-  else
-#endif
-    hide_or_not = ALL_MEMBERS;
-
-#ifdef ANONOPS
-  if ((MODE_HIDEOPS & mode.mode) && !(MODE_HIDEOPS & oldmode->mode))
-    sync_channel_oplists(chptr, MODE_DEL);
-
-  /* Don't reveal the ops, only to remove them all */
-  if (keep_our_modes)
-    if (!(MODE_HIDEOPS & mode.mode) && (MODE_HIDEOPS & oldmode->mode))
-      sync_channel_oplists(chptr, MODE_ADD);
-#endif
-
-  set_final_mode(&mode,oldmode);
-  chptr->mode = mode;
-
-  /* Lost the TS, other side wins, so remove modes on this side */
-  if (!keep_our_modes)
-    {
-      remove_our_modes(hide_or_not, chptr, top_chptr, source_p);
-      sendto_channel_local(ALL_MEMBERS, chptr,
-	    ":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to %lu",
-	    me.name, chptr->chname, chptr->chname, oldts, newts);
-    }
-     
-  if (*modebuf != '\0')
-    {
-      /* This _SHOULD_ be to ALL_MEMBERS
-       * It contains only +aimnstlki, etc */
-      if (top_chptr != NULL)
-	sendto_channel_local(ALL_MEMBERS,
-			     chptr, ":%s MODE %s %s %s",
-			     me.name,
-			     top_chptr->chname, modebuf, parabuf);
-      else
-	sendto_channel_local(ALL_MEMBERS,
-			     chptr, ":%s MODE %s %s %s",
-			     me.name,
-			     chptr->chname, modebuf, parabuf);
-    }
-
-  *modebuf = *parabuf = '\0';
-  if (parv[3][0] != '0' && keep_new_modes)
-    {
-      channel_modes(chptr, source_p, modebuf, parabuf);
-    }
-  else
-    {
-      modebuf[0] = '0';
-      modebuf[1] = '\0';
-    }
-
-  buflen = ircsprintf(buf, ":%s SJOIN %lu %s %s %s:",
-		      parv[0],
-		      (unsigned long) tstosend,
-		      parv[2], modebuf, parabuf);
-
-  /* check we can fit a nick on the end, as well as \r\n\0 and a prefix "
-   * @+".
-   */
-  if (buflen >= (BUFSIZE - 6 - NICKLEN))
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "Long SJOIN from server: %s(via %s) (ignored)",
-			   source_p->name, client_p->name);
-      return;
-    }
-
-  mbuf = modebuf;
-  para[0] = para[1] = para[2] = para[3] = "";
-  pargs = 0;
-
-  *mbuf++ = '+';
-
-#ifdef HALFOPS
-  hops = sjbuf_hops;
-#endif
-  nhops = sjbuf_nhops;
-
-  s = parv[args+4];
-
-  /* remove any leading spaces */
-  while(*s == ' ')
-  {
-    s++;
-  }
-   
-  /* if theres a space, theres going to be more than one nick, change the
-   * first space to \0, so s is just the first nick, and point p to the
-   * second nick
-   */
-  if ((p = strchr(s, ' ')) != NULL)
-  {
-    *p++ = '\0';
-  }
-
-  while (s)
-    {
-      fl = 0;
-      num_prefix = 0;
-
-      for (i = 0; i < 2; i++)
-	{
-	  if (*s == '@')
-	    {
-	      fl |= MODE_CHANOP;
-	      if (keep_new_modes)
-	      {
-#ifdef HALFOPS
-	        *hops++ = *s;
-#endif
-		*nhops++ = *s;
-		num_prefix++;
-              }
-	      
-	      s++;
-	    }
-	  else if (*s == '+')
-	    {
-	      fl |= MODE_VOICE;
-	      if (keep_new_modes)
-	      {
-#ifdef HALFOPS
-	        *hops++ = *s;
-#endif
-		*nhops++ = *s;
-		num_prefix++;
-	      }
-	      
-	      s++;
-	    }
-	  else if (*s == '%')
-	    {
-#ifdef HALFOPS
-	      fl |= MODE_HALFOP;
-#else
-	      fl |= MODE_CHANOP;
-#endif
-	      if (keep_new_modes)
-	      {
-#ifdef HALFOPS
-	        *hops++ = *s;
-#endif
-		*nhops++ = '@';
-		num_prefix++;
-	      }
-	      
-	      s++;
-	    }
-	}
-
-      /* if the client doesnt exist, backtrack over the prefix (@%+) that we
-       * just added and skip to the next nick
-       */
-      /* also do this if its fake direction or a server */
-      if (!(target_p = find_client(s)) ||
-         (target_p->from != client_p) || !IsPerson(target_p))
-      {
-        sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
-	           source_p->name, s);
-
-#ifdef HALFOPS
-        hops -= num_prefix;
-	*hops = '\0';
-#endif
-
-	nhops -= num_prefix;
-	*nhops = '\0';
-
-        goto nextnick;
-      }
-
-      /* copy the nick to the two buffers */
-#ifdef HALFOPS
-      hops += ircsprintf(hops, "%s ", s);
-      assert((hops - sjbuf_hops) < sizeof(sjbuf_hops));
-#endif
-
-      nhops += ircsprintf(nhops, "%s ", s);
-      assert((nhops-sjbuf_nhops) < sizeof(sjbuf_nhops));
-
-      if (!keep_new_modes)
-	{
-	  if ((fl & MODE_CHANOP) || (fl & MODE_HALFOP))
-	    {
-	      fl = MODE_DEOPPED;
-	    }
-	  else
-	    {
-	      fl = 0;
-	    }
-	}
-
-      people++;
-
-      /* LazyLinks - Introduce unknown clients before sending the sjoin */
-      if (ServerInfo.hub)
-	{
-	  for (m = serv_list.head; m; m = m->next)
-	    {
-	      lclient_p = m->data;
-	      
-	      /* Hopefully, the server knows about it's own clients. */
-	      if (client_p == lclient_p)
-		continue;
-
-	      /* Ignore non lazylinks */
-	      if (!IsCapable(lclient_p,CAP_LL))
-		continue;
-
-	      /* Ignore servers we won't tell anyway */
-	      if (!(RootChan(chptr)->lazyLinkChannelExists &
-		    lclient_p->localClient->serverMask) )
-		continue;
-
-	      /* Ignore servers that already know target_p */
-	      if (!(target_p->lazyLinkClientExists &
-		    lclient_p->localClient->serverMask) )
-		{
-		  /* Tell LazyLink Leaf about client_p,
-		   * as the leaf is about to get a SJOIN */
-		  sendnick_TS( lclient_p, target_p );
-		  add_lazylinkclient(lclient_p,target_p);
-		}
-	    }
-	}
-      
-      if (!IsMember(target_p, chptr))
-        {
-          add_user_to_channel(chptr, target_p, fl);
-	  /* XXX vchan stuff */
-
-#ifdef VCHANS
-	  if (top_chptr)
-	    {
-	      add_vchan_to_client_cache(target_p,top_chptr, chptr);
-	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
-				   target_p->name,
-				   target_p->username,
-				   target_p->host,
-				   top_chptr->chname);
-	    }
-	  else
-#endif
-	    {
-	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
-				   target_p->name,
-				   target_p->username,
-				   target_p->host,
-				   parv[2]);
-	    }
-	}
-
-      if (fl & MODE_CHANOP)
-        {
-          *mbuf++ = 'o';
-	  para[pargs++] = s;
-
-#ifdef REQUIRE_OANDV
-          /* a +ov user.. bleh */
-	  if(fl & MODE_VOICE)
-	  {
-	    /* its possible the +o has filled up MAXMODEPARAMS, if so, start
-	     * a new buffer
-	     */
-	    if(pargs >= MAXMODEPARAMS)
-	      {
-	        *mbuf = '\0';
-		sendto_channel_local(hide_or_not, chptr,
-		                     ":%s MODE %s %s %s %s %s %s",
-				     me.name, RootChan(chptr)->chname,
-				     modebuf,
-				     para[0], para[1], para[2], para[3]);
-                mbuf = modebuf;
-		*mbuf++ = '+';
-		para[0] = para[1] = para[2] = para[3] = "";
-		pargs = 0;
-	      }
-
-	    *mbuf++ = 'v';
-	    para[pargs++] = s;
-	  }
-#endif
-        }
-      else if (fl & MODE_VOICE)
-        {
-          *mbuf++ = 'v';
-	  para[pargs++] = s;
-        }
-#ifdef HALFOPS
-      else if (fl & MODE_HALFOP)
-        {
-          *mbuf++ = 'h';
-          para[pargs++] = s;
-        }
-#endif
-
-      if (pargs >= MAXMODEPARAMS)
-        {
-          *mbuf = '\0';
-          sendto_channel_local(hide_or_not, chptr,
-                               ":%s MODE %s %s %s %s %s %s",
-                               me.name,
-                               RootChan(chptr)->chname,
-                               modebuf,
-                               para[0],para[1],para[2],para[3]);
-          mbuf = modebuf;
-          *mbuf++ = '+';
-          para[0] = para[1] = para[2] = para[3] = "";
-          pargs = 0;
-        }
-
-nextnick:
-      /* p points to the next nick */
-      s = p;
-     
-      /* if there was a trailing space and p was pointing to it, then we
-       * need to exit.. this has the side effect of breaking double spaces
-       * in an sjoin.. but that shouldnt happen anyway
-       */
-      if (s && (*s == '\0'))
-        s = p = NULL;
-	
-      /* if p was NULL due to no spaces, s wont exist due to the above, so
-       * we cant check it for spaces.. if there are no spaces, then when
-       * we next get here, s will be NULL
-       */
-      if (s && ((p = strchr(s, ' ')) != NULL))
-      {
-        *p++ = '\0';
-      }
-    }
-  
-  *mbuf = '\0';
-  if (pargs)
-    {
-      sendto_channel_local(hide_or_not, chptr,
-                           ":%s MODE %s %s %s %s %s %s",
-                           me.name,
-                           RootChan(chptr)->chname,
-                           modebuf,
-                           para[0], para[1], para[2], para[3]);
-    }
-
-  if (!people)
-    return;
-
-  /* relay the SJOIN to other servers */
-  for(m = serv_list.head; m; m = m->next)
-    {
-      target_p = m->data;
-
-      if (target_p == client_p->from)
-        continue;
-
-      /* skip lazylinks that don't know about this server */
-      if (ServerInfo.hub && IsCapable(target_p,CAP_LL))
-      {
-        if (!(RootChan(chptr)->lazyLinkChannelExists &
-              target_p->localClient->serverMask) )
-          continue;
-      }
-
-      /* Its a blank sjoin, ugh */
-      if (!parv[4+args][0])
-          return;
-
-#ifdef HALFOPS
-      if (IsCapable(target_p, CAP_HOPS))
-        sendto_one(target_p, "%s%s", buf, sjbuf_hops);
-      else
-#endif
-        sendto_one(target_p, "%s%s", buf, sjbuf_nhops);
-   }
-}
-
-/*
- * set_final_mode
- *
- * inputs	- pointer to mode to setup
- *		- pointer to old mode
- * output	- NONE
- * side effects	- 
- */
-
-struct mode_letter {
-  int mode;
-  char letter;
-};
-
-struct mode_letter flags[] = {
-  { MODE_NOPRIVMSGS, 'n' },
-  { MODE_TOPICLIMIT, 't' },
-  { MODE_SECRET,     's' },
-  { MODE_MODERATED,  'm' },
-  { MODE_INVITEONLY, 'i' },
-  { MODE_PRIVATE,    'p' },
-#ifdef ANONOPS
-  { MODE_HIDEOPS,    'a' },
-#endif
-  { 0, 0 }
-};
-
-static void set_final_mode(struct Mode *mode,struct Mode *oldmode)
-{
-  int what = 0;
-  char *pbuf=parabuf;
-  int  len;
-  int  i;
-
-  for (i = 0; flags[i].letter; i++)
-    {
-      if ((flags[i].mode & mode->mode) && !(flags[i].mode & oldmode->mode))
-	{
-	  if (what != 1)
-	    {
-	      *mbuf++ = '+';
-	      what = 1;
-	    }
-	  *mbuf++ = flags[i].letter;
-	}
-    }
-  for (i = 0; flags[i].letter; i++)
-    {
-      if ((flags[i].mode & oldmode->mode) && !(flags[i].mode & mode->mode))
-	{
-	  if (what != -1)
-	    {
-	      *mbuf++ = '-';
-	      what = -1;
-	    }
-	  *mbuf++ = flags[i].letter;
-	}
-    }
-  if (oldmode->limit && !mode->limit)
-    {
-      if (what != -1)
-        {
-          *mbuf++ = '-';
-          what = -1;
-        }
-      *mbuf++ = 'l';
-    }
-  if (oldmode->key[0] && !mode->key[0])
-    {
-      if (what != -1)
-        {
-          *mbuf++ = '-';
-          what = -1;
-        }
-      *mbuf++ = 'k';
-      len = ircsprintf(pbuf,"%s ", oldmode->key);
-      pbuf += len;
-      pargs++;
-    }
-  if (mode->limit && oldmode->limit != mode->limit)
-    {
-      if (what != 1)
-        {
-          *mbuf++ = '+';
-          what = 1;
-        }
-      *mbuf++ = 'l';
-      len = ircsprintf(pbuf, "%d ", mode->limit);
-      pbuf += len;
-      pargs++;
-    }
-  if (mode->key[0] && strcmp(oldmode->key, mode->key))
-    {
-      if (what != 1)
-        {
-          *mbuf++ = '+';
-          what = 1;
-        }
-      *mbuf++ = 'k';
-      len = ircsprintf(pbuf, "%s ", mode->key);
-      pbuf += len;
-      pargs++;
-    }
-  *mbuf = '\0';
-}
-
-/*
- * remove_our_modes
- *
- * inputs	- hide from ops or not int flag
- *		- pointer to channel to remove modes from
- *		- if vchan basechannel pointer 
- *		- client pointer
- * output	- NONE
- * side effects	- Go through the local members, remove all their
- *		  chanop modes etc., this side lost the TS.
- */
-static void remove_our_modes( int hide_or_not,
-                              struct Channel *chptr, struct Channel *top_chptr,
-                              struct Client *source_p)
-{
-  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->chanops, 'o');
-  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->voiced, 'v');
-
-  /* Move all voice/ops etc. to non opped list */
-  dlinkMoveList(&chptr->chanops, &chptr->peons);
-  dlinkMoveList(&chptr->voiced, &chptr->peons);
-  
-  dlinkMoveList(&chptr->locchanops, &chptr->locpeons);
-  dlinkMoveList(&chptr->locvoiced, &chptr->locpeons);
-
-#ifdef REQUIRE_OANDV
-  remove_a_mode(hide_or_not, chptr, top_chptr, source_p,
-                &chptr->chanops_voiced, 'o');
-  remove_a_mode(hide_or_not, chptr, top_chptr, source_p,
-                &chptr->chanops_voiced, 'v');    
-  dlinkMoveList(&chptr->chanops_voiced, &chptr->peons);
-  dlinkMoveList(&chptr->locchanops_voiced, &chptr->locpeons);
-#endif
-
-#ifdef HALFOPS
-  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->halfops, 'h');
-  dlinkMoveList(&chptr->halfops, &chptr->peons);
-  dlinkMoveList(&chptr->lochalfops, &chptr->locpeons);
-#endif
-}
-
-
-/*
- * remove_a_mode
- *
- * inputs	-
- * output	- NONE
- * side effects	- remove ONE mode from a channel
- */
-static void remove_a_mode( int hide_or_not,
-                           struct Channel *chptr, struct Channel *top_chptr,
-                           struct Client *source_p, dlink_list *list, char flag)
-{
-  dlink_node *ptr;
-  struct Client *target_p;
-  char buf[BUFSIZE];
-  char lmodebuf[MODEBUFLEN];
-  char *lpara[MAXMODEPARAMS];
-  char *chname;
-  int count = 0;
-
-  mbuf = lmodebuf;
-  *mbuf++ = '-';
-
-  lpara[0] = lpara[1] = lpara[2] = lpara[3] = "";
-
-  chname = chptr->chname;
-
-#ifdef VCHANS
-  if (IsVchan(chptr) && top_chptr)
-    chname = top_chptr->chname;
-#endif
-
-  ircsprintf(buf,":%s MODE %s ", me.name, chname);
-
-  for (ptr = list->head; ptr && ptr->data; ptr = ptr->next)
-    {
-      target_p = ptr->data;
-      lpara[count++] = target_p->name;
-
-      *mbuf++ = flag;
-
-      if (count >= MAXMODEPARAMS)
-	{
-	  *mbuf   = '\0';
-	  sendto_channel_local(hide_or_not, chptr,
-			       ":%s MODE %s %s %s %s %s %s",
-			       me.name,
-			       chname,
-			       lmodebuf,
-			       lpara[0], lpara[1], lpara[2], lpara[3] );
-
-	  mbuf = lmodebuf;
-	  *mbuf++ = '-';
-	  count = 0;
-	  lpara[0] = lpara[1] = lpara[2] = lpara[3] = "";
-	}
-    }
-
-  if (count != 0)
-    {
-      *mbuf   = '\0';
-      sendto_channel_local(hide_or_not, chptr,
-			   ":%s MODE %s %s %s %s %s %s",
-			   me.name,
-			   chname,
-			   lmodebuf,
-			   lpara[0], lpara[1], lpara[2], lpara[3] );
-
-    }
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/core/m_squit.c ircd-hybrid-fuis/modules/core/m_squit.c
--- ircd-hybrid-7.0rc9/modules/core/m_squit.c	Fri Feb 14 18:01:53 2003
+++ ircd-hybrid-fuis/modules/core/m_squit.c	Wed Dec 31 19:00:00 1969
@@ -1,235 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_squit.c: Makes a server quit.
- *
- *  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_squit.c,v 1.47 2003/02/14 23:01:53 db Exp $
- */
-
-#include "stdinc.h"
-#include "handlers.h"
-#include "client.h"
-#include "common.h"      /* FALSE bleah */
-#include "irc_string.h"
-#include "ircd.h"
-#include "numeric.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"
-
-
-static void ms_squit(struct Client*, struct Client*, int, char**);
-static void mo_squit(struct Client*, struct Client*, int, char**);
-
-struct Message squit_msgtab = {
-  "SQUIT", 0, 0, 1, 0, MFLG_SLOW, 0,
-  {m_unregistered, m_not_oper, ms_squit, mo_squit}
-};
-
-#ifndef STATIC_MODULES
-void
-_modinit(void)
-{
-  mod_add_cmd(&squit_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&squit_msgtab);
-}
-const char *_version = "$Revision: 1.47 $";
-#endif
-struct squit_parms 
-{
-  char *server_name;
-  struct Client *target_p;
-};
-
-static struct squit_parms *find_squit(struct Client *client_p,
-                                      struct Client *source_p,
-                                      char *server);
-
-
-/*
- * mo_squit - SQUIT message handler
- *      parv[0] = sender prefix
- *      parv[1] = server name
- *      parv[2] = comment
- */
-static void mo_squit(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  struct squit_parms *found_squit;
-  char  *comment = (parc > 2 && parv[2]) ? parv[2] : client_p->name;
-
-  if (!IsOperRemote(source_p))
-    {
-      sendto_one(source_p,":%s NOTICE %s :You need remote = yes;",me.name,parv[0]);
-      return;
-    }
-
-  if(parc < 2)
-    {
-      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
-                 me.name, parv[0], "SQUIT");
-      return;
-    }
-
-  if( (found_squit = find_squit(client_p,source_p,parv[1])) )
-    {
-      if(MyConnect(found_squit->target_p))
-	{
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-			       "Received SQUIT %s from %s (%s)",
-			       found_squit->target_p->name,
-			       get_client_name(source_p, HIDE_IP), comment);
-          ilog(L_NOTICE, "Received SQUIT %s from %s (%s)",
-	       found_squit->target_p->name, get_client_name(source_p, HIDE_IP),
-	       comment);
-	}
-      exit_client(client_p, found_squit->target_p, source_p, comment);
-      return;
-    }
-  else
-    {
-	    sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
-		       me.name, parv[0], parv[1]);
-    }
-}
-
-/*
- * ms_squit - SQUIT message handler
- *      parv[0] = sender prefix
- *      parv[1] = server name
- *      parv[2] = comment
- */
-static void ms_squit(struct Client *client_p, struct Client *source_p,
-                    int parc, char *parv[])
-{
-  struct squit_parms *found_squit;
-  char  *comment = (parc > 2 && parv[2]) ? parv[2] : client_p->name;
-
-  if(parc < 2)
-  {
-    exit_client(client_p, client_p, source_p, comment);
-    return;
-  }
-
-  if((found_squit = find_squit(client_p, source_p, parv[1])))
-  {
-    /*
-    **  Notify all opers, if my local link is remotely squitted
-    */
-    if (MyConnect(found_squit->target_p))
-    {
-      sendto_wallops_flags(FLAGS_WALLOP, &me,
-			   "Remote SQUIT %s from %s (%s)",
-			   found_squit->server_name,
-			   source_p->name, comment);
-      
-      sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
-		    ":%s WALLOPS :Remote SQUIT %s from %s (%s)",
-		    me.name, found_squit->server_name,
-		    source_p->name, comment);
-
-      ilog(L_TRACE, "SQUIT From %s : %s (%s)", parv[0],
-	   found_squit->server_name, comment);
-
-    }
-    exit_client(client_p, found_squit->target_p, source_p, comment);
-    return;
-  }
-}
-
-
-/*
- * find_squit
- * inputs	- local server connection
- *		-
- *		-
- * output	- pointer to struct containing found squit or none if not found
- * side effects	-
- */
-static struct squit_parms *
-find_squit(struct Client *client_p, struct Client *source_p, char *server)
-{
-  static struct squit_parms found_squit;
-  static struct Client *target_p;
-  struct ConfItem *aconf;
-
-  found_squit.target_p = NULL;
-  found_squit.server_name = NULL;
-
-  /*
-  ** To accomodate host masking, a squit for a masked server
-  ** name is expanded if the incoming mask is the same as
-  ** the server name for that link to the name of link.
-  */
-  if ((*server == '*') && IsServer(client_p))
-    {
-      aconf = client_p->serv->sconf;
-      if (aconf)
-        {
-	  if (!irccmp(server, my_name_for_link(me.name, aconf)))
-	    {
-	       found_squit.server_name = client_p->name;
-	       found_squit.target_p = client_p;
-	    }
-	}
-    }
-
-  /*
-  ** The following allows wild cards in SQUIT. Only useful
-  ** when the command is issued by an oper.
-  */
-  for (target_p = GlobalClientList; (target_p = next_client(target_p, server));
-       target_p = target_p->next)
-    {
-      if (IsServer(target_p) || IsMe(target_p))
-	break;
-    }
-
-  found_squit.target_p = target_p;
-  found_squit.server_name = server;
-
-  if (target_p && IsMe(target_p))
-    {
-       if (IsClient(client_p))
-         {
-		 sendto_one(source_p,":%s NOTICE %s :You are trying to squit me.",me.name,client_p->name);
-	         found_squit.target_p = NULL;
-         }
-       else
-         {
-           found_squit.target_p = client_p;
-           found_squit.server_name = client_p->name;
-         }
-       
-    }
-
-  if(found_squit.target_p != NULL)
-    return &found_squit;
-  else
-    return(NULL);
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/descrip.mms ircd-hybrid-fuis/modules/descrip.mms
--- ircd-hybrid-7.0rc9/modules/descrip.mms	Thu May 23 18:20:12 2002
+++ ircd-hybrid-fuis/modules/descrip.mms	Wed Dec 31 19:00:00 1969
@@ -1,30 +0,0 @@
-# MMS/MMK Makefile for OpenVMS
-# Copyright (c) 2001 Edward Brocklesby
-# $Id: descrip.mms,v 1.6 2002/05/23 22:20:12 leeh Exp $
-
-CC=	CC
-CFLAGS=	/INCLUDE_DIRECTORY=([-.INCLUDE],[-.ADNS])/STANDARD=ISOC94
-LDFLAGS=
-
-OBJECTS=	M_ACCEPT,M_ADMIN,M_AWAY,M_CAPAB,M_CBURST,M_CJOIN,-
-		M_CLOSE,M_CONNECT,M_DMEM,M_DROP,-
-		M_EOB,M_HELP,M_INFO,M_INVITE,M_ISON,M_JOIN,-
-		M_KLINE,M_KNOCK,M_LINKS,M_LIST,M_LLJOIN,M_LLNICK,M_LOCOPS,-
-		M_LUSERS,M_MOTD,M_NAMES,M_NBURST,-
-		M_OPER,M_OPERWALL,M_PASS,M_PING,M_PONG,M_POST,-
-		M_REHASH,M_RESTART,M_SET,M_STATS,-
-		M_SVINFO,M_TESTLINE,M_TIME,M_TOPIC,M_TRACE,M_UNKLINE,M_USER,-
-		M_USERHOST,M_USERS,M_VERSION,M_WALLOPS,M_WHO,M_WHOIS,M_WHOWAS,-
-		M_GLINE,M_RESV
-
-
-ALL : MODULES.OLB($(OBJECTS)) CORE.OLB
-
-CORE.OLB :
-	SET DEF [.CORE]
-	MMK
-	SET DEF [-]
-
-CLEAN : 
-	DELETE *.OLB;*
-	DELETE *.OBJ;*
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_admin.c ircd-hybrid-fuis/modules/m_admin.c
--- ircd-hybrid-7.0rc9/modules/m_admin.c	Wed Jul 31 12:24:06 2002
+++ ircd-hybrid-fuis/modules/m_admin.c	Tue Feb 11 08:20:42 2003
@@ -50,14 +50,12 @@
 void
 _modinit(void)
 {
-  hook_add_event("doing_admin");
   mod_add_cmd(&admin_msgtab);
 }
 
 void
 _moddeinit(void)
 {
-  hook_del_event("doing_admin");
   mod_del_cmd(&admin_msgtab);
 }
 const char *_version = "$Revision: 1.35 $";
@@ -166,9 +164,8 @@
  */
 static void admin_spy(struct Client *source_p)
 {
-  struct hook_spy_data data;
-
-  data.source_p = source_p;
-
-  hook_call_event("doing_admin", &data);
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+          "admin requested by %s (%s@%s) [%s]",
+          source_p->name, source_p->username,
+		  source_p->host, source_p->user->server);
 }
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_die.c ircd-hybrid-fuis/modules/m_die.c
--- ircd-hybrid-7.0rc9/modules/m_die.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_die.c	Fri Jan 24 02:01:59 2003
@@ -0,0 +1,124 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_die.c: Kills off this server.
+ *
+ *  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_die.c,v 1.25 2003/01/24 07:01:59 lusky Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_log.h"
+#include "s_conf.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+static void mo_die(struct Client*, struct Client*, int, char**);
+
+struct Message die_msgtab = {
+  "DIE", 0, 0, 1, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_ignore, mo_die}
+};
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&die_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&die_msgtab);
+}
+
+const char *_version = "$Revision: 1.25 $";
+#endif
+/*
+ * mo_die - DIE command handler
+ */
+static void mo_die(struct Client *client_p, struct Client *source_p,
+                  int parc, char *parv[])
+{
+  struct Client* target_p;
+  dlink_node *ptr;
+
+  if (!IsOperDie(source_p))
+    {
+      sendto_one(source_p,":%s NOTICE %s :You need die = yes;", me.name, parv[0]);
+      return;
+    }
+
+  if (parc < 2)
+    {
+      sendto_one(source_p,":%s NOTICE %s :Need server name /die %s",
+                 me.name,source_p->name,me.name);
+      return;
+    }
+  else
+    {
+      if (irccmp(parv[1], me.name))
+        {
+          sendto_one(source_p,":%s NOTICE %s :Mismatch on /die %s",
+                     me.name,source_p->name,me.name);
+          return;
+        }
+    }
+
+  for(ptr = lclient_list.head; ptr; ptr = ptr->next)
+    {
+      target_p = ptr->data;
+
+      sendto_one(target_p,
+		 ":%s NOTICE %s :Server Terminating. %s",
+		 me.name, target_p->name,
+		 get_client_name(source_p, HIDE_IP));
+    }
+
+  for(ptr = serv_list.head; ptr; ptr = ptr->next)
+    {
+      target_p = ptr->data;
+
+      sendto_one(target_p, ":%s ERROR :Terminated by %s",
+		 me.name, get_client_name(source_p, HIDE_IP));
+    }
+
+  /*
+   * XXX we called flush_connections() here. Read server_reboot()
+   * for an explanation as to what we should do.
+   *     -- adrian
+   */
+  ilog(L_NOTICE, "Server terminated by %s", get_oper_name(source_p));
+  /* 
+   * this is a normal exit, tell the os it's ok 
+   */
+  unlink(pidFileName);
+  exit(0);
+  /* NOT REACHED */
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_dmem.c ircd-hybrid-fuis/modules/m_dmem.c
--- ircd-hybrid-7.0rc9/modules/m_dmem.c	Fri May 24 19:34:19 2002
+++ ircd-hybrid-fuis/modules/m_dmem.c	Sun Feb 16 21:09:37 2003
@@ -30,7 +30,6 @@
 #include "ircd.h"
 #include "ircd_defs.h"
 #include "list.h"
-#include "s_gline.h"
 #include "numeric.h"
 #include "res.h"
 #include "s_conf.h"
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_gline.c ircd-hybrid-fuis/modules/m_gline.c
--- ircd-hybrid-7.0rc9/modules/m_gline.c	Sat Dec 28 02:02:38 2002
+++ ircd-hybrid-fuis/modules/m_gline.c	Wed Dec 31 19:00:00 1969
@@ -1,784 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  m_gline.c: Votes towards globally banning a mask.
- *
- *  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_gline.c,v 1.85 2002/12/28 07:02:38 bill Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "s_gline.h"
-#include "channel.h"
-#include "client.h"
-#include "common.h"
-#include "config.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "hostmask.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_conf.h"
-#include "s_misc.h"
-#include "scache.h"
-#include "send.h"
-#include "msg.h"
-#include "fileio.h"
-#include "s_serv.h"
-#include "hash.h"
-#include "parse.h"
-#include "modules.h"
-#include "list.h"
-
-#define GLINE_NOT_PLACED 0
-#define GLINE_ALREADY_VOTED -1
-#define GLINE_PLACED 1
-
-/* internal functions */
-static void set_local_gline(
-                            const char *oper_nick,
-                            const char *oper_user,
-                            const char *oper_host,
-                            const char *oper_server,
-                            const char *user,
-                            const char *host,
-                            const char *reason);
-
-static void log_gline_request(const char*,const char*,const char*,
-                              const char* oper_server,
-                              const char *,const char *,const char *);
-
-static void log_gline(struct Client *,struct gline_pending *,
-                      const char *, const char *,const char *,
-                      const char* oper_server,
-                      const char *,const char *,const char *);
-
-
-static int check_majority_gline(struct Client *source_p,
-				const char *oper_nick,
-				const char *oper_user,
-				const char *oper_host,
-				const char *oper_server,
-				const char *user, const char *host,
-				const char *reason);
-
-static void add_new_majority_gline(const char *, const char *, const char *,
-                                   const char *, const char *, const char *,
-                                   const char *);
-
-static int check_wild_gline(char *, char *);
-static int invalid_gline(struct Client *, char *, char *, char *);
-		       
-static void ms_gline(struct Client*, struct Client*, int, char**);
-static void mo_gline(struct Client*, struct Client*, int, char**);
-
-struct Message gline_msgtab = {
-    "GLINE", 0, 0, 3, 0, MFLG_SLOW, 0,
-      {m_unregistered, m_not_oper, ms_gline, mo_gline}
-};
-
-#ifndef STATIC_MODULES
-
-void
-_modinit(void)
-{
-    mod_add_cmd(&gline_msgtab);
-}
-
-void
-_moddeinit(void)
-{
-  mod_del_cmd(&gline_msgtab);
-}
-
-const char *_version = "$Revision: 1.85 $";
-#endif
-/*
- * mo_gline()
- *
- * inputs       - The usual for a m_ function
- * output       -
- * side effects -
- *
- * Place a G line if 3 opers agree on the identical user@host
- * 
- */
-/* Allow this server to pass along GLINE if received and
- * GLINES is not defined.
- *
- */
-
-static void
-mo_gline(struct Client *client_p, struct Client *source_p,
-	 int parc, char *parv[])
-{
-  char *user = NULL;
-  char *host = NULL;	              /* user and host of GLINE "victim" */
-  const char *reason = NULL;          /* reason for "victims" demise */
-  char tempuser[USERLEN + 2];
-  char temphost[HOSTLEN + 1];
-
-  if (!ConfigFileEntry.glines)
-  {
-    sendto_one(source_p,":%s NOTICE %s :GLINE disabled",me.name,parv[0]);  
-    return;
-  }
-
-  if (!IsOperGline(source_p))
-  {
-    sendto_one(source_p,
-	       ":%s NOTICE %s :You need gline = yes;",me.name,parv[0]);
-    return;
-  }
-			
-  if ((host = strchr(parv[1], '@')) || *parv[1] == '*')
-  {
-    /* Explicit user@host mask given */
-    
-    if(host != NULL)	/* Found user@host */
-    {
-      user = parv[1];   /* here is user part */
-      *(host++) = '\0'; /* and now here is host */
-
-      /* gline for "@host", use *@host */
-      if(*user == '\0')
-	user = "*";
-    }
-    else
-    {
-      user = "*";               /* no @ found, assume its *@somehost */
-      host = parv[1];
-    }
-	      
-    if (*host == '\0')	/* duh. no host found, assume its '*' host */
-      host = "*";
-	      
-    strlcpy(tempuser, user, USERLEN + 1);     /* allow for '*' */
-    strlcpy(temphost, host, HOSTLEN + 1);
-    user = tempuser;
-    host = temphost;
-  }
-  else
-  {
-    sendto_one(source_p,
-	       ":%s NOTICE %s :Can't G-Line a nick use user@host",
-	       me.name, parv[0]);
-    return;
-  }
-
-  if(invalid_gline(source_p, user, host, parv[2]))
-    return;
-			
-  /* Not enough non-wild characters were found,
-   * assume they are trying to gline *@*.
-   */
-
-  if (check_wild_gline(user, host))
-  {
-    if (MyClient(source_p))
-      sendto_one(source_p,
-		 ":%s NOTICE %s :Please include at least %d non-wildcard characters with the user@host",
-		 me.name, parv[0], ConfigFileEntry.min_nonwildcard);
-    return;
-  }
-			
-  reason = parv[2];
-
-  /* If at least 3 opers agree this user should be G lined then do it */
-  if (check_majority_gline(source_p, source_p->name,
-			   (const char *)source_p->username,
-			   source_p->host, me.name, user, host, reason) ==
-      GLINE_ALREADY_VOTED)
-  {
-    sendto_one(source_p,
-	       ":%s NOTICE %s :This server or oper has already voted",
-	       me.name, parv[0]);
-    return;
-  }
-
-  sendto_realops_flags(FLAGS_ALL, L_ALL,
-		       "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
-		       source_p->name, source_p->username, source_p->host,
-		       me.name, user, host, reason);
-  log_gline_request(source_p->name,
-		    (const char *)source_p->username,
-		    source_p->host,me.name, user, host, reason);
-
-
-  /* 4 param version for hyb-7 servers */
-  sendto_server(NULL, source_p, NULL, CAP_GLN|CAP_UID, NOCAPS,
-		LL_ICLIENT, ":%s GLINE %s %s :%s",
-		ID(source_p), user, host, reason);
-  sendto_server(NULL, source_p, NULL, CAP_GLN, CAP_UID,
-		LL_ICLIENT, ":%s GLINE %s %s :%s",
-		source_p->name, user, host, reason);
-
-  /* 8 param for hyb-6 */
-  sendto_server(NULL, NULL, NULL, CAP_UID, CAP_GLN, NOFLAGS,
-		":%s GLINE %s %s %s %s %s %s :%s",
-		me.name, ID(source_p), source_p->username,
-		source_p->host, source_p->user->server, user, host,
-		reason);
-  sendto_server(NULL, NULL, NULL, NOCAPS, CAP_GLN|CAP_UID, NOFLAGS,
-		":%s GLINE %s %s %s %s %s %s :%s",
-		me.name, source_p->name, source_p->username,
-		source_p->host, source_p->user->server, user, host,
-		reason);
-}
-
-/*
- * ms_gline()
- *
- * inputs       - The usual for a m_ function
- * output       -
- * side effects -
- *
- * Place a G line if 3 opers agree on the identical user@host
- * 
- */
-/* Allow this server to pass along GLINE if received and
- * GLINES is not defined.
- */
-
-static void
-ms_gline(struct Client *client_p, struct Client *source_p,
-	 int parc, char *parv[])
-{
-  /* These are needed for hyb6 compatibility.. if its ever removed we can
-   * just use source_p->username etc.. 
-   */
-  const char *oper_nick = NULL;        /* nick of oper requesting GLINE */
-  const char *oper_user = NULL;        /* username of oper requesting GLINE */
-  const char *oper_host = NULL;        /* hostname of oper requesting GLINE */
-  const char *oper_server = NULL;      /* server of oper requesting GLINE */
-  char *user = NULL;
-  char *host = NULL;             /* user and host of GLINE "victim" */
-  const char *reason = NULL;           /* reason for "victims" demise */
-  struct Client *acptr;
-
-  /* hyb-7 style gline (post beta3) */
-  if(parc == 4 && IsPerson(source_p))
-    {
-      oper_nick = parv[0];
-      oper_user = source_p->username;
-      oper_host = source_p->host;
-      oper_server = source_p->user->server;
-      user = parv[1];
-      host = parv[2];
-      reason = parv[3];
-    }
-  /* or it's a hyb-6 style */
-  else if(parc == 8 && IsServer(source_p))
-    {
-      oper_nick = parv[1];
-      oper_user = parv[2];
-      oper_host = parv[3];
-      oper_server = parv[4];
-      user = parv[5];
-      host = parv[6];
-      reason = parv[7];      
-    }
-  /* none of the above */
-  else
-    return;
-
-  /* Its plausible that the server and/or client dont actually exist,
-   * and its faked, as the oper isnt sending the gline..
-   * check they're real --fl_ */
-  /* we need acptr for LL introduction anyway -davidt */
-  if((acptr = find_server(oper_server)))
-  {
-    if((acptr = find_client(oper_nick)) == NULL)
-      return;
-  }
-  else
-    return;
-
- if(invalid_gline(acptr, user, host, (char *)reason))
-    return;
-    
-  /* send in hyb-7 to compatible servers */
-  sendto_server(client_p, acptr, NULL, CAP_GLN, NOCAPS, LL_ICLIENT,
-                ":%s GLINE %s %s :%s",
-                oper_nick, user, host, reason);
-  /* hyb-6 version to the rest */
-  sendto_server(client_p, NULL, NULL, NOCAPS, CAP_GLN, NOFLAGS,
-                ":%s GLINE %s %s %s %s %s %s :%s",
-                oper_server, oper_nick, oper_user, oper_host,
-                oper_server, user, host, reason);
-
-  if (ConfigFileEntry.glines)
-    {
-     /* I dont like the idea of checking for x non-wildcard chars in a
-      * gline.. it could lead to a desync... but we have to stop people
-      * glining *@*..   -- fl
-      */
-
-     if (check_wild_gline(user, host))
-        {
-          sendto_realops_flags(FLAGS_ALL, L_ALL, 
-                       "%s!%s@%s on %s is requesting a gline without %d non-wildcard characters for [%s@%s] [%s]",
-                       oper_nick, oper_user, oper_host, oper_server, ConfigFileEntry.min_nonwildcard,
-                       user, host, reason);
-          return;
-        }
-
-      log_gline_request(oper_nick,oper_user,oper_host,oper_server,
-			user,host,reason);
-      
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
-			   oper_nick, oper_user, oper_host, oper_server,
-			   user, host, reason);
-
-      /* If at least 3 opers agree this user should be G lined then do it */
-      if (check_majority_gline(source_p, oper_nick, oper_user, oper_host,
-			       oper_server, user, host, reason) ==
-	  GLINE_ALREADY_VOTED)
-      {
-	sendto_realops_flags(FLAGS_ALL, L_ALL,
-			     "oper or server has already voted");
-      }
-    }
-}
-
-/*
- * check_wild_gline
- *
- * inputs       - user, host of gline
- * output       - 1 if not enough non-wildchar char's, 0 if ok
- * side effects - NONE
- */
-
-static int
-check_wild_gline(char *user, char *host)
-{
-  char *p;
-  char tmpch;
-  int nonwild;
-
-  nonwild = 0;
-  p = user;
-
-  while ((tmpch = *p++))
-    {
-       if (!IsKWildChar(tmpch))
-         {
-            /*
-             * If we find enough non-wild characters, we can
-             * break - no point in searching further.
-             */
-            if (++nonwild >= ConfigFileEntry.min_nonwildcard)
-              break;
-         }
-    }
-
-   if (nonwild < ConfigFileEntry.min_nonwildcard)
-    {
-       /*
-        * The user portion did not contain enough non-wild
-        * characters, try the host.
-        */
-       p = host;
-       while ((tmpch = *p++))
-         {
-           if (!IsKWildChar(tmpch))
-             if (++nonwild >= ConfigFileEntry.min_nonwildcard)
-               break;
-         }
-     }
-
-    if (nonwild < ConfigFileEntry.min_nonwildcard)
-       return 1;
-    else
-       return 0;
-}
-
-/* invalid_gline
- *
- * inputs	- pointer to source client
- *		- pointer to ident
- *		- pointer to host
- *		- pointer to reason
- * outputs	- 1 if invalid, 0 if valid
- */
-static int
-invalid_gline(struct Client *source_p, char *luser, char *lhost,
-                       char *lreason)
-{
-  if(strchr(luser, '!'))
-  {
-    sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in gline",
-               me.name, source_p->name);
-    return (1);
-  }
-
-  return (0);
-}
-
-/*
- * set_local_gline
- *
- * inputs	- pointer to oper nick
- * 		- pointer to oper username
- * 		- pointer to oper host
- *		- pointer to oper server
- *		- pointer to victim user
- *		- pointer to victim host
- *		- pointer reason
- * output	- NONE
- * side effects	-
- */
-static void
-set_local_gline(const char *oper_nick,
-                            const char *oper_user,
-                            const char *oper_host,
-                            const char *oper_server,
-                            const char *user,
-                            const char *host,
-                            const char *reason)
-{
-  char buffer[IRCD_BUFSIZE];
-  struct ConfItem *aconf;
-  const char *current_date;
-
-  current_date = smalldate((time_t) 0);
-          
-  aconf = make_conf();
-  aconf->status = CONF_KILL;
-
-  ircsprintf(buffer, "%s (%s)",reason,current_date);
-      
-  DupString(aconf->passwd, buffer);
-  DupString(aconf->name, (char *)user);
-  DupString(aconf->host, (char *)host);
-  aconf->hold = CurrentTime + ConfigFileEntry.gline_time;
-  add_gline(aconf);
-      
-  sendto_realops_flags(FLAGS_ALL, L_ALL,
-		       "%s!%s@%s on %s has triggered gline for [%s@%s] [%s]",
-		       oper_nick, oper_user, oper_host, oper_server,
-		       user, host, reason);
-  check_klines();
-}
-
-
-/*
- * log_gline_request()
- *
- */
-static void
-log_gline_request(
-		  const char *oper_nick, const char *oper_user,
-		  const char *oper_host, const char* oper_server,
-		  const char *user, const char *host, const char *reason)
-{
-  char        buffer[2*BUFSIZE];
-  char        filenamebuf[PATH_MAX + 1];
-  static char timebuffer[MAX_DATE_STRING];
-  struct tm*  tmptr;
-  FBFILE*     out;
-
-  if(ConfigFileEntry.glinefile == NULL)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening glinefile");
-      return;
-    }
-
-  ircsprintf(filenamebuf, "%s.%s", 
-             ConfigFileEntry.glinefile, small_file_date((time_t)0));
-  if ( (out = fbopen(filenamebuf, "+a")) == NULL )
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening %s: %s",
-                     filenamebuf, strerror(errno));
-      return;
-    }
-
-  tmptr = localtime((const time_t*)&CurrentTime);
-  strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
-
-  ircsprintf(buffer,
-           "#Gline for %s@%s [%s] requested by %s!%s@%s on %s at %s\n",
-           user,host,reason,
-           oper_nick,oper_user,oper_host,oper_server,
-           timebuffer);
-
-  if (fbputs(buffer, out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s (%s)",
-				     filenamebuf, strerror(errno));
-    }
-  fbclose(out);
-}
-
-/*
- * log_gline()
- *
- */
-static void
-log_gline(struct Client *source_p,
-	  struct gline_pending *gline_pending_ptr,
-	  const char *oper_nick, const char *oper_user, const char *oper_host,
-	  const char *oper_server, const char *user, const char *host,
-	  const char *reason)
-{
-  char         buffer[2*BUFSIZE];
-  char         filenamebuf[PATH_MAX + 1];
-  static  char timebuffer[MAX_DATE_STRING + 1];
-  struct tm*   tmptr;
-  FBFILE       *out;
-
-  if(ConfigFileEntry.glinefile == NULL)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem opening glinefile.");
-      return;
-    }
-
-  ircsprintf(filenamebuf, "%s.%s", 
-                ConfigFileEntry.glinefile, small_file_date((time_t) 0));
-
-  if ((out = fbopen(filenamebuf, "a")) == NULL)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "*** Problem opening %s",filenamebuf);
-      return;
-    }
-
-  tmptr = localtime((const time_t*)&CurrentTime);
-  strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
-
-  ircsprintf(buffer,"#Gline for %s@%s %s added by the following\n",
-                   user,host,timebuffer);
-
-  if (fbputs(buffer,out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "*** Problem writing to %s",filenamebuf);
-      fbclose(out);
-      return;
-    }
-
-  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
-                   gline_pending_ptr->oper_nick1,
-                   gline_pending_ptr->oper_user1,
-                   gline_pending_ptr->oper_host1,
-                   gline_pending_ptr->oper_server1,
-                   (gline_pending_ptr->reason1)?
-                   (gline_pending_ptr->reason1):"No reason");
-
-  if (fbputs(buffer,out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
-      return;
-    }
-
-  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
-                   gline_pending_ptr->oper_nick2,
-                   gline_pending_ptr->oper_user2,
-                   gline_pending_ptr->oper_host2,
-                   gline_pending_ptr->oper_server2,
-                   (gline_pending_ptr->reason2)?
-                   (gline_pending_ptr->reason2):"No reason");
-
-  if (fbputs(buffer,out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
-      fbclose(out);
-      return;
-    }
-
-  ircsprintf(buffer, "#%s!%s@%s on %s [%s]\n",
-                   oper_nick,
-                   oper_user,
-                   oper_host,
-                   oper_server,
-                   (reason)?reason:"No reason");
-
-  if (fbputs(buffer,out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
-      fbclose(out);
-      return;
-    }
-
-  ircsprintf(buffer, "\"%s\",\"%s\",\"%s %s\",\"%s\",%lu\n",
-	     user,
-	     host,
-	     reason,
-	     timebuffer,
-	     oper_nick,
-	     (unsigned long) CurrentTime);
-
-  if (fbputs(buffer,out) == -1)
-    {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,"*** Problem writing to %s",filenamebuf);
-      fbclose(out);
-      return;
-    }
-
-  fbclose(out);
-}
-
-
-/*
- * add_new_majority_gline
- * 
- * inputs       - name of operator requesting gline
- * 		- username of operator requesting gline
- * 		- hostname of operator requesting gline
- * 		- servername of operator requesting gline
- * 		- username covered by the gline
- * 		- hostname covered by the gline
- * 		- reason for the gline
- * output       - NONE
- * side effects -
- * This function is called once a majority of opers
- * have agreed on a gline, and it can be placed. The
- * information about an operator being passed to us
- * happens to be the operator who pushed us over the
- * "majority" level needed. See check_majority_gline()
- * for more information.
- */
-static void
-add_new_majority_gline(const char* oper_nick, const char* oper_user,
-		       const char* oper_host, const char* oper_server,
-		       const char* user, const char* host,
-		       const char* reason)
-{
-  dlink_node *pending_node;
-
-  struct gline_pending *pending = (struct gline_pending*)
-    MyMalloc(sizeof(struct gline_pending));
-
-  strlcpy(pending->oper_nick1, oper_nick, NICKLEN + 1);
-  strlcpy(pending->oper_user1, oper_user, USERLEN + 1);
-  strlcpy(pending->oper_host1, oper_host, HOSTLEN + 1);
-
-  pending->oper_server1 = find_or_add(oper_server);
-
-  strlcpy(pending->user, user, USERLEN + 1);
-  strlcpy(pending->host, host, HOSTLEN + 1);
-  DupString(pending->reason1, reason);
-  pending->reason2 = NULL;
-
-  pending->last_gline_time = CurrentTime;
-  pending->time_request1 = CurrentTime;
-
-  pending_node = make_dlink_node();
-  dlinkAdd(pending, pending_node, &pending_glines);
-}
-
-/*
- * check_majority_gline()
- *
- * inputs       - oper_nick, oper_user, oper_host, oper_server
- *                user,host reason
- *
- * output       - one of three results
- *                
- * GLINE_ALREADY_VOTED	- returned if oper/server has already voted
- * GLINE_PLACED		- returned if this triggers a gline
- * GLINE_NOT_PLACED	- returned if not triggered
- *
- * Side effects -
- *      See if there is a majority agreement on a GLINE on the given user
- *      There must be at least 3 different opers agreeing on this GLINE
- *
- */
-static int
-check_majority_gline(struct Client *source_p, const char *oper_nick,
-		     const char *oper_user, const char *oper_host,
-		     const char* oper_server, const char *user,
-		     const char *host, const char *reason)
-{
-  dlink_node *pending_node;
-  struct gline_pending *gline_pending_ptr;
-
-  /* if its already glined, why bother? :) -- fl_ */
-  if(find_is_glined(host, user))
-    return(GLINE_NOT_PLACED);
-    
-  /* special case condition where there are no pending glines */
-
-  if (dlink_list_length(&pending_glines) == 0) /* first gline request placed */
-  {
-    add_new_majority_gline(oper_nick, oper_user, oper_host, oper_server,
-                           user, host, reason);
-    return(GLINE_NOT_PLACED);
-  }
-
-  DLINK_FOREACH(pending_node, pending_glines.head)
-  {
-    gline_pending_ptr = pending_node->data;
-
-    if ((irccmp(gline_pending_ptr->user,user) == 0) &&
-	(irccmp(gline_pending_ptr->host,host) == 0))
-    {
-      if (((irccmp(gline_pending_ptr->oper_user1,oper_user) == 0) ||
-	   (irccmp(gline_pending_ptr->oper_host1,oper_host) == 0)) ||
-	  (irccmp(gline_pending_ptr->oper_server1,oper_server) == 0))
-      {
-	return(GLINE_ALREADY_VOTED);
-      }
-
-      if (gline_pending_ptr->oper_user2[0] != '\0')
-      {
-	/* if two other opers on two different servers have voted yes */
-
-	if(((irccmp(gline_pending_ptr->oper_user2,oper_user)==0) ||
-	    (irccmp(gline_pending_ptr->oper_host2,oper_host)==0)) ||
-	   (irccmp(gline_pending_ptr->oper_server2,oper_server)==0))
-	{
-	  return (GLINE_ALREADY_VOTED);
-	}
-
-	log_gline(source_p,gline_pending_ptr,
-		  oper_nick,oper_user,oper_host,oper_server,
-		  user,host,reason);
-
-	/* trigger the gline using the original reason --fl */
-	set_local_gline(oper_nick, oper_user, oper_host, oper_server,
-			user, host, gline_pending_ptr->reason1);
-	cleanup_glines();
-	return (GLINE_PLACED);
-      }
-      else
-      {
-	strlcpy(gline_pending_ptr->oper_nick2, oper_nick, NICKLEN + 1);
-	strlcpy(gline_pending_ptr->oper_user2, oper_user, USERLEN + 1);
-	strlcpy(gline_pending_ptr->oper_host2, oper_host, HOSTLEN + 1);
-	DupString(gline_pending_ptr->reason2, reason);
-	gline_pending_ptr->oper_server2 = find_or_add(oper_server);
-	gline_pending_ptr->last_gline_time = CurrentTime;
-	gline_pending_ptr->time_request2 = CurrentTime;
-	return(GLINE_NOT_PLACED);
-      }
-    }
-  }
-  /* Didn't find this user@host gline in pending gline list
-   * so add it.
-   */
-  add_new_majority_gline(oper_nick, oper_user, oper_host, oper_server,
-                         user, host, reason);
-  return(GLINE_NOT_PLACED);
-}
-
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_info.c ircd-hybrid-fuis/modules/m_info.c
--- ircd-hybrid-7.0rc9/modules/m_info.c	Mon Oct 28 16:09:21 2002
+++ ircd-hybrid-fuis/modules/m_info.c	Sun Feb 16 21:09:37 2003
@@ -168,19 +168,7 @@
     &ConfigFileEntry.fname_userlog,
     "User log file"
   },
-  {
-    "glines",
-    OUTPUT_BOOLEAN,
-    &ConfigFileEntry.glines,
-    "G-line (network-wide K-line) support"
-  },
-  {
-    "gline_time",
-    OUTPUT_DECIMAL,
-    &ConfigFileEntry.gline_time,
-    "Expiry time for G-lines"
-  },
-  {
+{
     "hub",
     OUTPUT_BOOLEAN_YN,
     &ServerInfo.hub,
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_invite.c ircd-hybrid-fuis/modules/m_invite.c
--- ircd-hybrid-7.0rc9/modules/m_invite.c	Wed Jan 22 23:24:06 2003
+++ ircd-hybrid-fuis/modules/m_invite.c	Sun Feb  9 08:21:20 2003
@@ -196,6 +196,16 @@
 
   if (MyConnect(source_p))
   {
+	if (ServicesOn && HasSilence(target_p) && (target_p != source_p) &&
+		!IsOper(target_p) && (!IsNSId(source_p) ||
+		source_p->ns_reg + ConfigFileEntry.how_old >= CurrentTime))
+	{
+	  sendto_one(source_p, ":%s NOTICE %s :Error: %s is in silence mode and does NOT accept invites from unregistered/unidentified (too recently registered) nicknames",
+				 me.name, parv[0], target_p->name);
+	  sendto_one(source_p, ":%s NOTICE %s :Error: If you want to invite %s you will have to identify or register your nickname",
+				 me.name, parv[0], target_p->name);
+	  return;
+	}
     sendto_one(source_p, form_str(RPL_INVITING), me.name, parv[0],
                target_p->name, parv[2]);
     if (target_p->user->away)
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_ison.c ircd-hybrid-fuis/modules/m_ison.c
--- ircd-hybrid-7.0rc9/modules/m_ison.c	Fri May 24 19:34:20 2002
+++ ircd-hybrid-fuis/modules/m_ison.c	Sun Feb  9 08:21:20 2003
@@ -82,6 +82,9 @@
 {
   struct Client *up = NULL;
 
+  if (client_p->user)
+    client_p->user->known = 1;
+
   if (!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
     up = uplink;
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_join.c ircd-hybrid-fuis/modules/m_join.c
--- ircd-hybrid-7.0rc9/modules/m_join.c	Sat Feb  1 15:11:45 2003
+++ ircd-hybrid-fuis/modules/m_join.c	Wed Mar 12 16:24:46 2003
@@ -108,6 +108,11 @@
       return;
     }
 
+  if (!irccmp(parv[1], "#help"))
+  {
+	parv[1] = "#irchelp";
+  }
+
 #ifdef VCHANS
   if (parc > 3)
     {
@@ -283,11 +288,17 @@
     if (!IsOper(source_p))
      check_spambot_warning(source_p, name);
       
+    if ((chptr->mode.mode & MODE_JOINF) && ServicesOn && (!IsNSId(source_p) ||
+	    (source_p->ns_reg + ConfigFileEntry.how_old >= time(NULL))) && !IsOperRemote(source_p)) {
+	  sendto_one(source_p, form_str(ERR_JOINF), me.name, source_p->name, chptr->chname);
+	  return;
+	}
+
       /*
        * can_join checks for +i key, bans.
        */
 
-      if ((i = can_join(source_p, chptr, key)))
+      if ((i = can_join(source_p, chptr, key)) && !IsOperRemote(source_p))
 	{
 	  sendto_one(source_p, form_str(i), me.name, parv[0], name);
 	  successful_join_count++;
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_kick.c ircd-hybrid-fuis/modules/m_kick.c
--- ircd-hybrid-7.0rc9/modules/m_kick.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_kick.c	Sun May  4 18:19:38 2003
@@ -0,0 +1,296 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_kick.c: Kicks a user from a channel.
+ *
+ *  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_kick.c,v 1.50 2003/02/01 20:12:24 db Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "common.h"
+#include "handlers.h"
+#include "client.h"
+#include "hash.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "vchannel.h"
+#include "hash.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "send.h"
+#include "list.h"
+#include "irc_string.h"
+#include "s_conf.h"
+#include "msg.h"
+#include "packet.h"
+#include "parse.h"
+#include "modules.h"
+#include "hook.h"
+#include "resv.h"
+
+static void m_kick(struct Client*, struct Client*, int, char**);
+static void ms_kick(struct Client*, struct Client*, int, char**);
+
+struct Message kick_msgtab = {
+  "KICK", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_kick, ms_kick, m_kick}
+};
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&kick_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&kick_msgtab);
+}
+
+const char *_version = "$Revision: 1.50 $";
+#endif
+/*
+** m_kick
+**      parv[0] = sender prefix
+**      parv[1] = channel
+**      parv[2] = client to kick
+**      parv[3] = kick comment
+*/
+static void 
+m_kick(struct Client *client_p, struct Client *source_p,
+                  int parc, char *parv[])
+{
+  struct ResvNick *resv;
+  struct Client *who;
+  struct Channel *chptr;
+#ifdef VCHANS
+  struct Channel *vchan;
+#endif
+  int   chasing = 0;
+  char  *comment;
+  char  *name;
+  char  *p = (char *)NULL;
+  char  *user;
+  dlink_node *ptr;
+  static char     buf[BUFSIZE];
+
+  if (*parv[2] == '\0')
+    {
+      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "KICK");
+      return;
+    }
+
+  if(MyClient(source_p) && !IsFloodDone(source_p))
+    flood_endgrace(source_p);
+
+  comment = (BadPtr(parv[3])) ? parv[2] : parv[3];
+  if (strlen(comment) > (size_t) TOPICLEN)
+    comment[TOPICLEN] = '\0';
+
+  *buf = '\0';
+  name = parv[1];
+  while (*name == ',')
+    name++;
+  if((p = strchr(name,',')) != NULL)
+    *p = '\0';
+  if (!*name)
+    return;
+
+  chptr = hash_find_channel(name);
+  if (!chptr)
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+                 me.name, parv[0], name);
+      return;
+    }
+
+#ifdef VCHANS
+  if (HasVchans(chptr))
+    {
+      vchan = map_vchan(chptr,source_p);
+      if(vchan != 0)
+	{
+	  chptr = vchan;
+	}
+    }
+#endif
+
+  if (!IsServer(source_p) && !is_any_op(chptr, source_p)) 
+    { 
+	  if (IsOperRemote(source_p) && !ServicesOn) {
+		sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to kick %s out of %s",
+						     source_p->name, parv[2], chptr);
+	  } else {
+      /* was a user, not a server, and user isn't seen as a chanop here */
+      
+      if(MyConnect(source_p))
+        {
+          /* user on _my_ server, with no chanops.. so go away */
+          
+          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+                     me.name, parv[0], name);
+          return;
+        }
+
+      if(chptr->channelts == 0)
+        {
+          /* If its a TS 0 channel, do it the old way */
+          
+          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+                     me.name, parv[0], name);
+          return;
+        }
+
+      /* Its a user doing a kick, but is not showing as chanop locally
+       * its also not a user ON -my- server, and the channel has a TS.
+       * There are two cases we can get to this point then...
+       *
+       *     1) connect burst is happening, and for some reason a legit
+       *        op has sent a KICK, but the SJOIN hasn't happened yet or 
+       *        been seen. (who knows.. due to lag...)
+       *
+       *     2) The channel is desynced. That can STILL happen with TS
+       *        
+       *     Now, the old code roger wrote, would allow the KICK to 
+       *     go through. Thats quite legit, but lets weird things like
+       *     KICKS by users who appear not to be chanopped happen,
+       *     or even neater, they appear not to be on the channel.
+       *     This fits every definition of a desync, doesn't it? ;-)
+       *     So I will allow the KICK, otherwise, things are MUCH worse.
+       *     But I will warn it as a possible desync.
+       *
+       *     -Dianora
+       */
+	   }
+    }
+
+  user = parv[2];
+  while (*user == ',')
+    user++;
+  if((p = strchr(user,',')) != NULL)
+    *p = '\0';
+  if (!*user)
+    return;
+
+  if (!(who = find_chasing(source_p, user, &chasing)))
+    {
+      return;
+    }
+
+  if (MyClient(source_p) && (resv = return_nick_resv(who->name)) && !irccmp(resv->reason, ConfigFileEntry.services_qline))
+  {
+    sendto_one(source_p, form_str(ERR_SERVICESNICKKICK), me.name,
+               who->name, chptr->chname);
+	return;
+  }
+
+  if ((ptr = dlinkFind(&chptr->nokick, who)) != NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOKICK), me.name,
+               who->name, chptr->chname);
+	return;
+  }
+
+  if (IsMember(who, chptr))
+    {
+      /* half ops cannot kick other halfops on private channels */
+#ifdef HALFOPS
+      if (is_half_op(chptr,source_p))
+      {
+	if (((chptr->mode.mode & MODE_PRIVATE) && is_any_op(chptr, who)) ||
+             is_chan_op(chptr, who))
+	{
+          sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
+                     me.name, parv[0], name);
+	  return;
+	}
+      }
+#endif
+      /* jdc
+       * - In the case of a server kicking a user (i.e. CLEARCHAN),
+       *   the kick should show up as coming from the server which did
+       *   the kick.
+       * - Personally, flame and I believe that server kicks shouldn't
+       *   be sent anyways.  Just waiting for some oper to abuse it...
+       */
+      if (IsServer(source_p))
+      {
+        sendto_channel_local(ALL_MEMBERS, chptr, ":%s KICK %s %s :%s",
+          source_p->name, name, who->name, comment);
+      }
+#ifdef ANONOPS
+      else if(chptr->mode.mode & MODE_HIDEOPS)
+	{
+	  /* jdc -- Non-chanops get kicked from me.name, not
+	   *        who->name (themselves).
+	   */
+	  sendto_channel_local(NON_CHANOPS, chptr,
+			       ":%s KICK %s %s :%s",
+			       me.name,
+			       name, who->name, comment);
+
+	  sendto_channel_local(ONLY_CHANOPS_HALFOPS, chptr,
+			       ":%s!%s@%s KICK %s %s :%s",
+			       source_p->name,
+			       source_p->username,
+			       source_p->host,
+			       name,
+			       who->name, comment);
+	}
+      else
+#endif
+	{
+	  sendto_channel_local(ALL_MEMBERS, chptr,
+			       ":%s!%s@%s KICK %s %s :%s",
+			       source_p->name,
+			       source_p->username,
+			       source_p->host,
+			       name, who->name, comment);
+	}
+
+      sendto_server(client_p, NULL, chptr, NOCAPS, NOCAPS, NOFLAGS,
+                    ":%s KICK %s %s :%s",
+                    parv[0], chptr->chname,
+                    who->name, comment);
+      if (!IsDefunct(who))
+	remove_user_from_channel(chptr, who);
+    }
+  else
+    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
+               me.name, parv[0], user, name);
+}
+
+static void
+ms_kick(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  if (*parv[2] == '\0')
+    {
+      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "KICK");
+      return;
+    }
+
+  m_kick(client_p, source_p, parc, parv);
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_kill.c ircd-hybrid-fuis/modules/m_kill.c
--- ircd-hybrid-7.0rc9/modules/m_kill.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_kill.c	Wed Mar 12 16:24:15 2003
@@ -0,0 +1,385 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_kill.c: Kills 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_kill.c,v 1.68 2003/02/14 23:01:53 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "hash.h"       /* for find_client() */
+#include "ircd.h"
+#include "numeric.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "s_conf.h"
+#include "send.h"
+#include "whowas.h"
+#include "irc_string.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static char buf[BUFSIZE];
+
+static void ms_kill(struct Client*, struct Client*, int, char**);
+static void mo_kill(struct Client*, struct Client*, int, char**);
+static void relay_kill(struct Client *, struct Client *, struct Client *,
+                       const char *, const char *);
+
+struct Message kill_msgtab = {
+  "KILL", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, ms_kill, mo_kill}
+};
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&kill_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&kill_msgtab);
+}
+
+const char *_version = "$Revision: 1.68 $";
+#endif
+/*
+** mo_kill
+**      parv[0] = sender prefix
+**      parv[1] = kill victim
+**      parv[2] = kill path
+*/
+static void
+mo_kill(struct Client *client_p, struct Client *source_p,
+	int parc, char *parv[])
+{
+  struct Client*    target_p;
+  const char* inpath = client_p->name;
+  char*       user;
+  char*       reason;
+
+  user = parv[1];
+  reason = parv[2]; /* Either defined or NULL (parc >= 2!!) */
+
+  if (!IsOperK(source_p))
+    {
+      sendto_one(source_p,":%s NOTICE %s :You need kline = yes;",me.name,parv[0]);
+      return;
+    }
+
+  if (!irccmp(parv[0], parv[1]))
+  {
+   sendto_one(source_p, ":%s NOTICE %s :You can't kill yourself!", me.name, parv[0]);
+   return;
+  }
+
+  if (!BadPtr(reason))
+    {
+      if(strlen(reason) > (size_t) KILLLEN)
+	reason[KILLLEN] = '\0';
+    }
+  else
+    reason = "<No reason given>";
+
+  if ((target_p = find_client(user)) == NULL)
+    {
+      /*
+      ** If the user has recently changed nick, automatically
+      ** rewrite the KILL for this new nickname--this keeps
+      ** servers in synch when nick change and kill collide
+      */
+      if ((target_p = get_history(user, (long)KILLCHASETIMELIMIT)) == NULL)
+        {
+          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+                     me.name, parv[0], user);
+          return;
+        }
+      sendto_one(source_p,":%s NOTICE %s :KILL changed from %s to %s",
+                 me.name, parv[0], user, target_p->name);
+    }
+  if (IsServer(target_p) || IsMe(target_p))
+    {
+      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+                 me.name, parv[0]);
+      return;
+    }
+
+  if (!MyConnect(target_p) && (!IsOperGlobalKill(source_p)))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :Nick %s isnt on your server",
+                 me.name, parv[0], target_p->name);
+      return;
+    }
+
+  if(MyConnect(target_p))
+    sendto_one(target_p, ":%s!%s@%s KILL %s :%s", 
+	       source_p->name, source_p->username, source_p->host,
+	       target_p->name, reason);
+
+  /* Do not change the format of this message.  There's no point in changing messages
+   * that have been around for ever, for no reason.. */
+  sendto_realops_flags(FLAGS_ALL, L_ALL,
+		       "Received KILL message for %s. From %s Path: %s (%s)", 
+		       target_p->name, parv[0], me.name, reason);
+
+  ilog(L_INFO,"KILL From %s For %s Path %s (%s)",
+       parv[0], target_p->name, me.name, reason);
+
+
+  /*
+  ** And pass on the message to other servers. Note, that if KILL
+  ** was changed, the message has to be sent to all links, also
+  ** back.
+  ** Suicide kills are NOT passed on --SRB
+  */
+  if (!MyConnect(target_p))
+    {
+      relay_kill(client_p, source_p, target_p, inpath, reason);
+      /*
+      ** Set FLAGS_KILLED. This prevents exit_one_client from sending
+      ** the unnecessary QUIT for this. (This flag should never be
+      ** set in any other place)
+      */
+      target_p->flags |= FLAGS_KILLED;
+    }
+
+  ircsprintf(buf, "Killed (%s (%s))", source_p->name, reason);
+  
+  exit_client(client_p, target_p, source_p, buf);
+}
+
+/*
+ * ms_kill
+ *      parv[0] = sender prefix
+ *      parv[1] = kill victim
+ *      parv[2] = kill path and reason
+ */
+static void
+ms_kill(struct Client *client_p, struct Client *source_p,
+	int parc, char *parv[])
+{
+  struct Client *target_p;
+  char *user;
+  char *reason;
+  char *path;
+  int chasing = 0;
+
+  *buf = '\0';
+
+  if (*parv[1] == '\0')
+    {
+      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "KILL");
+      return;
+    }
+
+  if (!irccmp(parv[0], parv[1]))
+  {
+   sendto_one(source_p, ":%s NOTICE %s :You can't kill yourself!", me.name, parv[0]);
+   return;
+  }
+
+  user = parv[1];
+
+  if(BadPtr(parv[2]))
+  {
+    reason = "<No reason given>";
+
+    /* hyb6 takes the nick of the killer from the path *sigh* --fl_ */
+    path = source_p->name;
+  }
+  else
+  {
+    reason = strchr(parv[2], ' ');
+      
+    if(reason)
+    {
+      *reason = '\0';
+      reason++;
+    }
+    else
+      reason = "<No reason given>";
+
+    path = parv[2];
+  }
+
+  if ((target_p = find_client(user)) == NULL)
+    {
+      /*
+       * If the user has recently changed nick, but only if its 
+       * not an uid, automatically rewrite the KILL for this new nickname.
+       * --this keeps servers in synch when nick change and kill collide
+       */
+      if( (*user == '.')  ||
+	  (!(target_p = get_history(user, (long)KILLCHASETIMELIMIT))))
+        {
+          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+                     me.name, parv[0], user);
+          return;
+        }
+      sendto_one(source_p,":%s NOTICE %s :KILL changed from %s to %s",
+                 me.name, parv[0], user, target_p->name);
+      chasing = 1;
+    }
+    
+  if (IsServer(target_p) || IsMe(target_p))
+    {
+      sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+                 me.name, parv[0]);
+      return;
+    }
+
+  if(MyConnect(target_p))
+  {
+    if(IsServer(source_p))
+    {
+      /* dont send clients kills from a hidden server */
+      if(ConfigServerHide.hide_servers && !IsOper(target_p))
+        sendto_one(target_p, ":%s KILL %s :%s",
+ 		   me.name, target_p->name, reason);
+      else
+	sendto_one(target_p, ":%s KILL %s :%s",
+	           source_p->name, target_p->name, reason);
+    }
+    else
+      sendto_one(target_p, ":%s!%s@%s KILL %s :%s",
+		 source_p->name, source_p->username, source_p->host,
+		 target_p->name, reason);
+  }
+
+  /* Be warned, this message must be From %s, or it confuses clients
+   * so dont change it to From: or the case or anything! -- fl -- db */
+  /* path must contain at least 2 !'s, or bitchx falsely declares it
+   * local --fl
+   */
+  if (IsOper(source_p)) /* send it normally */
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+		"Received KILL message for %s. From %s Path: %s!%s!%s!%s %s",
+		target_p->name, parv[0], source_p->user->server, 
+                source_p->host, source_p->username, source_p->name, reason);
+    }
+  else
+    {
+      sendto_realops_flags(FLAGS_SKILL, L_ALL,
+			   "Received KILL message for %s. From %s %s",
+			   target_p->name, parv[0], reason);
+    }
+
+  ilog(L_INFO,"KILL From %s For %s Path %s %s",
+       parv[0], target_p->name, parv[0], reason);
+
+  relay_kill(client_p, source_p, target_p, path, reason);
+
+  /* FLAGS_KILLED prevents a quit being sent out */ 
+  SetKilled(target_p);
+
+  /* reason comes supplied with its own ()'s */
+  if(ConfigServerHide.hide_servers && IsServer(source_p))
+    ircsprintf(buf, "Killed (%s %s)", me.name, reason);
+  else
+    ircsprintf(buf, "Killed (%s %s)", source_p->name, reason);
+    
+  exit_client(client_p, target_p, source_p, buf);
+}
+
+static void
+relay_kill(struct Client *one, struct Client *source_p,
+	   struct Client *target_p, const char *inpath, const char *reason)
+{
+  dlink_node *ptr;
+  struct Client *client_p;
+  int introduce_killed_client;
+  char* user; 
+  
+  /* LazyLinks:
+   * Check if each lazylink knows about target_p.
+   *   If it does, send the kill, introducing source_p if required.
+   *   If it doesn't either:
+   *     a) don't send the kill (risk ghosts)
+   *     b) introduce the client (and source_p, if required)
+   *        [rather redundant]
+   *
+   * Use a) if IsServer(source_p), but if an oper kills someone,
+   * ensure we blow away any ghosts.
+   *
+   * -davidt
+   */
+
+  if(IsServer(source_p))
+    introduce_killed_client = 0;
+  else
+    introduce_killed_client = 1;
+
+  for( ptr = serv_list.head; ptr; ptr = ptr->next )
+  {
+    client_p = (struct Client *) ptr->data;
+    
+    if( !client_p || client_p == one )
+      continue;
+
+    if( !introduce_killed_client )
+    {
+      if( ServerInfo.hub && IsCapable(client_p, CAP_LL) )
+      {
+        if(((client_p->localClient->serverMask &
+             target_p->lazyLinkClientExists) == 0))
+        {
+          /* target isn't known to lazy leaf, skip it */
+          continue;
+        }
+      }
+    }
+    /* force introduction of killed client but check that
+     * its not on the server we're bursting too.. */
+    else if(strcmp(target_p->user->server,client_p->name))
+      client_burst_if_needed(client_p, target_p);
+
+    /* introduce source of kill */
+    client_burst_if_needed(client_p, source_p);
+
+    /* check the server supports UID */
+    if (IsCapable(client_p, CAP_UID))
+      user = ID(target_p);
+    else
+      user = target_p->name;
+
+    if(MyClient(source_p))
+      {
+        sendto_one(client_p, ":%s KILL %s :%s!%s!%s!%s (%s)",
+                   source_p->name, user,
+                   me.name, source_p->host, source_p->username,
+                   source_p->name, reason);
+      }
+    else
+      {
+        sendto_one(client_p, ":%s KILL %s :%s %s",
+                   source_p->name, user,
+                   inpath, reason);
+      }
+  }
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_kline.c ircd-hybrid-fuis/modules/m_kline.c
--- ircd-hybrid-7.0rc9/modules/m_kline.c	Wed Nov 13 08:12:02 2002
+++ ircd-hybrid-fuis/modules/m_kline.c	Sun Feb  9 08:21:20 2003
@@ -235,18 +235,20 @@
   if (tkline_time)
     {
       ircsprintf(buffer,
-		 "Temporary K-line %d min. - %s (%s)",
+		 "Temporary K-line %d min. - %s (%s by %s)",
 		 (int)(tkline_time/60),
 		 reason,
-		 current_date);
+		 current_date,
+		 source_p->name);
       DupString(aconf->passwd, buffer);
       apply_tkline(source_p, aconf, current_date, tkline_time);
     }
   else
     {
-      ircsprintf(buffer, "%s (%s)",
+      ircsprintf(buffer, "%s (%s by %s)",
 		 reason,
-		 current_date);
+		 current_date,
+		 source_p->name);
       DupString(aconf->passwd, buffer);
       apply_kline(source_p, aconf, reason, oper_reason,
 		  current_date, cur_time);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_links.c ircd-hybrid-fuis/modules/m_links.c
--- ircd-hybrid-7.0rc9/modules/m_links.c	Wed Jul 31 12:24:07 2002
+++ ircd-hybrid-fuis/modules/m_links.c	Tue Feb 11 08:20:50 2003
@@ -51,14 +51,12 @@
 void
 _modinit(void)
 {
-	hook_add_event("doing_links");
   mod_add_cmd(&links_msgtab);
 }
 
 void
 _moddeinit(void)
 {
-	hook_del_event("doing_links");
   mod_del_cmd(&links_msgtab);
 }
 
@@ -77,6 +75,18 @@
 static void m_links(struct Client *client_p, struct Client *source_p,
                    int parc, char *parv[])
 {
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+               "LINKS requested by %s (%s@%s) [%s]",
+               source_p->name, source_p->username,
+               source_p->host, source_p->user->server);
+
+  if (!IsOper(source_p))
+  {
+    sendto_one(source_p, form_str(RPL_LINKSUSERS),
+  	           me.name, parv[0], ConfigFileEntry.network_server_site);
+	return;
+  }
+
   if (!ConfigServerHide.flatten_links)
     {
       mo_links(client_p, source_p, parc, parv);
@@ -104,7 +114,6 @@
   struct Client* target_p;
   char           clean_mask[2 * HOSTLEN + 4];
   char*          p;
-  struct hook_links_data hd;
   
   dlink_node *ptr;
 
@@ -127,14 +136,7 @@
   if (*mask)       /* only necessary if there is a mask */
     mask = collapse(clean_string(clean_mask, (const unsigned char*) mask, 2 * HOSTLEN));
 
-  hd.client_p = client_p;
-  hd.source_p = source_p;
-  hd.mask = mask;
-  hd.parc = parc;
-  hd.parv = parv;
-  
-  hook_call_event("doing_links", &hd);
-  
+
   for (ptr = global_serv_list.head; ptr; ptr = ptr->next)
     {
       target_p = ptr->data;
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_list.c ircd-hybrid-fuis/modules/m_list.c
--- ircd-hybrid-7.0rc9/modules/m_list.c	Fri Jan 17 00:11:53 2003
+++ ircd-hybrid-fuis/modules/m_list.c	Sun Feb  9 08:21:20 2003
@@ -245,7 +245,7 @@
 #endif
     ircsprintf(id_and_topic, "%s", chptr->topic == NULL ? "" : chptr->topic);
 
-  if (ShowChannel(source_p, chptr))
+  if (ShowChannel(source_p, chptr) && chptr->users > 2)
     sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
                chptr->chname, chptr->users, id_and_topic);
       
@@ -256,7 +256,7 @@
     {
       tmpchptr = ptr->data;
 
-      if (ShowChannel(source_p, tmpchptr))
+      if (ShowChannel(source_p, tmpchptr) && chptr->users > 2)
 	{
           root_chptr = find_bchan(tmpchptr);
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(tmpchptr), tmpchptr->topic == NULL ? "" : chptr->topic);
@@ -288,20 +288,20 @@
     {
       root_chptr = find_bchan(chptr);
       
-      if(root_chptr != NULL)
+      if(root_chptr != NULL && chptr->users > 2)
         {
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(chptr), chptr->topic == NULL ? "" : chptr->topic );
           sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
                      root_chptr->chname, chptr->users, id_and_topic);
         }
-      else
+      else if (chptr->users > 2)
         {
           ircsprintf(id_and_topic, "<!%s> %s", pick_vchan_id(chptr), chptr->topic == NULL ? "" : chptr->topic );
           sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
                      chptr->chname, chptr->users, id_and_topic);     
         }
     }
-  else
+  else if (chptr->users > 2)
 #endif
     {
       sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_ltrace.c ircd-hybrid-fuis/modules/m_ltrace.c
--- ircd-hybrid-7.0rc9/modules/m_ltrace.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_ltrace.c	Tue Feb 11 08:21:08 2003
@@ -0,0 +1,374 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_ltrace.c: Traces a path to a client/server.
+ *
+ *  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: m_ltrace.c,v 1.4 2002/07/31 22:52:58 leeh Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "class.h"
+#include "hook.h"
+#include "client.h"
+#include "hash.h"
+#include "common.h"
+#include "hash.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static void m_ltrace(struct Client *, struct Client *, int, char **);
+static void mo_ltrace(struct Client*, struct Client*, int, char**);
+static struct Client* next_client_double(struct Client *next, const char* ch);
+static void ltrace_spy(struct Client *);
+
+struct Message ltrace_msgtab = {
+  "LTRACE", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_ltrace, mo_ltrace, mo_ltrace}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&ltrace_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&ltrace_msgtab);
+}
+
+const char *_version = "$Revision: 1.4 $";
+#endif
+
+static int report_this_status(struct Client *source_p, struct Client *target_p,int dow,
+                              int link_u_p, int link_u_s);
+
+/*
+ * m_ltrace()
+ *
+ *	parv[0] = sender prefix
+ *	parv[1] = target client/server to trace
+ */
+static void m_ltrace(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  char *tname;
+
+  if (parc > 1)
+    tname = parv[1];
+  else
+    tname = me.name;
+  sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
+}
+
+/*
+ * mo_ltrace
+ *      parv[0] = sender prefix
+ *      parv[1] = servername
+ */
+static void mo_ltrace(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct Client       *target_p = NULL;
+  char  *tname;
+  int   doall, link_s[MAXCONNECTIONS], link_u[MAXCONNECTIONS];
+  int   wilds, dow;
+  dlink_node *ptr;
+  char *looking_for = parv[0];
+
+  if(!IsClient(source_p))
+    return;
+
+  if (parc > 1)
+    tname = parv[1];
+  else
+    tname = me.name;
+
+  if(!IsOper(source_p))
+  {
+    sendto_one(source_p, form_str(RPL_ENDOFTRACE), me.name, parv[0], tname);
+    return;
+  }
+
+  if (parc > 2)
+    if (hunt_server(client_p, source_p, ":%s LTRACE %s :%s", 2, parc, parv))
+      return;
+
+  switch (hunt_server(client_p, source_p, ":%s LTRACE :%s", 1, parc, parv))
+    {
+    case HUNTED_PASS: /* note: gets here only if parv[1] exists */
+      {
+        struct Client *ac2ptr;
+        
+        ac2ptr = next_client_double(GlobalClientList, tname);
+        if (ac2ptr)
+          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+                     ircd_version, debugmode, tname, ac2ptr->from->name);
+        else
+          sendto_one(source_p, form_str(RPL_TRACELINK), me.name, looking_for,
+                     ircd_version, debugmode, tname, "ac2ptr_is_NULL!!");
+        return;
+      }
+    case HUNTED_ISME:
+      break;
+    default:
+      return;
+    }
+
+  ltrace_spy(source_p);
+
+  doall = (parv[1] && (parc > 1)) ? match(tname, me.name): TRUE;
+  wilds = !parv[1] || strchr(tname, '*') || strchr(tname, '?');
+  dow = wilds || doall;
+  
+  set_time();
+
+  /* lusers cant issue ltrace.. */
+  if(!IsOper(source_p) || !dow)
+    {
+      const char* name;
+      const char* class_name;
+      char ipaddr[HOSTIPLEN];
+
+      target_p = find_client(tname);
+      
+      if(target_p && IsPerson(target_p)) 
+      {
+        name = get_client_name(target_p, HIDE_IP);
+        inetntop(target_p->localClient->aftype, &IN_ADDR(target_p->localClient->ip), ipaddr, HOSTIPLEN);
+
+        class_name = get_client_class(target_p);
+
+        if (IsOper(target_p))
+          sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+                     me.name, parv[0], class_name, name, 
+#ifndef HIDE_SPOOF_IPS
+                     MyOper(source_p) ? ipaddr :
+#endif
+		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
+                     CurrentTime - target_p->lasttime,
+                     (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
+      }
+      
+      sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name,
+                 parv[0], tname);
+      return;
+    }
+
+  memset((void *)link_s,0,sizeof(link_s));
+  memset((void *)link_u,0,sizeof(link_u));
+
+  /*
+   * Count up all the servers and clients in a downlink.
+   */
+  if (doall)
+   {
+    for (target_p = GlobalClientList; target_p; target_p = target_p->next)
+     {
+      if (IsPerson(target_p))
+        {
+          link_u[target_p->from->localClient->fd]++;
+        }
+      else if (IsServer(target_p))
+	{
+	  link_s[target_p->from->localClient->fd]++;
+	}
+     }
+   }
+   
+  /* report all opers */
+  for (ptr = lclient_list.head; ptr; ptr = ptr->next)
+    {
+      target_p = ptr->data;
+
+      if(!IsOper(target_p))
+	continue;
+
+      if (!doall && wilds && !match(tname, target_p->name))
+        continue;
+
+      if (!dow && irccmp(tname, target_p->name))
+        continue;
+
+      report_this_status(source_p,target_p,dow,0,0);
+    }
+
+  /* report all servers */
+  for (ptr = serv_list.head; ptr; ptr = ptr->next)
+    {
+      target_p = ptr->data;
+
+      if (!doall && wilds && !match(tname, target_p->name))
+        continue;
+      if (!dow && irccmp(tname, target_p->name))
+        continue;
+
+      report_this_status(source_p, target_p, dow,
+                               link_u[target_p->localClient->fd],
+                               link_s[target_p->localClient->fd]);
+    }
+
+  sendto_one(source_p, form_str(RPL_ENDOFTRACE),me.name, parv[0],tname);
+}
+
+
+
+
+/*
+ * report_this_status
+ *
+ * inputs	- pointer to client to report to
+ * 		- pointer to client to report about
+ * output	- counter of number of hits
+ * side effects - NONE
+ */
+static int report_this_status(struct Client *source_p, struct Client *target_p,
+                              int dow, int link_u_p, int link_s_p)
+{
+  const char* name;
+  const char* class_name;
+  char  ip[HOSTIPLEN];
+
+  inetntop(target_p->localClient->aftype, &IN_ADDR(target_p->localClient->ip), ip, HOSTIPLEN);
+  name = get_client_name(target_p, HIDE_IP);
+  class_name = get_client_class(target_p);
+
+  set_time();
+
+  switch(target_p->status)
+    {
+    case STAT_CONNECTING:
+      sendto_one(source_p, form_str(RPL_TRACECONNECTING), me.name,
+                 source_p->name, class_name, 
+		 IsOperAdmin(source_p) ? name : target_p->name);
+		   
+      break;
+
+    case STAT_HANDSHAKE:
+      sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE), me.name,
+                 source_p->name, class_name, 
+                 IsOperAdmin(source_p) ? name : target_p->name);
+		   
+      break;
+      
+    case STAT_ME:
+    case STAT_UNKNOWN:
+      break;
+
+    case STAT_CLIENT:
+      if (IsAdmin(target_p))
+	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+                   me.name, source_p->name, class_name, name,
+#ifndef HIDE_SPOOF_IPS
+                   IsOperAdmin(source_p) ? ip : 
+#endif
+                   (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
+                   CurrentTime - target_p->lasttime,
+                   (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
+		       
+      else if (IsOper(target_p))
+	sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+		   me.name, source_p->name, class_name, name, 
+#ifndef HIDE_SPOOF_IPS
+		   MyOper(source_p) ? ip : 
+#endif
+		   (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
+		   CurrentTime - target_p->lasttime,
+		   (target_p->user)?(CurrentTime - target_p->user->last):0);
+
+      break;
+    case STAT_SERVER:
+      if(!IsOperAdmin(source_p))
+        name = get_client_name(target_p, MASK_IP);
+
+      sendto_one(source_p, form_str(RPL_TRACESERVER),
+		 me.name, source_p->name, class_name, link_s_p,
+		 link_u_p, name, *(target_p->serv->by) ?
+		 target_p->serv->by : "*", "*",
+		 me.name, CurrentTime - target_p->lasttime);
+      break;
+      
+    default: /* ...we actually shouldn't come here... --msa */
+      sendto_one(source_p, form_str(RPL_TRACENEWTYPE), me.name,
+		 source_p->name, name);
+      break;
+    }
+
+  return 0;
+}
+
+/* ltrace_spy()
+ *
+ * input        - pointer to client
+ * output       - none
+ * side effects - hook event doing_trace is called
+ */
+static void ltrace_spy(struct Client *source_p)
+{
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+           "ltrace requested by %s (%s@%s) [%s]",
+		   source_p->name, source_p->username,
+		   source_p->host, source_p->user->server);
+}
+
+/* 
+ * this slow version needs to be used for hostmasks *sigh
+ *
+ * next_client_double - find the next matching client. 
+ * The search can be continued from the specified client entry. 
+ * Normal usage loop is:
+ *
+ *      for (x = client; x = next_client_double(x,mask); x = x->next)
+ *              HandleMatchingClient;
+ *            
+ */
+static struct Client* 
+next_client_double(struct Client *next, /* First client to check */
+                   const char* ch)      /* search string (may include wilds) */
+{
+  struct Client *tmp = next;
+
+  next = find_client(ch);
+
+  if (next == NULL)
+    next = tmp;
+
+  if (tmp && tmp->prev == next)
+    return NULL;
+  if (next != tmp)
+    return next;
+  for ( ; next; next = next->next)
+    {
+      if (match(ch,next->name) || match(next->name,ch))
+        break;
+    }
+  return next;
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_map.c ircd-hybrid-fuis/modules/m_map.c
--- ircd-hybrid-7.0rc9/modules/m_map.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_map.c	Wed Feb 19 08:08:33 2003
@@ -0,0 +1,163 @@
+/*
+ *  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 (!IsOper(source_p))
+    {
+       sendto_one(source_p, form_str(RPL_LINKSUSERS),
+       me.name, parv[0], ConfigFileEntry.network_server_site);
+       return;
+}
+
+  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 -x doc -x help ircd-hybrid-7.0rc9/modules/m_message.c ircd-hybrid-fuis/modules/m_message.c
--- ircd-hybrid-7.0rc9/modules/m_message.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_message.c	Sat Mar 22 18:55:33 2003
@@ -0,0 +1,1222 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_message.c: Sends a (PRIVMSG|NOTICE) message to a user or channel.
+ *
+ *  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_message.c,v 1.107 2003/02/03 05:25:47 bill Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "common.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+#include "channel.h"
+#include "channel_mode.h"
+#include "vchannel.h"
+#include "irc_string.h"
+#include "hash.h"
+#include "class.h"
+#include "msg.h"
+#include "packet.h"
+#include "resv.h"
+#include "list.h"
+
+struct entity
+{
+  void *ptr;
+  int type;
+  int flags;
+};
+
+static int build_target_list(int p_or_n, char *command,
+                             struct Client *client_p,
+                             struct Client *source_p,
+                             char *nicks_channels, char *text);
+
+static int check_repeat(struct Client *, struct Channel *, char *);
+static int check_for_dccsend(char *);
+static int dcccheckproc(struct Client *, struct Client *, char *);
+
+static int flood_attack_client(int p_or_n, struct Client *source_p,
+                               struct Client *target_p);
+static int flood_attack_channel(int p_or_n, struct Client *source_p,
+                                struct Channel *chptr, char *chname);
+static struct Client* find_userhost (char *, char *, int *);
+int find_color_ctcp(char *, int);
+
+#define ENTITY_NONE    0
+#define ENTITY_CHANNEL 1
+#define ENTITY_CHANOPS_ON_CHANNEL 2
+#define ENTITY_CLIENT  3
+
+static struct entity targets[512];
+static int ntargets = 0;
+
+static int duplicate_ptr(void *);
+
+static void m_message(int, char *, struct Client *,
+                      struct Client *, int, char **);
+
+static void m_privmsg(struct Client *, struct Client *, int, char **);
+static void m_notice(struct Client *, struct Client *, int, char **);
+
+static void msg_channel(int p_or_n, char *command,
+                        struct Client *client_p,
+                        struct Client *source_p,
+                        struct Channel *chptr, char *text);
+
+static void msg_channel_flags(int p_or_n, char *command,
+                              struct Client *client_p,
+                              struct Client *source_p,
+                              struct Channel *chptr, int flags, char *text);
+
+static void msg_client(int p_or_n, char *command,
+                       struct Client *source_p, struct Client *target_p,
+                       char *text);
+void clean_ts(time_t **, int, int);
+static void handle_special(int p_or_n, char *command,
+			   struct Client *client_p,
+			   struct Client *source_p, char *nick, char *text);
+
+struct Message privmsg_msgtab = {
+  "PRIVMSG", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0L,
+  {m_unregistered, m_privmsg, m_privmsg, m_privmsg}
+};
+
+struct Message notice_msgtab = {
+  "NOTICE", 0, 0, 1, 0, MFLG_SLOW, 0L,
+  {m_unregistered, m_notice, m_notice, m_notice}
+};
+
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&privmsg_msgtab);
+  mod_add_cmd(&notice_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&privmsg_msgtab);
+  mod_del_cmd(&notice_msgtab);
+}
+
+const char *_version = "$Revision: 1.107 $";
+#endif
+
+/*
+** m_privmsg
+**
+** massive cleanup
+** rev argv 6/91
+**
+**   Another massive cleanup Nov, 2000
+** (I don't think there is a single line left from 6/91. Maybe.)
+** m_privmsg and m_notice do basically the same thing.
+** in the original 2.8.2 code base, they were the same function
+** "m_message.c." When we did the great cleanup in conjuncton with bleep
+** of ircu fame, we split m_privmsg.c and m_notice.c.
+** I don't see the point of that now. Its harder to maintain, its
+** easier to introduce bugs into one version and not the other etc.
+** Really, the penalty of an extra function call isn't that big a deal folks.
+** -db Nov 13, 2000
+**
+*/
+
+#define PRIVMSG 0
+#define NOTICE  1
+
+static void
+m_privmsg(struct Client *client_p,
+          struct Client *source_p, int parc, char *parv[])
+{
+  char equiv[NICKLEN + 1];
+
+  if (!IsPerson(source_p))
+    return;
+
+  if (parc > 1)
+    if (parv[1][0] && get_equiv_nick(parv[1], equiv))
+        parv[1] = equiv;
+			  
+  m_message(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
+}
+
+static void
+m_notice(struct Client *client_p,
+         struct Client *source_p, int parc, char *parv[])
+{
+  char equiv[NICKLEN + 1];
+  
+  if (parc > 1)
+	if (parv[1][0] && get_equiv_nick(parv[1], equiv))
+	    parv[1] = equiv;
+			  
+  m_message(NOTICE, "NOTICE", client_p, source_p, parc, parv);
+}
+
+/*
+ * inputs	- flag privmsg or notice
+ * 		- pointer to command "PRIVMSG" or "NOTICE"
+ *		- pointer to client_p
+ *		- pointer to source_p
+ *		- pointer to channel
+ */
+static void
+m_message(int p_or_n,
+          char *command,
+          struct Client *client_p,
+          struct Client *source_p, int parc, char *parv[])
+{
+  int i;
+  struct Client *target_p;
+
+  if (parc < 2 || *parv[1] == '\0')
+  {
+    if (p_or_n != NOTICE)
+      sendto_one(source_p, form_str(ERR_NORECIPIENT), me.name,
+                 source_p->name, command);
+    return;
+  }
+
+  if (parc < 3 || *parv[2] == '\0')
+  {
+    if (p_or_n != NOTICE)
+      sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name,
+                 source_p->name);
+    return;
+  }
+
+  /* Finish the flood grace period... */
+  if(MyClient(source_p) && !IsFloodDone(source_p))
+    flood_endgrace(source_p);
+
+  if ((target_p = find_person(parv[1]))) {
+  }
+
+  if (build_target_list(p_or_n, command, client_p, source_p, parv[1],
+                        parv[2]) < 0)
+  {
+    /* Sigh.  We need to relay this command to the hub */
+    if (!ServerInfo.hub && (uplink != NULL))
+      sendto_one(uplink, ":%s %s %s :%s",
+		 source_p->name, command, parv[1], parv[2]);
+    return;
+  }
+
+  for (i = 0; i < ntargets; i++)
+  {
+    switch (targets[i].type)
+    {
+      case ENTITY_CHANNEL:
+        msg_channel(p_or_n, command, client_p, source_p,
+                    (struct Channel *)targets[i].ptr, parv[2]);
+        break;
+
+      case ENTITY_CHANOPS_ON_CHANNEL:
+        msg_channel_flags(p_or_n, command, client_p, source_p,
+                          (struct Channel *)targets[i].ptr,
+                          targets[i].flags, parv[2]);
+        break;
+
+      case ENTITY_CLIENT:
+        msg_client(p_or_n, command, source_p,
+                   (struct Client *)targets[i].ptr, parv[2]);
+        break;
+    }
+  }
+}
+
+/*
+ * build_target_list
+ *
+ * inputs	- pointer to given client_p (server)
+ *		- pointer to given source (oper/client etc.)
+ *		- pointer to list of nicks/channels
+ *		- pointer to table to place results
+ *		- pointer to text (only used if source_p is an oper)
+ * output	- number of valid entities
+ * side effects	- target_table is modified to contain a list of
+ *		  pointers to channels or clients
+ *		  if source client is an oper
+ *		  all the classic old bizzare oper privmsg tricks
+ *		  are parsed and sent as is, if prefixed with $
+ *		  to disambiguate.
+ *
+ */
+
+static int
+build_target_list(int p_or_n, char *command, struct Client *client_p,
+                  struct Client *source_p, char *nicks_channels,
+                  char *text)
+{
+  int type;
+  char *p, *nick, *target_list, ncbuf[BUFSIZE];
+  struct Channel *chptr=NULL;
+  struct Client *target_p;
+
+  /* Sigh, we can't mutilate parv[1] incase we need it to send to a hub */
+  if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
+  {
+    strncpy(ncbuf, nicks_channels, BUFSIZE);
+    target_list = ncbuf;
+  }
+  else
+    target_list = nicks_channels; /* skip strcpy for non-lazyleafs */
+
+  ntargets = 0;
+
+  for (nick = strtoken(&p, target_list, ","); nick;
+       nick = strtoken(&p, (char *)NULL, ","))
+  {
+    char *with_prefix;
+    /*
+     * channels are privmsg'd a lot more than other clients, moved up
+     * here plain old channel msg?
+     */
+
+    if (IsChanPrefix(*nick))
+    {
+      /* ignore send of local channel to a server (should not happen) */
+      if (IsServer(client_p) && *nick == '&')
+        continue;
+
+      if ((chptr = hash_find_channel(nick)) != NULL)
+      {
+        if (!duplicate_ptr(chptr))
+        {
+          if (ntargets >= ConfigFileEntry.max_targets)
+	    {
+	      sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+			 me.name, source_p->name, nick);
+	      return (1);
+	    }
+          targets[ntargets].ptr = (void *)chptr;
+          targets[ntargets++].type = ENTITY_CHANNEL;
+        }
+      }
+      else
+      {
+        if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
+          return -1;
+        else if (p_or_n != NOTICE)
+          sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+                     source_p->name, nick);
+      }
+      continue;
+    }
+
+    /* look for a privmsg to another client */
+    if ((target_p = find_person(nick)) != NULL)
+    {
+      if (!duplicate_ptr(target_p))
+      {
+        if (ntargets >= ConfigFileEntry.max_targets)
+	  {
+	    sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+		       me.name, source_p->name, nick);
+	    return (1);
+	  }
+        targets[ntargets].ptr = (void *)target_p;
+        targets[ntargets].type = ENTITY_CLIENT;
+        targets[ntargets++].flags = 0;
+      }
+      continue;
+    }
+    
+    /* @#channel or +#channel message ? */
+
+    type = 0;
+    with_prefix = nick;
+    /*  allow %+@ if someone wants to do that */
+    for (;;)
+    {
+      if (*nick == '@')
+        type |= MODE_CHANOP;
+      else if (*nick == '%')
+        type |= MODE_CHANOP | MODE_HALFOP;
+      else if (*nick == '+')
+        type |= MODE_CHANOP | MODE_HALFOP | MODE_VOICE;
+      else
+        break;
+      nick++;
+    }
+
+    if (type != 0)
+    {
+      /* suggested by Mortiis */
+      if (*nick == '\0')      /* if its a '\0' dump it, there is no recipient */
+	{
+	  sendto_one(source_p, form_str(ERR_NORECIPIENT),
+		     me.name, source_p->name, command);
+	  continue;
+	}
+
+      /* At this point, nick+1 should be a channel name i.e. #foo or &foo
+       * if the channel is found, fine, if not report an error
+       */
+
+      if ((chptr = hash_find_channel(nick)) != NULL)
+	{
+	  if(!is_any_op(chptr, source_p) && !is_voiced(chptr, source_p))
+	    {
+	      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+			 source_p->name, with_prefix);
+	      return(-1);
+	    }
+
+	  if (!duplicate_ptr(chptr))
+	    {
+	      if (ntargets >= ConfigFileEntry.max_targets)
+		{
+		  sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+			     me.name, source_p->name, nick);
+		  return (1);
+		}
+	      targets[ntargets].ptr = (void *)chptr;
+	      targets[ntargets].type = ENTITY_CHANOPS_ON_CHANNEL;
+	      targets[ntargets++].flags = type;
+	    }
+	}
+      else
+	{
+	  if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
+	    return -1;
+	  else if (p_or_n != NOTICE)
+	    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+		       source_p->name, nick);
+	}
+      continue;
+    }
+
+    if(((*nick == '$') || strchr(nick, '@')))
+    {
+      handle_special(p_or_n, command, client_p, source_p, nick, text);
+    }
+    else
+    {
+      if (!ServerInfo.hub && (uplink != NULL) && IsCapable(uplink, CAP_LL))
+        return -1;
+      else if(p_or_n != NOTICE)
+        sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+	           me.name, source_p->name, nick);
+    }
+    /* continue; */
+  }
+  return (1);
+}
+
+/*
+ * duplicate_ptr
+ *
+ * inputs	- pointer to check
+ *		- pointer to table of entities
+ *		- number of valid entities so far
+ * output	- YES if duplicate pointer in table, NO if not.
+ *		  note, this does the canonize using pointers
+ * side effects	- NONE
+ */
+static int
+duplicate_ptr(void *ptr)
+{
+  int i;
+  for (i = 0; i < ntargets; i++)
+    if (targets[i].ptr == ptr)
+      return YES;
+  return NO;
+}
+
+/*
+ * msg_channel
+ *
+ * inputs	- flag privmsg or notice
+ * 		- pointer to command "PRIVMSG" or "NOTICE"
+ *		- pointer to client_p
+ *		- pointer to source_p
+ *		- pointer to channel
+ * output	- NONE
+ * side effects	- message given channel
+ */
+static void
+msg_channel(int p_or_n, char *command,
+            struct Client *client_p,
+            struct Client *source_p, struct Channel *chptr, char *text)
+{
+  struct Channel *vchan = NULL;
+  char *chname = NULL;
+  int result;
+  struct ResvNick *ptr;
+  
+  chname = RootChan(chptr)->chname;
+
+#ifdef VCHANS
+  if (HasVchans(chptr))
+    vchan = map_vchan(chptr, source_p);
+#endif
+  
+  if (!vchan)
+    vchan = chptr;
+ 
+  if (find_color_ctcp(text, 1) && (vchan->mode.mode & MODE_NOCOLOR) &&
+      !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)))
+  {
+	sendto_one(source_p, form_str(ERR_NOCOLOR), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if (find_color_ctcp(text, 0) && ircncmp(text, "\001ACTION", 7) && (vchan->mode.mode & MODE_NOCTCP) &&
+			 !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)) &&
+		     !is_any_op(vchan, source_p) && !is_voiced(vchan, source_p)) {
+	sendto_one(source_p, form_str(ERR_NOCTCP), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if ((vchan->mode.mode & MODE_NOTALK) && ServicesOn &&
+		     (!IsNSId(source_p) || source_p->ns_reg + ConfigFileEntry.how_old >= time(NULL)) &&
+		     !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)) &&
+		     !IsOper(source_p)) {
+    sendto_one(source_p, form_str(ERR_NOTALK), me.name,
+	           source_p->name, vchan->chname);
+	return;
+  } else if ((vchan->mode.mode & MODE_NOSPAM) && (IsAdvQuit(text))) {
+	sendto_one(source_p, form_str(ERR_NOSPAM), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if (!is_any_op(vchan, source_p) && NoRepeatChannel(vchan) && !IsOper(source_p)) {
+    if (check_repeat(source_p, vchan, text)) {
+	  sendto_one(source_p, form_str(ERR_NOREPEATING),
+		         me.name, source_p->name, vchan->chname);
+      return;
+    }
+  }
+
+  if (MyClient(source_p))
+  {
+    /* idle time shouldnt be reset by notices --fl it should be - FUIS */
+/*    if ((p_or_n != NOTICE) && source_p->user) */
+      source_p->user->last = CurrentTime;
+  }
+
+  /* chanops and voiced can flood their own channel with impunity */
+  if ((result = can_send(vchan, source_p)))
+  {
+    if (result == CAN_SEND_OPV ||
+        !flood_attack_channel(p_or_n, source_p, vchan, chname))
+    {
+      sendto_channel_butone(client_p, source_p, vchan, command, ":%s", text);
+    }
+  }
+  else
+  {
+    if (p_or_n != NOTICE)
+      sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN),
+                 me.name, source_p->name, chname);
+  }
+}
+
+/*
+ * msg_channel_flags
+ *
+ * inputs	- flag 0 if PRIVMSG 1 if NOTICE. RFC 
+ *		  say NOTICE must not auto reply
+ *		- pointer to command, "PRIVMSG" or "NOTICE"
+ *		- pointer to client_p
+ *		- pointer to source_p
+ *		- pointer to channel
+ *		- flags
+ *		- pointer to text to send
+ * output	- NONE
+ * side effects	- message given channel either chanop or voice
+ */
+static void
+msg_channel_flags(int p_or_n, char *command, struct Client *client_p,
+                  struct Client *source_p, struct Channel *chptr,
+                  int flags, char *text)
+{
+  struct Channel *vchan = NULL;
+  char *chname = NULL;
+  int type;
+  char c;
+  struct ResvNick *ptr;
+
+  if (flags & MODE_VOICE)
+  {
+    type = ONLY_CHANOPS_HALFOPS_VOICED;
+    c = '+';
+  }
+  else if (flags & MODE_HALFOP)
+  {
+    type = ONLY_CHANOPS_HALFOPS;
+    c = '%';
+  }
+  else
+  {
+    type = ONLY_CHANOPS;
+    c = '@';
+  }
+
+  chname = RootChan(chptr)->chname;
+
+#ifdef VCHANS
+  if (HasVchans(chptr))
+    vchan = map_vchan(chptr, source_p);
+#endif
+
+  if (!vchan)
+    vchan = chptr;
+
+  if (find_color_ctcp(text, 1) && (vchan->mode.mode & MODE_NOCOLOR) &&
+      !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)))
+  {
+	sendto_one(source_p, form_str(ERR_NOCOLOR), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if (find_color_ctcp(text, 0) && ircncmp(text, "\001ACTION", 7) && (vchan->mode.mode & MODE_NOCTCP) &&
+			 !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)) &&
+		     !is_any_op(vchan, source_p) && !is_voiced(vchan, source_p)) {
+	sendto_one(source_p, form_str(ERR_NOCTCP), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if ((vchan->mode.mode & MODE_NOTALK) && ServicesOn &&
+		     (!IsNSId(source_p) || source_p->ns_reg + ConfigFileEntry.how_old >= time(NULL)) &&
+		     !((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)) &&
+		     !IsOper(source_p)) {
+    sendto_one(source_p, form_str(ERR_NOTALK), me.name,
+	           source_p->name, vchan->chname);
+	return;
+  } else if ((vchan->mode.mode & MODE_NOSPAM) && (IsAdvQuit(text))) {
+	sendto_one(source_p, form_str(ERR_NOSPAM), me.name,
+               source_p->name, vchan->chname);
+	return;
+  } else if (!is_any_op(vchan, source_p) && NoRepeatChannel(vchan) && !IsOper(source_p)) {
+    if (check_repeat(source_p, vchan, text)) {
+	  sendto_one(source_p, form_str(ERR_NOREPEATING),
+		         me.name, source_p->name, vchan->chname);
+      return;
+    }
+  }
+
+  if (MyClient(source_p))
+  {
+    /* idletime shouldnt be reset by notice --fl */
+    if ((p_or_n != NOTICE) && source_p->user)
+      source_p->user->last = CurrentTime;
+
+    sendto_channel_local_butone(source_p, type, vchan, ":%s!%s@%s %s %c%s :%s",
+                                source_p->name, source_p->username,
+                                source_p->host, command, c, chname, text);
+  }
+  else
+  {
+    /*
+     * another good catch, lee.  we never would echo to remote clients anyway,
+     * so use slightly less intensive sendto_channel_local()
+     */
+    sendto_channel_local(type, vchan, ":%s!%s@%s %s %c%s :%s",
+                         source_p->name, source_p->username,
+                         source_p->host, command, c, chname, text);
+  }
+
+  if (chptr->chname[0] == '&')
+    return;
+
+  sendto_channel_remote(source_p, client_p, type, CAP_CHW, CAP_UID, vchan,
+                ":%s %s %c%s :%s", source_p->name, command, c,
+                vchan->chname, text);
+  sendto_channel_remote(source_p, client_p, type, CAP_CHW|CAP_UID, NOCAPS, vchan,
+                ":%s %s %c%s :%s", ID(source_p), command, c,
+                vchan->chname, text);
+
+  /* non CAP_CHW servers? */
+}
+
+/*
+ * msg_client
+ *
+ * inputs	- flag 0 if PRIVMSG 1 if NOTICE. RFC 
+ *		  say NOTICE must not auto reply
+ *		- pointer to command, "PRIVMSG" or "NOTICE"
+ * 		- pointer to source_p source (struct Client *)
+ *		- pointer to target_p target (struct Client *)
+ *		- pointer to text
+ * output	- NONE
+ * side effects	- message given channel either chanop or voice
+ */
+static void
+msg_client(int p_or_n, char *command,
+           struct Client *source_p, struct Client *target_p, char *text)
+{
+  struct ResvNick *ptr;
+  if (MyClient(source_p))
+  {
+    /* reset idle time for message only if its not to self 
+     * and its not a notice */
+/*    if ((p_or_n != NOTICE) && (source_p != target_p) && source_p->user)*/
+      source_p->user->last = CurrentTime; 
+  }
+
+    if (p_or_n != NOTICE && MyConnect(target_p))
+     if (dcccheckproc(source_p, target_p, text))
+	   return;
+
+	if (source_p->user && ServicesOn && HasSilence(target_p) &&
+	    (target_p != source_p) && !IsOper(target_p) && (!IsNSId(source_p) ||
+		source_p->ns_reg + ConfigFileEntry.how_old >= time(NULL)) &&
+		!((ptr = return_nick_resv(source_p->name)) && !irccmp(ptr->reason, ConfigFileEntry.services_qline)))
+	{
+	  sendto_one(source_p, ":%s NOTICE %s :Error: %s is in silence mode and does NOT accept messages from unregistered/unidentified (too recently registered) nicknames",
+				 me.name, source_p->name, target_p->name);
+	  sendto_one(source_p, ":%s NOTICE %s :Error: If you want to send messages to %s you will have to identify or register your nickname",
+				 me.name, source_p->name, target_p->name);
+	  return;
+	} else if (source_p->user && (IsSetTransWin(target_p) || IsSetTransISO(target_p))) {
+	  text = translate(target_p, text);
+	}
+
+  if (MyConnect(source_p) && (p_or_n != NOTICE) &&
+      target_p->user && target_p->user->away)
+    sendto_one(source_p, form_str(RPL_AWAY), me.name,
+               source_p->name, target_p->name, target_p->user->away);
+
+  if (MyClient(target_p))
+  {
+    if (!IsServer(source_p) && IsSetCallerId(target_p) && source_p != target_p && source_p->host != ConfigFileEntry.services_host)
+    {
+      /* Here is the anti-flood bot/spambot code -db */
+      if (accept_message(source_p, target_p))
+      {
+        sendto_one(target_p, ":%s!%s@%s %s %s :%s",
+                   source_p->name,
+                   source_p->username,
+                   source_p->host, command, target_p->name, text);
+      }
+      else
+      {
+        /* check for accept, flag recipient incoming message */
+        if (p_or_n != NOTICE)
+          sendto_anywhere(source_p, target_p,
+                          "NOTICE %s :*** I'm in +g mode (server side ignore).",
+                          source_p->name);
+
+        if ((target_p->localClient->last_caller_id_time +
+             ConfigFileEntry.caller_id_wait) < CurrentTime)
+        {
+          if (p_or_n != NOTICE)
+            sendto_anywhere(source_p, target_p,
+                            "NOTICE %s :*** I've been informed you messaged me.",
+                            source_p->name);
+
+          sendto_one(target_p,
+                     ":%s NOTICE %s :*** Client %s is messaging you and you are +g",
+                     me.name, target_p->name,
+                     get_client_name(source_p, HIDE_IP));
+
+          target_p->localClient->last_caller_id_time = CurrentTime;
+
+        }
+        /* Only so opers can watch for floods */
+        (void)flood_attack_client(p_or_n, source_p, target_p);
+      }
+    }
+    else
+    {
+      /* If the client is remote, we dont perform a special check for
+       * flooding.. as we wouldnt block their message anyway.. this means
+       * we dont give warnings.. we then check if theyre opered 
+       * (to avoid flood warnings), lastly if theyre our client
+       * and flooding    -- fl */
+      if (!MyClient(source_p) || IsOper(source_p) ||
+          (MyClient(source_p) &&
+           !flood_attack_client(p_or_n, source_p, target_p)))
+        sendto_anywhere(target_p, source_p, "%s %s :%s",
+                        command, target_p->name, text);
+    }
+  }
+  else
+    /* The target is a remote user.. same things apply  -- fl */
+  if (!MyClient(source_p) || IsOper(source_p) ||
+        (MyClient(source_p)
+           && !flood_attack_client(p_or_n, source_p, target_p)))
+    sendto_anywhere(target_p, source_p, "%s %s :%s", command, target_p->name,
+                    text);
+  return;
+}
+
+/*
+ * flood_attack_client
+ * inputs       - flag 0 if PRIVMSG 1 if NOTICE. RFC
+ *                say NOTICE must not auto reply
+ *              - pointer to source Client 
+ *		- pointer to target Client
+ * output	- 1 if target is under flood attack
+ * side effects	- check for flood attack on target target_p
+ */
+static int
+flood_attack_client(int p_or_n, struct Client *source_p,
+                    struct Client *target_p)
+{
+  int delta;
+
+  if (GlobalSetOptions.floodcount && MyConnect(target_p)
+      && IsClient(source_p) && !IsConfCanFlood(source_p))
+  {
+    if ((target_p->localClient->first_received_message_time + 1)
+        < CurrentTime)
+    {
+      delta =
+        CurrentTime - target_p->localClient->first_received_message_time;
+      target_p->localClient->received_number_of_privmsgs -= delta;
+      target_p->localClient->first_received_message_time = CurrentTime;
+      if (target_p->localClient->received_number_of_privmsgs <= 0)
+      {
+        target_p->localClient->received_number_of_privmsgs = 0;
+        target_p->localClient->flood_noticed = 0;
+      }
+    }
+
+    if ((target_p->localClient->received_number_of_privmsgs >=
+         GlobalSetOptions.floodcount) || target_p->localClient->flood_noticed)
+    {
+      if (target_p->localClient->flood_noticed == 0)
+      {
+        sendto_realops_flags(FLAGS_BOTS, L_ALL,
+                             "Possible Flooder %s on %s target: %s",
+                             get_client_name(source_p, HIDE_IP),
+                             source_p->user->server, target_p->name);
+        target_p->localClient->flood_noticed = 1;
+        /* add a bit of penalty */
+        target_p->localClient->received_number_of_privmsgs += 2;
+      }
+      if (MyClient(source_p) && (p_or_n != NOTICE))
+        sendto_one(source_p,
+                   ":%s NOTICE %s :*** Message to %s throttled due to flooding",
+                   me.name, source_p->name, target_p->name);
+      return 1;
+    }
+    else
+      target_p->localClient->received_number_of_privmsgs++;
+  }
+
+  return 0;
+}
+
+/*
+ * flood_attack_channel
+ * inputs       - flag 0 if PRIVMSG 1 if NOTICE. RFC
+ *                says NOTICE must not auto reply
+ *              - pointer to source Client 
+ *		- pointer to target channel
+ * output	- 1 if target is under flood attack
+ * side effects	- check for flood attack on target chptr
+ */
+static int
+flood_attack_channel(int p_or_n, struct Client *source_p,
+                     struct Channel *chptr, char *chname)
+{
+  int delta;
+
+  if (GlobalSetOptions.floodcount && !IsConfCanFlood(source_p))
+  {
+    if ((chptr->first_received_message_time + 1) < CurrentTime)
+    {
+      delta = CurrentTime - chptr->first_received_message_time;
+      chptr->received_number_of_privmsgs -= delta;
+      chptr->first_received_message_time = CurrentTime;
+      if (chptr->received_number_of_privmsgs <= 0)
+      {
+        chptr->received_number_of_privmsgs = 0;
+        chptr->flood_noticed = 0;
+      }
+    }
+
+    if ((chptr->received_number_of_privmsgs >= GlobalSetOptions.floodcount)
+        || chptr->flood_noticed)
+    {
+      if (chptr->flood_noticed == 0)
+      {
+        sendto_realops_flags(FLAGS_BOTS, L_ALL,
+                             "Possible Flooder %s on %s target: %s",
+                             get_client_name(source_p, HIDE_IP),
+                             source_p->user->server, chptr->chname);
+        chptr->flood_noticed = 1;
+
+        /* Add a bit of penalty */
+        chptr->received_number_of_privmsgs += 2;
+      }
+      if (MyClient(source_p) && (p_or_n != NOTICE))
+        sendto_one(source_p,
+                   ":%s NOTICE %s :*** Message to %s throttled due to flooding",
+                   me.name, source_p->name, chname);
+      return 1;
+    }
+    else
+      chptr->received_number_of_privmsgs++;
+  }
+
+  return 0;
+}
+
+
+/*
+ * handle_special
+ *
+ * inputs	- server pointer
+ *		- client pointer
+ *		- nick stuff to grok for opers
+ *		- text to send if grok
+ * output	- none
+ * side effects	- old style username@server is handled here for non opers
+ *		  opers are allowed username%hostname@server
+ *		  all the traditional oper type messages are also parsed here.
+ *		  i.e. "/msg #some.host."
+ *		  However, syntax has been changed.
+ *		  previous syntax "/msg #some.host.mask"
+ *		  now becomes     "/msg $#some.host.mask"
+ *		  previous syntax of: "/msg $some.server.mask" remains
+ *		  This disambiguates the syntax.
+ *
+ * XXX		  N.B. dalnet changed it to nick@server as have other servers.
+ *		  we will stick with tradition for now.
+ *		- Dianora
+ */
+static void
+handle_special(int p_or_n, char *command, struct Client *client_p,
+	       struct Client *source_p, char *nick, char *text)
+{
+  struct Client *target_p;
+  char *host;
+  char *server;
+  char *s;
+  int count;
+
+  /*
+   * user[%host]@server addressed?
+   */
+  if ((server = strchr(nick, '@')) != NULL)
+  {
+    count = 0;
+
+    if ((host = strchr(nick, '%')) && !IsOper(source_p))
+    {
+      sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+		 me.name, source_p->name);
+      return;
+    }
+    if ((target_p = find_server(server + 1)) != NULL)
+    {
+      if (!IsMe(target_p))
+      {
+	/*
+	 * Not destined for a user on me :-(
+	 */
+
+	sendto_one(target_p, ":%s %s %s :%s", source_p->name,
+		   command, nick, text);
+	if ((p_or_n != NOTICE) && source_p->user)
+	  source_p->user->last = CurrentTime;
+	return;
+      }
+
+      *server = '\0';
+
+      if (host != NULL)
+	*host++ = '\0';
+
+      /* Check if someones msg'ing opers@our.server */
+      if (strcmp(nick, "opers") == 0)
+      {
+	if (!IsOper(source_p))
+	  sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+		     me.name, source_p->name);
+	else
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "To opers: From: %s: %s",
+			       source_p->name, text);
+	return;
+      }
+
+      /*
+       * Look for users which match the destination host
+       * (no host == wildcard) and if one and one only is
+       * found connected to me, deliver message!
+       */
+      target_p = find_userhost(nick, host, &count);
+
+      if (target_p != NULL)
+      {
+	if (server != NULL)
+	  *server = '@';
+	if (host != NULL)
+	  *--host = '%';
+
+	if (count == 1)
+	{
+	  sendto_one(target_p, ":%s %s %s :%s",
+		     source_p->name, command, nick, text);
+	  if ((p_or_n != NOTICE) && source_p->user)
+	    source_p->user->last = CurrentTime;
+	}
+	else
+	  sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
+		     me.name, source_p->name, nick);
+      }
+    }
+    else if (server && *(server+1) && (target_p == NULL))
+	sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+		   source_p->name, server+1);
+    else if (server && (target_p == NULL))
+	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+		   source_p->name, nick);
+    return;
+  }
+
+  if (!IsOper(source_p))
+  {
+    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
+	       me.name, source_p->name);
+    return;
+  }
+  /*
+   * the following two cases allow masks in NOTICEs
+   * (for OPERs only)
+   *
+   * Armin, 8Jun90 (gruner@informatik.tu-muenchen.de)
+   */
+  if(*nick == '$')
+  {
+    if((*(nick+1) == '$' || *(nick+1) == '#'))
+      nick++;
+    else if(MyOper(source_p))
+    {
+      sendto_one(source_p, 
+                 ":%s NOTICE %s :The command %s %s is no longer supported, please use $%s",
+		 me.name, source_p->name, command, nick, nick);
+      return;
+    }
+      
+    if ((s = strrchr(nick, '.')) == NULL)
+    {
+      sendto_one(source_p, form_str(ERR_NOTOPLEVEL),
+                 me.name, source_p->name, nick);
+      return;
+    }
+    while (*++s)
+      if (*s == '.' || *s == '*' || *s == '?')
+        break;
+    if (*s == '*' || *s == '?')
+    {
+      sendto_one(source_p, form_str(ERR_WILDTOPLEVEL),
+                 me.name, source_p->name, nick);
+      return;
+    }
+    
+    sendto_match_butone(IsServer(client_p) ? client_p : NULL, source_p,
+                        nick + 1,
+                        (*nick == '#') ? MATCH_HOST : MATCH_SERVER,
+                        "%s $%s :%s", command, nick, text);
+
+    if ((p_or_n != NOTICE) && source_p->user)
+      source_p->user->last = CurrentTime;
+
+    return;
+  }
+
+}
+
+/*
+ * find_userhost - find a user@host (server or user).
+ * inputs       - user name to look for
+ *              - host name to look for
+ *		- pointer to count of number of matches found
+ * outputs	- pointer to client if found
+ *		- count is updated
+ * side effects	- none
+ *
+ */
+static struct Client *
+find_userhost(char *user, char *host, int *count)
+{
+  struct Client *c2ptr;
+  struct Client *res = NULL;
+
+  *count = 0;
+  if (collapse(user) != NULL)
+    {
+      for (c2ptr = GlobalClientList; c2ptr; c2ptr = c2ptr->next) 
+	{
+	  if (!MyClient(c2ptr)) /* implies mine and an user */
+	    continue;
+	  if ((!host || match(host, c2ptr->host)) &&
+	      irccmp(user, c2ptr->username) == 0)
+	    {
+	      (*count)++;
+	      res = c2ptr;
+	    }
+	}
+    }
+  return (res);
+}
+/*
+ * finds color or ctcp depending on ctcpcolor
+ * 1 - color
+ * 0 - ctcp
+ *
+ * main procedur from UniBG IRCd
+ */
+int find_color_ctcp(char *msg, int ctcpcolor)
+{
+  char *c = msg;
+
+  while (*c)
+  {
+	if ((ctcpcolor && (*c == '\003' || *c == '\033')) ||
+		(!ctcpcolor && (*c == '\001')))
+	  break;
+	else
+	  c++;
+  }
+
+  if (*c)
+	return 1;
+
+  return 0;
+}
+
+/*
+ * dccchekcproc()
+ * - Pravime proverka dali sluchaino ne iskame da sprem
+ *   opredeleni tipove failove da ne otivat kam potrebitelite
+ *   ni.
+ * - source_p         - iniciator
+ * - target_p         - poluchatel
+ * - string4check     - string v koito proverjavame
+ */
+static int dcccheckproc(struct Client *source_p,
+		                struct Client *target_p,
+        		        char *string4check)
+{
+  int result;
+  char *stringdcc;
+  char *filename;
+
+  DupString(stringdcc, string4check+1);
+  result = 0;
+
+  if (check_for_dccsend(stringdcc)) {
+    filename = strtok(stringdcc+8+1, " ");
+
+    while (strtok(NULL, " "));
+  	  if (filename == NULL)
+    	return result;
+
+  	if (IsDCCForb(filename)) {
+      if (target_p->umodes & FLAGS_NODCC) {
+	    sendto_realops_flags(FLAGS_REJ, FLAGS_ALL,
+                      		 "DCC SEND from %s %s@%s to %s %s@%s [%s]",
+                        	 source_p->name, source_p->username, source_p->host,
+                      		 target_p->name, target_p->username, target_p->host,
+                    	     filename);
+        sendto_one(source_p, ":%s NOTICE %s :Warning: %s does not accept this filetype.",
+		           me.name, source_p->name, target_p->name );
+        sendto_one(target_p, ":%s NOTICE %s :Warning: %s (%s@%s) tried to send you file %s. This filetype may contain viruses or trojans. If You want to receive this file please type /mode %s -D",
+	               me.name,target_p->name,source_p->name,source_p->username,source_p->host,
+				   filename,
+    		       target_p->name);
+        result = 1;
+      }
+    }
+  }
+
+  MyFree(stringdcc);
+  return result;
+}
+
+/*
+ * check_for_dccsend()
+ * - pravime edna prosta proverka dali v podadenia ni str
+ *   ima "DCC_SEND"
+ */
+static int check_for_dccsend(char *str)
+{
+  if (!ircncmp(str, "DCC SEND", 8))
+	return 1;
+  else
+    return 0;
+}
+
+static int check_repeat(struct Client *source_p,
+                        struct Channel *chptr,
+                        char *text)
+{
+  dlink_node *ptr;
+  struct Repeat *repeatptr;
+
+  for (ptr = source_p->user->repeat.head; ptr; ptr = ptr->next) {
+    repeatptr = ptr->data;
+	if (repeatptr->chptr == chptr)
+  	  if (!strcmp(repeatptr->text, text)) {
+    	return 1;
+  	  } else {
+    	MyFree(repeatptr->text);
+    	DupString(repeatptr->text, text);
+  	    repeatptr->lastphrase = CurrentTime;
+	    return 0;
+	  }
+    }
+
+  repeatptr = (struct Repeat *)MyMalloc(sizeof(struct Repeat));
+  repeatptr->chptr = chptr;
+  DupString(repeatptr->text, text);
+  repeatptr->lastphrase = CurrentTime;
+
+  ptr = make_dlink_node();
+  dlinkAdd(repeatptr, ptr, &source_p->user->repeat);
+
+  return 0;
+}
+
+void clean_ts(time_t **timestamps, int times, int elements)
+{
+  int i, index=-1;
+
+  for (i = 0; i < elements; i++) {
+   if (BadPtr(timestamps[i])) {
+     if (index == -1)
+       index = i;
+   } else if (CurrentTime - *timestamps[i] > times) {
+     timestamps[i] = NULL;
+   } else {
+     if (index != -1) {
+       timestamps[index] = timestamps[i];
+       timestamps[i] = NULL;
+       index++;
+     }
+   }
+  }
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_mode.c ircd-hybrid-fuis/modules/m_mode.c
--- ircd-hybrid-7.0rc9/modules/m_mode.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_mode.c	Sun Jul 21 12:17:45 2002
@@ -0,0 +1,228 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_mode.c: Sets a user or channel mode.
+ *
+ *  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_mode.c,v 1.55 2002/07/21 16:17:45 leeh Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "vchannel.h"
+#include "client.h"
+#include "hash.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_user.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "packet.h"
+
+static void m_mode(struct Client*, struct Client*, int, char**);
+
+struct Message mode_msgtab = {
+  "MODE", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_mode, m_mode, m_mode}
+};
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&mode_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&mode_msgtab);
+}
+
+
+const char *_version = "$Revision: 1.55 $";
+#endif
+/*
+ * m_mode - MODE command handler
+ * parv[0] - sender
+ * parv[1] - channel
+ */
+static void m_mode(struct Client *client_p, struct Client *source_p,
+              int parc, char *parv[])
+{
+  struct Channel* chptr=NULL;
+  struct Channel* root;
+  static char     modebuf[MODEBUFLEN];
+  static char     parabuf[MODEBUFLEN];
+  dlink_node	*ptr;
+  int n = 2;
+#ifdef VCHANS
+  struct Channel* vchan;
+#endif
+
+  /* Now, try to find the channel in question */
+  if (!IsChanPrefix(parv[1][0]))
+    {
+      /* if here, it has to be a non-channel name */
+      user_mode(client_p, source_p, parc, parv);
+      return;
+    }
+
+  if (!check_channel_name(parv[1]))
+    { 
+      sendto_one(source_p, form_str(ERR_BADCHANNAME),
+		 me.name, parv[0], (unsigned char *)parv[1]);
+      return;
+    }
+	  
+  chptr = hash_find_channel(parv[1]);
+
+  if (chptr == NULL)
+    {
+      /* if chptr isn't found locally, it =could= exist
+       * on the uplink. So ask.
+       */
+      
+      /* LazyLinks */
+      /* this was segfaulting if we had no servers linked.
+       *  -pro
+       */
+      /* only send a mode upstream if a local client sent this request
+       * -davidt
+       */
+      if (MyClient(source_p) && !ServerInfo.hub && uplink &&
+	   IsCapable(uplink, CAP_LL))
+	{
+#if 0
+	  /* cache the channel if it exists on uplink
+	   * If the channel as seen by the uplink, has vchans,
+	   * the uplink will have to SJOIN all of those.
+	   */
+	  /* Lets not for now -db */
+
+	  sendto_one(uplink, ":%s CBURST %s",
+                     me.name, parv[1]);
+	  
+#endif
+	  sendto_one(uplink, ":%s MODE %s %s",
+		     source_p->name, parv[1], (parv[2] ? parv[2] : ""));
+	  return;
+	}
+      else
+	{
+	  sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		     me.name, parv[0], parv[1]);
+	  return;
+	}
+    }
+  
+  /* Now known the channel exists */
+
+  root = chptr;
+
+#ifdef VCHANS
+  if ((parc > 2) && parv[2][0] == '!')
+    {
+     struct Client *target_p;
+     if (!(target_p = find_client(++parv[2])))
+       {
+        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
+                   parv[0], root->chname);
+        return;
+       }
+     if ((chptr = map_vchan(root, target_p)) == NULL)
+       {
+        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name,
+                   parv[0], root->chname);
+        return;
+       }
+     n++;
+    }
+
+  else
+    {
+      if (HasVchans(chptr))
+        {
+          if ((vchan = map_vchan(chptr,source_p)) != NULL)
+            chptr = vchan; /* root = chptr, chptr = vchan */
+
+          /* XXX - else? the user isn't on any vchan, so we
+           *       end up giving them the mode of the root
+           *       channel.  MODE #vchan !nick ? (ugh)
+           */
+        }
+      else if (IsVchan(chptr))
+        {
+          vchan = find_bchan(chptr);
+          root = vchan;  /* root = vchan, chptr = chptr */
+
+          /* XXX - else? the user isn't on any vchan,
+           *       but they asked for MODE ##vchan_12345
+           *       we send MODE #vchan
+           */
+        }
+    }
+#endif
+
+  if (parc < n+1)
+    {
+      channel_modes(chptr, source_p, modebuf, parabuf);
+      sendto_one(source_p, form_str(RPL_CHANNELMODEIS),
+		 me.name, parv[0], parv[1],
+		 modebuf, parabuf);
+      
+      /* Let opers see the "true" TS everyone else see's
+       * the top root chan TS
+       */
+      if (!IsOper(source_p))
+	sendto_one(source_p, form_str(RPL_CREATIONTIME),
+		   me.name, parv[0],
+		   parv[1], root->channelts);
+      else
+	sendto_one(source_p, form_str(RPL_CREATIONTIME),
+		   me.name, parv[0],
+		   parv[1], chptr->channelts);
+    }
+  /* bounce all modes from people we deop on sjoin */
+  else if((ptr = find_user_link(&chptr->deopped, source_p)) == NULL)
+  {
+    /* Finish the flood grace period... */
+    if(MyClient(source_p) && !IsFloodDone(source_p))
+    {
+      if((parc == n) && (parv[n-1][0] == 'b') && (parv[n-1][1] == '\0'))
+        ;
+      else
+        flood_endgrace(source_p);
+    }
+
+    set_channel_mode(client_p, source_p, chptr, parc - n, parv + n, 
+                     root->chname);
+  }
+}
+
+
+
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_nick.c ircd-hybrid-fuis/modules/m_nick.c
--- ircd-hybrid-7.0rc9/modules/m_nick.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_nick.c	Wed Mar 12 16:24:27 2003
@@ -0,0 +1,1041 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_nick.c: Sets a users nick.
+ *
+ *  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_nick.c,v 1.100 2003/02/14 23:01:53 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "hash.h"
+#include "fdlist.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_stats.h"
+#include "s_user.h"
+#include "hash.h"
+#include "whowas.h"
+#include "s_serv.h"
+#include "send.h"
+#include "list.h"
+#include "channel.h"
+#include "s_log.h"
+#include "resv.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "common.h"
+#include "packet.h"
+
+
+static void mr_nick(struct Client *, struct Client *, int, char**);
+static void m_nick(struct Client *, struct Client *, int, char**);
+static void ms_nick(struct Client *, struct Client *, int, char**);
+
+static void ms_client(struct Client *, struct Client *, int, char**);
+
+static int nick_from_server(struct Client *, struct Client *, int, char **,
+                            time_t, char *);
+static int client_from_server(struct Client *, struct Client *, int, char **,
+                              time_t, char *);
+
+static int check_clean_nick(struct Client *, struct Client *, 
+                            char *, char *, char *);
+static int check_clean_user(struct Client *, char *, char *, char *);
+static int check_clean_host(struct Client *, char *, char *, char *, char *);
+
+static int clean_nick_name(char *);
+static int clean_user_name(char *);
+static int clean_host_name(char *);
+
+static int perform_nick_collides(struct Client *, struct Client *,
+                                 struct Client *, int, char **, time_t, char *);
+                            
+
+struct Message nick_msgtab = {
+  "NICK", 0, 0, 1, 0, MFLG_SLOW, 0,
+  {mr_nick, m_nick, ms_nick, m_nick}
+};
+
+struct Message client_msgtab = {
+  "CLIENT", 0, 0, 10, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_client, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&nick_msgtab);
+  mod_add_cmd(&client_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&nick_msgtab);
+  mod_del_cmd(&client_msgtab);
+}
+
+const char *_version = "$Revision: 1.100 $";
+#endif
+
+/*
+ * mr_nick()
+ *
+ *       parv[0] = sender prefix
+ *       parv[1] = nickname
+ */
+static void
+mr_nick(struct Client *client_p, struct Client *source_p,
+        int parc, char *parv[])
+{
+  struct   Client *target_p, *uclient_p;
+  char     nick[NICKLEN];
+  char*    s;
+  dlink_node *ptr;
+   
+  if(parc < 2 || BadPtr(parv[1]))
+  {
+    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+               me.name, BadPtr(parv[0]) ? "*" : parv[0]);
+    return;
+  }
+
+  /* Terminate the nick at the first ~ */
+  if ((s = strchr(parv[1], '~')))
+    *s = '\0';
+                               
+  /* copy the nick and terminate it */
+  strlcpy(nick, parv[1], NICKLEN);
+
+  /* check the nickname is ok */
+  if(!clean_nick_name(nick))
+  {
+    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+               me.name, BadPtr(parv[0]) ? "*" : parv[0], parv[1]);
+    return;
+  }
+
+  /* check if the nick is resv'd */
+  if(find_nick_resv(nick) &&
+     !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
+  {
+    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+               me.name, BadPtr(parv[0]) ? "*" : parv[0], nick);
+    return;
+  }
+
+  if ((target_p = find_client(nick)) == NULL)
+  {
+    if(!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
+    {
+      /* We don't know anyone called nick, but our hub might */
+      for(ptr = unknown_list.head; ptr; ptr = ptr->next)
+      {
+        uclient_p = ptr->data;
+
+	if(!strcmp(nick, uclient_p->llname))
+	{
+	
+	  /* We're already waiting for a reply about this nick
+	   * for someone else. */
+
+	  sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
+	  return;
+	}
+      }
+
+      /* Set their llname so we can find them later */
+      strcpy(source_p->llname, nick);
+
+      /* Ask the hub about their requested name */
+      sendto_one(uplink, ":%s NBURST %s %s !%s", me.name, nick,
+                 nick, nick);
+
+      /* wait for LLNICK */
+      return;
+    }
+    else
+    {
+      set_initial_nick(client_p, source_p, nick);
+      return;
+    }
+  }
+  else if(source_p == target_p)
+  {
+    strcpy(source_p->name, nick);
+    return;
+  }
+  else
+  {
+    sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, "*", nick);
+  }
+}
+
+/*
+ * m_nick()
+ *
+ *     parv[0] = sender prefix
+ *     parv[1] = nickname
+ */
+ static void
+ m_nick(struct Client *client_p, struct Client *source_p,
+	int parc, char *parv[])
+{
+  char     nick[NICKLEN];
+  struct   Client *target_p;
+
+  /* XXX BadPtr is needed */
+  if(parc < 2 || BadPtr(parv[1]))
+  {
+    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+               me.name, parv[0]);
+    return;
+  }
+
+  /* mark end of grace period, to prevent nickflooding */
+  if(!IsFloodDone(source_p))
+    flood_endgrace(source_p);
+
+  /* terminate nick to NICKLEN */
+  strlcpy(nick, parv[1], NICKLEN);
+
+  /* check the nickname is ok */
+  if(!clean_nick_name(nick))
+  {
+    sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
+               me.name, parv[0], nick);
+    return;
+  }
+
+  if(find_nick_resv(nick) &&
+     !(IsOper(source_p) && ConfigChannel.oper_pass_resv))
+  {
+    sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
+               me.name, parv[0], nick);
+    return;
+  }
+
+  if ((target_p = find_client(nick)))
+  {
+    /* If(target_p == source_p) the client is changing nicks between
+     * equivalent nicknames ie: [nick] -> {nick}
+     */
+
+    if(target_p == source_p)
+    {
+      /* check the nick isnt exactly the same */
+      if(strcmp(target_p->name, nick))
+      {
+        change_local_nick(client_p, source_p, nick);
+	return;
+      }
+      else
+      {
+        /* client is doing :old NICK old
+	 * ignore it..
+	 */
+        return;
+      }
+    }
+
+    /* if the client that has the nick isnt registered yet (nick but no
+     * user) then drop the unregged client
+     */
+    if(IsUnknown(target_p))
+    {
+      /* the old code had an if(MyConnect(target_p)) here.. but I cant see
+       * how that can happen, m_nick() is local only --fl_
+       */
+      
+      exit_client(NULL, target_p, &me, "Overridden");
+      change_local_nick(client_p, source_p, nick);
+      return;
+    }
+    else
+    {
+      sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name,
+                 parv[0], nick);
+      return;
+    }
+
+  }
+  else
+  {
+    if(!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
+    {
+      /* The uplink might know someone by this name already. */
+      sendto_one(uplink, ":%s NBURST %s %s %s", me.name, nick,
+                 nick, source_p->name);
+      return;
+    }
+    else
+    {
+      change_local_nick(client_p,source_p,nick);
+      return;
+    }
+  }
+}
+
+/*
+ * ms_nick()
+ *      
+ * server -> server nick change
+ *    parv[0] = sender prefix
+ *    parv[1] = nickname
+ *    parv[2] = TS when nick change
+ *
+ * server introducing new nick
+ *    parv[0] = sender prefix
+ *    parv[1] = nickname
+ *    parv[2] = hop count
+ *    parv[3] = TS
+ *    parv[4] = umode
+ *    parv[5] = username
+ *    parv[6] = hostname
+ *    parv[7] = server
+ *	  parv[8] = Real Host (if CAP_HOSTMASK)
+ *    parv[9] = ircname
+ */
+static void
+ms_nick(struct Client *client_p, struct Client *source_p,
+	int parc, char *parv[])
+{
+  struct Client* target_p;
+  char     nick[NICKLEN];
+  time_t   newts = 0;
+
+  /* XXX BadPtr is needed */
+  if(parc < 2 || BadPtr(parv[1]))
+  {
+    sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN), me.name, parv[0]);
+    return;
+  }
+
+  /* parc == 3 on nickchange, parc == 9 on new nick */
+  if((IsClient(source_p) && (parc != 3)) || (IsServer(source_p) && (parc != 10) && (parc != 9)))
+  {
+    char tbuf[BUFSIZE] = { 0 };
+    int j;
+
+    for(j = 0; j < parc; j++)
+    {
+      strcat(tbuf, parv[j]);
+      strcat(tbuf, " ");
+    }
+
+    sendto_realops_flags(FLAGS_ALL, L_ALL,
+                         "Dropping server %s due to (invalid) command 'NICK' "
+                         "with only %d arguments.  (Buf: '%s')",
+                         client_p->name, parc, tbuf);
+    ilog(L_CRIT, "Insufficient parameters (%d) for command 'NICK' from %s.  Buf: %s",
+         parc, client_p->name, tbuf);
+    exit_client(client_p, client_p, client_p, "Not enough arguments to server command.");
+    return;
+  }
+
+  /* fix the length of the nick */
+  strlcpy(nick, parv[1], NICKLEN);
+
+  if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]))
+    return;
+
+  if (parc == 10 || parc == 9)
+    {
+      if (check_clean_user(client_p, nick, parv[5], parv[7]) ||
+          check_clean_host(client_p, nick, parv[6], parc == 10 ? parv[8] : NULL, parv[7]))
+        return;
+
+      /* check the length of the clients gecos */
+      if(parc == 10 && strlen(parv[9]) > REALLEN)
+        {
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
+                         parv[7], parv[1]);
+          parv[9][REALLEN] = '\0';
+        }
+		else if (strlen(parv[8]) > REALLEN)
+        {
+          sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
+                         parv[7], parv[1]);
+          parv[8][REALLEN] = '\0';
+		}
+
+      if (IsServer(source_p))
+        newts = atol(parv[3]);
+    }
+  else
+    {
+      if (!IsServer(source_p))
+        newts = atol(parv[2]);
+    }
+
+  /* if the nick doesnt exist, allow it and process like normal */
+  if (!(target_p = find_client(nick)))
+  {
+    nick_from_server(client_p,source_p,parc,parv,newts,nick);
+    return;
+  }
+
+  /* we're not living in the past anymore, an unknown client is local only. */
+  if(IsUnknown(target_p))
+  {
+    exit_client(NULL, target_p, &me, "Overridden");
+    nick_from_server(client_p,source_p,parc,parv,newts,nick);
+    return;
+  }
+
+  if(target_p == source_p)
+  {
+    if(strcmp(target_p->name, nick))
+    {
+      /* client changing case of nick */
+      nick_from_server(client_p,source_p,parc,parv,newts,nick);
+      return;
+    }
+    else
+      /* client not changing nicks at all */
+      return;
+  }
+
+  perform_nick_collides(source_p, client_p, target_p,
+                        parc, parv, newts, nick);
+}
+
+/*
+ * ms_client()
+ */
+static void
+ms_client(struct Client *client_p, struct Client *source_p,
+	  int parc, char *parv[])
+{
+  struct Client* target_p;
+  char     nick[NICKLEN];
+  time_t   newts = 0;
+  char    *id;
+  char    *name;
+
+  id = parv[8];
+  name = (parc > 10) ? ((parc > 11) ? parv[11] : parv[10]) : parv[9];
+
+  /* XXX can this happen ? */
+  if (BadPtr(parv[1]))
+    return;
+
+  /* parse the nickname */
+  strlcpy(nick, parv[1], NICKLEN);
+
+  /* check the nicknames, usernames and hostnames are ok */
+  if(check_clean_nick(client_p, source_p, nick, parv[1], parv[7]) ||
+     check_clean_user(client_p, nick, parv[5], parv[7]) ||
+     check_clean_host(client_p, nick, parv[6], (parc > 10) ? ((parc > 11) ? parv[10] : parv[9]) : NULL, parv[7]))
+    return;
+
+  /* check length of clients gecos */
+  if (strlen(name) > REALLEN)
+  {
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
+                         parv[0], parv[1]);
+    name[REALLEN] = '\0';			 
+  }
+
+  newts = atol(parv[3]);
+ 
+  /* if there is an ID collision, kill our client, and kill theirs.
+   * this may generate 401's, but it ensures that both clients always
+   * go, even if the other server refuses to do the right thing.
+   */
+  if((target_p = find_id(id)))
+  {
+    sendto_realops_flags(FLAGS_ALL, L_ALL,
+		         "ID collision on %s(%s <- %s)(both killed)",
+			 target_p->name, target_p->from->name,
+			 client_p->name);
+
+    if(ServerInfo.hub && IsCapable(client_p, CAP_LL))
+      add_lazylinkclient(client_p, source_p);
+
+    kill_client_ll_serv_butone(NULL, target_p, "%s (ID collision)",
+		               me.name);
+
+    ServerStats->is_kill++;
+	    
+    SetKilled(target_p);
+    exit_client(client_p, target_p, &me, "ID Collision");
+    return;
+  }
+    
+  if (!(target_p = find_client(nick)))
+  {
+    client_from_server(client_p,source_p,parc,parv,newts,nick);
+    return;
+  }
+
+
+  if(IsUnknown(target_p))
+  {
+    exit_client(NULL, target_p, &me, "Overridden");
+    client_from_server(client_p,source_p,parc,parv,newts,nick);
+    return;
+  }
+
+  perform_nick_collides(source_p, client_p, target_p,
+                        parc, parv, newts, nick);
+}			  
+
+
+/* 
+ * check_clean_nick()
+ * 
+ * input	- pointer to source
+ *		- nickname
+ *		- truncated nickname
+ *		- origin of client
+ * output	- none
+ * side effects - if nickname is erroneous, or a different length to
+ *                truncated nickname, return 1
+ */
+static int
+check_clean_nick(struct Client *client_p, struct Client *source_p, 
+		 char *nick, char *newnick, char *server)
+{
+  /* the old code did some wacky stuff here, if the nick is invalid, kill it
+   * and dont bother messing at all
+   */
+
+  if(!clean_nick_name(nick) || strcmp(nick, newnick))
+  {
+    ServerStats->is_kill++;
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Bad Nick: %s From: %s(via %s)",
+                         nick, server, client_p->name);
+
+    sendto_one(client_p, ":%s KILL %s :%s (Bad Nickname)",
+               me.name, newnick, me.name);
+
+    /* bad nick change */
+    if(source_p != client_p)
+    {
+      kill_client_ll_serv_butone(client_p, source_p,
+                                 "%s (Bad Nickname)",
+				 me.name);
+      SetKilled(source_p);
+      exit_client(client_p, source_p, &me, "Bad Nickname");
+    }
+
+    return (1);
+  }
+
+  return (0);
+}
+
+/* check_clean_user()
+ * 
+ * input	- pointer to client sending data
+ *              - nickname
+ *              - username to check
+ *		- origin of NICK
+ * output	- none
+ * side effects - if username is erroneous, return 1
+ */
+static int
+check_clean_user(struct Client *client_p, char *nick, 
+		 char *user, char *server)
+{
+  if(strlen(user) > USERLEN)
+  {
+    ServerStats->is_kill++;
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Long Username: %s Nickname: %s From: %s(via %s)",
+			 user, nick, server, client_p->name);
+
+    sendto_one(client_p, ":%s KILL %s :%s (Bad Username)",
+               me.name, nick, me.name);
+  
+    return (1);
+  }
+
+  if(!clean_user_name(user))
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Bad Username: %s Nickname: %s From: %s(via %s)",
+			 user, nick, server, client_p->name);
+			 
+  return (0);
+}
+
+/* check_clean_host()
+ * 
+ * input	- pointer to client sending us data
+ *              - nickname
+ *              - hostname to check
+ *		- source name
+ * output	- none
+ * side effects - if hostname is erroneous, return 1
+ */
+static int
+check_clean_host(struct Client *client_p, char *nick,
+		 char *host, char *realhost, char *server)
+{
+  if(strlen(host) > HOSTLEN)
+  {
+    ServerStats->is_kill++;
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Long Hostname: %s Nickname: %s From: %s(via %s)",
+			 host, nick, server, client_p->name);
+
+    sendto_one(client_p, ":%s KILL %s :%s (Bad Hostname)",
+               me.name, nick, me.name);
+
+    return (1);
+  }
+
+  if ((realhost) && strlen(realhost) > HOSTLEN)
+  {
+    ServerStats->is_kill++;
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Long Real Hostname: %s Nickname: %s From: %s (via %s)",
+			 realhost, nick, server, client_p->name);
+
+    sendto_one(client_p, ":%s KILL %s :%s (Bad Real Hostname)",
+               me.name, nick, me.name);
+
+    return 1;
+  }
+
+  if(!clean_host_name(host))
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Bad Hostname: %s Nickname: %s From: %s(via %s)",
+			 host, nick, server, client_p->name);
+
+  if((realhost) && !clean_host_name(realhost))
+    sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+                         "Bad Real Hostname: %s Nickname: %s From: %s(via %s)",
+			 realhost, nick, server, client_p->name);
+
+  return (0);
+}
+
+/* clean_nick_name()
+ *
+ * input	- nickname
+ * output	- none
+ * side effects - walks through the nickname, returning 0 if erroneous
+ */
+static int
+clean_nick_name(char *nick)
+{
+  assert(nick);
+  if(nick == NULL)
+    return (0);
+
+  /* nicks cant start with a digit or - or be 0 length */
+  /* This closer duplicates behaviour of hybrid-6 */
+
+  if (*nick == '-' || IsDigit(*nick) || *nick == '\0')
+    return (0);
+
+  for(; *nick; nick++)
+  {
+    if(!IsNickChar(*nick))
+      return (0);
+  }
+
+  return (1);
+}
+
+/* clean_user_name()
+ *
+ * input	- username
+ * output	- none
+ * side effects - walks through the username, returning 0 if erroneous
+ */
+static int
+clean_user_name(char *user)
+{
+  assert(user);
+  if(user == NULL)
+    return 0;
+    
+  for(; *user; user++)
+  {
+    if(!IsUserChar(*user))
+      return 0;
+    
+  }
+
+  return 1;
+}
+
+/* clean_host_name()
+ * input	- hostname
+ * output	- none
+ * side effects - walks through the hostname, returning 0 if erroneous
+ */
+static int
+clean_host_name(char *host)
+{
+  assert(host);
+  if(host == NULL)
+    return 0;
+  for(; *host; host++)
+  {
+    if(!IsHostChar(*host))
+      return 0;
+  }
+
+  return 1;
+}
+
+
+/*
+ * nick_from_server()
+ */
+static int
+nick_from_server(struct Client *client_p, struct Client *source_p, int parc,
+                 char *parv[], time_t newts,char *nick)
+{
+  if(IsServer(source_p))
+  {
+    /* A server introducing a new client, change source */
+    source_p = make_client(client_p);
+    add_client_to_list(source_p);
+
+    /* We don't need to introduce leafs clients back to them! */
+    if (ConfigFileEntry.hub && IsCapable(client_p, CAP_LL))
+      add_lazylinkclient(client_p, source_p);
+
+    if(parc > 2)
+      source_p->hopcount = atoi(parv[2]);
+    if(newts)
+      source_p->tsinfo = newts;
+    else
+    {
+      newts = source_p->tsinfo = CurrentTime;
+      ts_warn("Remote nick %s (%s) introduced without a TS", nick, parv[0]);
+    }
+
+    /* copy the nick in place */
+    (void)strcpy(source_p->name, nick);
+    (void)add_to_client_hash_table(nick, source_p);
+
+    if (parc > 8)
+    {
+       int   flag;
+       char *m;
+
+       /* parse usermodes */
+       m = &parv[4][1];
+       while (*m)
+       {
+         flag = user_modes_from_c_to_bitmask[(unsigned char)*m];
+	 if(!(source_p->umodes & FLAGS_INVISIBLE) && (flag & FLAGS_INVISIBLE))
+	   Count.invisi++;
+	 if(!(source_p->umodes & FLAGS_OPER) && (flag & FLAGS_OPER))
+	   Count.oper++;
+
+	 source_p->umodes |= flag & SEND_UMODES;
+	 m++;
+      }
+
+      return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
+                            parv[7], (parc > 9) ? parv[9] : parv[8], (parc > 9) ? parv[8] : NULL, NULL);
+    }
+  }
+  else if(source_p->name[0])
+  {
+    /* client changing their nick */
+    if(irccmp(parv[0], nick))
+      source_p->tsinfo = newts ? newts : CurrentTime;
+
+    sendto_common_channels_local(source_p, 1,
+                                 ":%s!%s@%s NICK :%s",
+                                 source_p->name,source_p->username,source_p->host,
+                                 nick);
+
+    if (source_p->user)
+    {
+      add_history(source_p,1);
+      sendto_server(client_p, source_p, NULL, NOCAPS, NOCAPS, NOFLAGS,
+                    ":%s NICK %s :%lu",
+		      parv[0], nick, (unsigned long) source_p->tsinfo);
+    }
+  }
+
+  /* set the new nick name */
+  if(source_p->name[0])
+    del_from_client_hash_table(source_p->name, source_p);
+
+  strcpy(source_p->name, nick);
+  add_to_client_hash_table(nick, source_p);
+
+  /* remove all accepts pointing to the client */
+  del_all_accepts(source_p);
+
+  return 0;
+}
+
+
+/*
+ * client_from_server()
+ */
+static int
+client_from_server(struct Client *client_p, struct Client *source_p, int parc,
+                   char *parv[], time_t newts,char *nick)
+{
+  char *name;
+  char *id;
+  int flag;
+  char *m;
+
+  id = parv[8];
+  name = (parc > 10)? ((parc > 11)? parv[11] : parv[10]) : parv[9];
+
+  source_p = make_client(client_p);
+  add_client_to_list(source_p);
+
+  /* We don't need to introduce leafs clients back to them! */
+  if (ConfigFileEntry.hub && IsCapable(client_p, CAP_LL))
+    add_lazylinkclient(client_p, source_p);
+
+  source_p->hopcount = atoi(parv[2]);
+  source_p->tsinfo = newts;
+
+  /* copy the nick in place */
+  (void)strcpy(source_p->name, nick);
+  (void)add_to_client_hash_table(nick, source_p);
+  add_to_id_hash_table(id, source_p);
+
+  /* parse usermodes */
+  m = &parv[4][1];
+  while (*m)
+  {
+    flag = user_modes_from_c_to_bitmask[(unsigned char)*m];
+    if(flag & FLAGS_INVISIBLE)
+      Count.invisi++;
+    if(flag & FLAGS_OPER)
+      Count.oper++;
+
+    source_p->umodes |= flag & SEND_UMODES;
+    m++;
+
+  }
+
+  return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
+                        parv[7], name, (parc > 10) ? ((parc > 11) ? parv[10] : parv[9]) : NULL, id);
+}			
+  
+static int 
+perform_nick_collides(struct Client *source_p, struct Client *client_p, 
+                      struct Client *target_p, int parc, char *parv[], 
+		      time_t newts, char *nick)
+{
+  int sameuser;
+  
+  /* server introducing new nick */
+  if(IsServer(source_p))
+  {
+    /* if we dont have a ts, or their TS's are the same, kill both */
+    if(!newts || !target_p->tsinfo ||
+       (newts == target_p->tsinfo))
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+                           "Nick collision on %s(%s <- %s)(both killed)",
+			   target_p->name, target_p->from->name,
+			   client_p->name);
+      
+      if(ServerInfo.hub && IsCapable(client_p,CAP_LL))
+        add_lazylinkclient(client_p, target_p);
+
+      kill_client_ll_serv_butone(NULL, target_p,
+                                 "%s (Nick collision (new))",
+				 me.name);
+      ServerStats->is_kill++;
+      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+                 me.name, target_p->name, target_p->name);
+
+      SetKilled(target_p);
+      exit_client(client_p, target_p, &me, "Nick collision (new)");
+      return 0;
+    }
+    /* the timestamps are different */
+    else
+    {
+      sameuser = (target_p->user) && !irccmp(target_p->username, parv[5])
+                 && !irccmp(target_p->host, parv[6]);
+   
+      /* if the users are the same (loaded a client on a different server)
+       * and the new users ts is older, or the users are different and the
+       * new users ts is newer, ignore the new client and let it do the kill
+       */
+      if ((sameuser && newts < target_p->tsinfo) ||
+         (!sameuser && newts > target_p->tsinfo))
+      {
+        client_burst_if_needed(client_p, target_p);
+	return 0;
+      }
+      else
+      {
+        if(sameuser)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	                  "Nick collision on %s(%s <- %s)(older killed)",
+			  target_p->name, target_p->from->name,
+			  client_p->name);
+        else
+	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	                  "Nick collision on %s(%s <- %s)(newer killed)",
+			  target_p->name, target_p->from->name,
+			  client_p->name);
+
+        ServerStats->is_kill++;
+	sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+	           me.name, target_p->name, target_p->name);
+
+        /* if it came from a LL server, itd have been source_p,
+	 * so we dont need to mark target_p as known
+	 */
+	kill_client_ll_serv_butone(source_p, target_p,
+	                           "%s (Nick collision (new))",
+				   me.name);
+
+        SetKilled(target_p);
+	exit_client(client_p, target_p, &me, "Nick collision");
+	
+	if(IsCapable(source_p, CAP_HOSTMASK) ? parc == 10 : parc == 9)
+	  nick_from_server(client_p,source_p,parc,parv,newts,nick);
+	else if(IsCapable(source_p, CAP_HOSTMASK) ? parc == 11 : parc == 10)
+	  client_from_server(client_p,source_p,parc,parv,newts,nick);
+	  
+	return 0;
+      }
+    }
+  }
+
+  /* its a client changing nick and causing a collide */
+  if(!newts || !target_p->tsinfo || (newts == target_p->tsinfo) ||
+       !source_p->user)
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+                 "Nick change collision from %s to %s(%s <- %s)(both killed)",
+		 source_p->name, target_p->name, target_p->from->name,
+		 client_p->name);
+    
+      ServerStats->is_kill++;
+      sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+                 me.name, target_p->name, target_p->name);
+
+      /* if we got the message from a LL, it knows about source_p */
+      kill_client_ll_serv_butone(NULL, source_p,
+                                  "%s (Nick change collision)",
+				  me.name);
+
+      ServerStats->is_kill++;
+      /* If we got the message from a LL, ensure it gets the kill */
+      if(ServerInfo.hub && IsCapable(client_p,CAP_LL))
+        add_lazylinkclient(client_p, target_p);
+
+      kill_client_ll_serv_butone(NULL, target_p,
+                                 "%s (Nick change collision)",
+				 me.name);
+
+      SetKilled(target_p);
+      exit_client(NULL, target_p, &me, "Nick collision(new)");
+      SetKilled(source_p);
+      exit_client(client_p, source_p, &me, "Nick collision(old)");
+      return 0;
+    }
+    else
+    {
+      sameuser = !irccmp(target_p->username, source_p->username) &&
+                 !irccmp(target_p->host, source_p->host);
+
+      if ((sameuser && newts < target_p->tsinfo) ||
+          (!sameuser && newts > target_p->tsinfo))
+      {
+        if(sameuser)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+ 	       "Nick change collision from %s to %s(%s <- %s)(older killed)",
+	       source_p->name, target_p->name, target_p->from->name,
+	       client_p->name);
+        else
+	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+	       "Nick change collision from %s to %s(%s <- %s)(newer killed)",
+	       source_p->name, target_p->name, target_p->from->name,
+	       client_p->name);
+
+        ServerStats->is_kill++;
+
+	/* this won't go back to the incoming link, so LL doesnt matter */
+        kill_client_ll_serv_butone(client_p, source_p,
+	                           "%s (Nick change collision)",
+				   me.name);
+
+        SetKilled(source_p);
+	
+	if(sameuser)
+	  exit_client(client_p, source_p, &me, "Nick collision(old)");
+	else
+	  exit_client(client_p, source_p, &me, "Nick collision(new)");
+	return 0;
+     }
+     else
+     {
+       if(sameuser)
+         sendto_realops_flags(FLAGS_ALL, L_ALL,
+	                      "Nick collision on %s(%s <- %s)(older killed)",
+			      target_p->name, target_p->from->name,
+			      client_p->name);
+       else
+         sendto_realops_flags(FLAGS_ALL, L_ALL,
+	                      "Nick collision on %s(%s <- %s)(newer killed)",
+			      target_p->name, target_p->from->name,
+			      client_p->name);
+  			      
+       kill_client_ll_serv_butone(source_p, target_p,
+                                 "%s (Nick collision)",
+				 me.name);
+
+       ServerStats->is_kill++;
+       sendto_one(target_p, form_str(ERR_NICKCOLLISION),
+                  me.name, target_p->name, target_p->name);
+
+       SetKilled(target_p);
+       exit_client(client_p, target_p, &me, "Nick collision");
+     }
+   }
+
+   /*
+   if(HasID(source_p))
+     client_from_server(client_p,source_p,parc,parv,newts,nick);
+   else
+   */
+   
+   /* we should only ever call nick_from_server() here, as
+    * this is a client changing nick, not a new client
+    */
+   nick_from_server(client_p,source_p,parc,parv,newts,nick);
+
+  return 0;
+}
+
+	    
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_operwall.c ircd-hybrid-fuis/modules/m_operwall.c
--- ircd-hybrid-7.0rc9/modules/m_operwall.c	Fri May 24 19:34:21 2002
+++ ircd-hybrid-fuis/modules/m_operwall.c	Sat Feb 22 16:38:43 2003
@@ -75,6 +75,11 @@
                  me.name, parv[0], "OPERWALL");
       return;
     }
+  if (MyClient(source_p) && !IsOperOperwall(source_p))
+  {
+    sendto_one(source_p, "You don't have operwall=yes; in the conf file, ask your admin about this ;)");
+    return;
+  }
 
   sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s OPERWALL :%s", parv[0], message);
@@ -100,6 +105,12 @@
                    me.name, parv[0], "OPERWALL");
       return;
     }
+
+  if (MyClient(source_p) && !IsOperOperwall(source_p))
+  {
+    sendto_one(source_p, "You don't have operwall=yes; in the conf file, ask your admin about this ;)");
+    return;
+  }
 
   sendto_server(client_p, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s OPERWALL :%s", parv[0], message);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_part.c ircd-hybrid-fuis/modules/m_part.c
--- ircd-hybrid-7.0rc9/modules/m_part.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_part.c	Wed Mar 12 16:33:33 2003
@@ -0,0 +1,166 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_part.c: Parts a user from a channel.
+ *
+ *  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_part.c,v 1.63 2003/02/06 08:46:06 a1kmm Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "vchannel.h"
+#include "client.h"
+#include "common.h"  
+#include "hash.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "list.h"
+#include "numeric.h"
+#include "send.h"
+#include "s_serv.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "s_conf.h"
+#include "packet.h"
+
+static void m_part(struct Client*, struct Client*, int, char**);
+void check_spambot_warning(struct Client *source_p, const char *name);
+
+struct Message part_msgtab = {
+  "PART", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_part, m_part, m_part}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&part_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&part_msgtab);
+}
+const char *_version = "$Revision: 1.63 $";
+#endif
+
+static void part_one_client(struct Client *client_p,
+			    struct Client *source_p,
+			    char *name);
+
+
+/*
+** m_part
+**      parv[0] = sender prefix
+**      parv[1] = channel
+*/
+static void m_part(struct Client *client_p, struct Client *source_p,
+                  int parc, char *parv[])
+{
+  char  *p, *name;
+
+  if (*parv[1] == '\0')
+    {
+      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "PART");
+      return;
+    }
+
+  name = strtoken( &p, parv[1], ",");
+
+  /* Finish the flood grace period... */
+  if(MyClient(source_p) && !IsFloodDone(source_p))
+    flood_endgrace(source_p);
+
+  while(name)
+  {
+    part_one_client(client_p, source_p, name);
+    name = strtoken(&p, (char *)NULL, ",");
+  }
+  return;
+}
+
+/*
+ * part_one_client
+ *
+ * inputs	- pointer to server
+ * 		- pointer to source client to remove
+ *		- char pointer of name of channel to remove from
+ * output	- none
+ * side effects	- remove ONE client given the channel name 
+ */
+static void part_one_client(struct Client *client_p,
+			    struct Client *source_p,
+			    char *name)
+{
+  struct Channel *chptr;
+  struct Channel *bchan;
+
+  if ((chptr = hash_find_channel(name)) == NULL)
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		 me.name, source_p->name, name);
+      return;
+    }
+
+#ifdef VCHANS
+  if (IsVchan(chptr) || HasVchans(chptr))
+    {
+      if(HasVchans(chptr))
+        {
+          /* Set chptr to actual channel, bchan to the base channel */
+          bchan = chptr;
+          chptr = map_vchan(bchan,source_p);
+        }
+      else
+        {
+          /* chptr = chptr; */
+          bchan = find_bchan(chptr);
+        }
+    }
+  else
+#endif
+    bchan = chptr; /* not a vchan */
+
+  if (!chptr || !bchan || !IsMember(source_p, chptr))
+    {
+      sendto_one(source_p, form_str(ERR_NOTONCHANNEL),
+                 me.name, source_p->name, name);
+      return;
+    }
+  if (MyConnect(source_p) && !IsOper(source_p))
+   check_spambot_warning(source_p, NULL);
+
+  sendto_server(client_p, NULL, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                ":%s PART %s", ID(source_p), chptr->chname);
+  sendto_server(client_p, NULL, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                ":%s PART %s", source_p->name, chptr->chname);
+  sendto_channel_local(ALL_MEMBERS,
+                       chptr, ":%s!%s@%s PART %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       bchan->chname);
+  remove_user_from_channel(chptr, source_p);
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_quit.c ircd-hybrid-fuis/modules/m_quit.c
--- ircd-hybrid-7.0rc9/modules/m_quit.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_quit.c	Wed Mar 12 16:24:36 2003
@@ -0,0 +1,188 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_quit.c: Makes a user quit from IRC.
+ *
+ *  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_quit.c,v 1.28 2003/02/14 23:01:53 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "s_conf.h"
+
+static void m_quit(struct Client*, struct Client*, int, char**);
+static void ms_quit(struct Client*, struct Client*, int, char**);
+static char *strip_color(const char *, int);
+
+struct Message quit_msgtab = {
+  "QUIT", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0,
+  {m_quit, m_quit, ms_quit, m_quit}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&quit_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&quit_msgtab);
+}
+
+const char *_version = "$Revision: 1.28 $";
+#endif
+/*
+** m_quit
+**      parv[0] = sender prefix
+**      parv[1] = comment
+*/
+static void
+m_quit(struct Client *client_p, struct Client *source_p,
+       int parc, char *parv[])
+{
+  char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
+  char reason [TOPICLEN + 1];
+
+  source_p->flags |= FLAGS_NORMALEX;
+  if (strlen(comment) > (size_t) TOPICLEN)
+    comment[TOPICLEN] = '\0';
+
+  if (ConfigFileEntry.client_exit && comment[0])
+    {
+#ifndef VMS
+      snprintf(reason, TOPICLEN, "Quit: %s", comment);
+#else
+      sprintf(reason, "Quit: %s", comment);
+#endif
+      comment = reason;
+    }
+  
+  if(!IsOper(source_p) && 
+     (source_p->firsttime + ConfigFileEntry.anti_spam_exit_message_time)
+     > CurrentTime)
+    {
+      comment = "Client Quit";
+    }
+
+  if (ConfigFileEntry.no_colors_quit_msg)
+  {
+	comment = strip_color(comment, 1);
+  }
+
+  if (IsAdvQuit(comment))
+  {
+	comment = "Client Quit";
+  }
+
+  exit_client(client_p, source_p, source_p, comment);
+}
+
+/*
+** ms_quit
+**      parv[0] = sender prefix
+**      parv[1] = comment
+*/
+static void
+ms_quit(struct Client *client_p, struct Client *source_p,
+	int parc, char *parv[])
+{
+  char *comment = (parc > 1 && parv[1]) ? parv[1] : client_p->name;
+
+  source_p->flags |= FLAGS_NORMALEX;
+  if (strlen(comment) > (size_t) TOPICLEN)
+    comment[TOPICLEN] = '\0';
+
+  exit_client(client_p, source_p, source_p, comment);
+}
+
+/*
+ * this will strip mIRC and ANSI color, bolds and underlines
+ *                                               -demond
+ */
+static char *strip_color(const char *p, int b)
+{
+  static char buf[512];
+  char *r, *q = buf;
+  int m, n;
+
+  do switch (*p) {
+    case '\003':
+  	  p++;
+	  if (isdigit(*p)) {
+    	p++;
+		m = *p >= '0' && *p<='6';
+    	n = *(p-1) == '1' || *(p-1)=='0';
+    	if (m && n) {
+  		  p++;
+		  if (*p == ',') {
+  			p++;
+			if (isdigit(*p)) {
+      		  p++; m = *p >= '0' && *p<='6';
+    	  	  n = *(p-1) == '1' || *(p-1) == '0';
+  		  	  if (m && n) {
+        	    p++;
+		  	  }
+    		}
+  		  }
+    	} else if (*p == ',') {
+  		  p++;
+		  if (isdigit(*p)) {
+  		    p++;
+			m = *p >= '0' && *p <= '6';
+  		    n = *(p-1)=='1' || *(p-1)=='0';
+		    if (m && n) {
+      		  p++;
+  			}
+		  }
+  	    }
+  	  }
+  	  break;
+	case '\033':
+  	  p++;
+	  if (*p == '[') {
+    	p++;
+		r = strchr(p, 'm');
+    	if (r)
+		  p = r + 1;
+  	  }
+  	  break;
+    case '\002':
+    case '\037':
+  	  if (b) {
+    	p++; break;
+  	  }
+    default:
+  	  *q++ = *p++;
+  	  break;
+  } while (*p);
+
+  *q = 0;
+  return buf;
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_rehash.c ircd-hybrid-fuis/modules/m_rehash.c
--- ircd-hybrid-7.0rc9/modules/m_rehash.c	Wed Oct 16 22:28:51 2002
+++ ircd-hybrid-fuis/modules/m_rehash.c	Fri May  2 17:51:47 2003
@@ -30,7 +30,6 @@
 #include "irc_string.h"
 #include "ircd.h"
 #include "list.h"
-#include "s_gline.h"
 #include "numeric.h"
 #include "res.h"
 #include "s_conf.h"
@@ -96,6 +95,14 @@
           ReadMessageFile( &ConfigFileEntry.motd );
           found = YES;
         }
+      else if(irccmp(parv[1],"FOPERS") == 0)
+        {
+          sendto_realops_flags(FLAGS_ALL, L_ALL,
+		       "%s is forcing re-reading of OPERS File",
+		       get_oper_name(source_p));
+          ReadMessageFile( &ConfigFileEntry.motd );
+          found = YES;
+        }
       else if(irccmp(parv[1],"OMOTD") == 0)
         {
           sendto_realops_flags(FLAGS_ALL, L_ALL,
@@ -112,7 +119,7 @@
         }
       else
         {
-          sendto_one(source_p, ":%s NOTICE %s :rehash one of :DNS MOTD OMOTD", me.name, source_p->name);
+          sendto_one(source_p, ":%s NOTICE %s :rehash one of :DNS MOTD OMOTD FOPERS", me.name, source_p->name);
           return;
         }
     }
@@ -129,4 +136,3 @@
       return;
     }
 }
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_server.c ircd-hybrid-fuis/modules/m_server.c
--- ircd-hybrid-7.0rc9/modules/m_server.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_server.c	Wed Mar 12 16:24:41 2003
@@ -0,0 +1,668 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_server.c: Introduces a server.
+ *
+ *  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_server.c,v 1.92 2003/02/14 23:01:53 db Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"  /* m_server prototype */
+#include "client.h"      /* client struct */
+#include "common.h"      /* TRUE bleah */
+#include "event.h"
+#include "hash.h"        /* add_to_client_hash_table */
+#include "irc_string.h" 
+#include "ircd.h"        /* me */
+#include "list.h"        /* make_server */
+#include "numeric.h"     /* ERR_xxx */
+#include "s_conf.h"      /* struct ConfItem */
+#include "s_log.h"       /* log level defines */
+#include "s_serv.h"      /* server_estab, check_server, my_name_for_link */
+#include "s_stats.h"     /* ServerStats */
+#include "scache.h"      /* find_or_add */
+#include "send.h"        /* sendto_one */
+#include "motd.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static void mr_server(struct Client*, struct Client*, int, char **);
+static void ms_server(struct Client*, struct Client*, int, char **);
+
+static int set_server_gecos(struct Client *, char *);
+
+struct Message server_msgtab = {
+  "SERVER", 0, 0, 4, 0, MFLG_SLOW | MFLG_UNREG, 0,
+  {mr_server, m_registered, ms_server, m_registered}
+};
+
+#ifndef STATIC_MODULES
+void 
+_modinit(void)
+{
+  mod_add_cmd(&server_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&server_msgtab);
+}
+const char *_version = "$Revision: 1.92 $";
+#endif
+
+int bogus_host(char *host);
+struct Client *server_exists(char *);
+
+/*
+ * mr_server - SERVER message handler
+ *      parv[0] = sender prefix
+ *      parv[1] = servername
+ *      parv[2] = serverinfo/hopcount
+ *      parv[3] = serverinfo
+ */
+static void mr_server(struct Client *client_p, struct Client *source_p,
+                      int parc, char *parv[])
+{
+  char             info[REALLEN + 1];
+  char             *name;
+  struct Client    *target_p;
+  int hop;
+
+  if (parc < 4)
+  {
+    sendto_one(client_p,"ERROR :No servername");
+    exit_client(client_p, client_p, client_p, "Wrong number of args");
+    return;
+  }
+
+  name = parv[1];
+  hop = atoi(parv[2]);
+  strlcpy(info, parv[3], REALLEN);
+
+  /* 
+   * Reject a direct nonTS server connection if we're TS_ONLY -orabidoo
+   */
+  if (!DoesTS(client_p))
+  {
+    sendto_realops_flags(FLAGS_ALL, L_ADMIN,"Link %s dropped, non-TS server",
+			 get_client_name(client_p, HIDE_IP));
+    sendto_realops_flags(FLAGS_ALL, L_OPER,"Link %s dropped, non-TS server",
+			 get_client_name(client_p, MASK_IP));
+    exit_client(client_p, client_p, client_p, "Non-TS server");
+    return;
+  }
+
+  if (bogus_host(name))
+  {
+    exit_client(client_p, client_p, client_p, "Bogus server name");
+    return;
+  }
+
+  /* Now we just have to call check_server and everything should be
+   * check for us... -A1kmm. */
+  switch (check_server(name, client_p, CHECK_SERVER_NOCRYPTLINK))
+  {
+    case -1:
+      if (ConfigFileEntry.warn_no_nline)
+      {
+        sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+           "Unauthorized server connection attempt from %s: No entry for "
+           "servername %s", get_client_name(client_p, HIDE_IP), name);
+
+        sendto_realops_flags(FLAGS_ALL, L_OPER,
+           "Unauthorized server connection attempt from %s: No entry for "
+           "servername %s", get_client_name(client_p, MASK_IP), name);
+      }
+      
+      exit_client(client_p, client_p, client_p, "Invalid servername.");
+      return;
+      /* NOT REACHED */
+      break;
+      
+    case -2:
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+           "Unauthorized server connection attempt from %s: Bad password "
+           "for server %s", get_client_name(client_p, HIDE_IP), name);
+
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+           "Unauthorized server connection attempt from %s: Bad password "
+           "for server %s", get_client_name(client_p, MASK_IP), name);
+
+      exit_client(client_p, client_p, client_p, "Invalid password.");
+      return;
+      /* NOT REACHED */
+      break;
+      
+    case -3:
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+           "Unauthorized server connection attempt from %s: Invalid host "
+           "for server %s", get_client_name(client_p, HIDE_IP), name);
+
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+           "Unauthorized server connection attempt from %s: Invalid host "
+           "for server %s", get_client_name(client_p, MASK_IP), name);
+
+      exit_client(client_p, client_p, client_p, "Invalid host.");
+      return;
+      /* NOT REACHED */
+      break;
+    
+    /* servername is > HOSTLEN */
+    case -4:
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+                           "Invalid servername %s from %s",
+			   name, get_client_name(client_p, HIDE_IP));
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+		           "Invalid servername %s from %s",
+			   name, get_client_name(client_p, MASK_IP));
+
+      exit_client(client_p, client_p, client_p, "Invalid servername.");
+      return;
+      /* NOT REACHED */
+      break;
+  }
+    
+  if ((target_p = server_exists(name)))
+    {
+      /*
+       * This link is trying feed me a server that I already have
+       * access through another path -- multiple paths not accepted
+       * currently, kill this link immediately!!
+       *
+       * Rather than KILL the link which introduced it, KILL the
+       * youngest of the two links. -avalon
+       *
+       * Definitely don't do that here. This is from an unregistered
+       * connect - A1kmm.
+       */
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+         "Attempt to re-introduce server %s from %s", name,
+         get_client_name(client_p, HIDE_IP));
+
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+         "Attempt to re-introduce server %s from %s", name,
+         get_client_name(client_p, MASK_IP));
+
+      sendto_one(client_p, "ERROR :Server already exists.");
+      exit_client(client_p, client_p, client_p, "Server Exists");
+      return;
+    }
+
+  if(ServerInfo.hub && IsCapable(client_p, CAP_LL))
+    {
+      if(IsCapable(client_p, CAP_HUB))
+        {
+          ClearCap(client_p,CAP_LL);
+          sendto_realops_flags(FLAGS_ALL, L_ALL,
+               "*** LazyLinks to a hub from a hub, thats a no-no.");
+        }
+      else
+        {
+          client_p->localClient->serverMask = nextFreeMask();
+
+          if(!client_p->localClient->serverMask)
+            {
+              sendto_realops_flags(FLAGS_ALL, L_ALL,
+                                   "serverMask is full!");
+              /* try and negotiate a non LL connect */
+              ClearCap(client_p,CAP_LL);
+            }
+        }
+    }
+  else if (IsCapable(client_p, CAP_LL))
+    {
+      if(!IsCapable(client_p, CAP_HUB))
+        {
+          ClearCap(client_p,CAP_LL);
+          sendto_realops_flags(FLAGS_ALL, L_ALL,
+               "*** LazyLinks to a leaf from a leaf, thats a no-no.");
+        }
+    }
+
+  /*
+   * if we are connecting (Handshake), we already have the name from the
+   * C:line in client_p->name
+   */
+
+  strlcpy(client_p->name, name, HOSTLEN+1);
+
+  if (!irccmp(ConfigFileEntry.services_host, client_p->name)) {
+	ServicesOn = 1;
+	sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+	"Services (%s) become up", client_p->name);
+   }
+								 
+  set_server_gecos(client_p, info);
+  client_p->hopcount = hop;
+  server_estab(client_p);
+}
+
+/*
+ * ms_server - SERVER message handler
+ *      parv[0] = sender prefix
+ *      parv[1] = servername
+ *      parv[2] = serverinfo/hopcount
+ *      parv[3] = serverinfo
+ */
+static void ms_server(struct Client *client_p, struct Client *source_p,
+                      int parc, char *parv[])
+{
+  char             info[REALLEN + 1];
+                   /* same size as in s_misc.c */
+  char*            name;
+  struct Client*   target_p;
+  struct Client*   bclient_p;
+  struct ConfItem* aconf;
+  int              hop;
+  int              hlined = 0;
+  int              llined = 0;
+  dlink_node	   *ptr;
+
+  /* Just to be sure -A1kmm. */
+  if (!IsServer(source_p))
+   return;
+
+  if (parc < 4)
+    {
+      sendto_one(client_p,"ERROR :No servername");
+      return;
+    }
+
+  name = parv[1];
+  hop = atoi(parv[2]);
+  strlcpy(info, parv[3], REALLEN);
+
+  if ((target_p = server_exists(name)))
+    {
+      /*
+       * This link is trying feed me a server that I already have
+       * access through another path -- multiple paths not accepted
+       * currently, kill this link immediately!!
+       *
+       * Rather than KILL the link which introduced it, KILL the
+       * youngest of the two links. -avalon
+       *
+       * I think that we should exit the link itself, not the introducer,
+       * and we should always exit the most recently received(i.e. the
+       * one we are receiving this SERVER for. -A1kmm
+       *
+       * You *cant* do this, if you link somewhere, it bursts you a server
+       * that already exists, then sends you a client burst, you squit the
+       * server, but you keep getting the burst of clients on a server that
+       * doesnt exist, although ircd can handle it, its not a realistic
+       * solution.. --fl_ 
+       */
+      /* It is behind a host-masked server. Completely ignore the
+       * server message(don't propagate or we will delink from whoever
+       * we propagate to). -A1kmm */
+      if (irccmp(target_p->name, name) && target_p->from==client_p)
+        return;
+
+      sendto_one(client_p, "ERROR :Server %s already exists", name);
+	
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+	                   "Link %s cancelled, server %s already exists",
+		 	   get_client_name(client_p, SHOW_IP), name);
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+	                   "Link %s cancelled, server %s already exists",
+		 	   client_p->name, name);
+      
+      exit_client(client_p, client_p, &me, "Server Exists");
+      return;
+    }
+  
+  /* 
+   * User nicks never have '.' in them and server names
+   * must always have '.' in them.
+   */
+  if (strchr(name,'.') == NULL)
+    {
+      /*
+       * Server trying to use the same name as a person. Would
+       * cause a fair bit of confusion. Enough to make it hellish
+       * for a while and servers to send stuff to the wrong place.
+       */
+      sendto_one(client_p,"ERROR :Nickname %s already exists!", name);
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+			   "Link %s cancelled: Server/nick collision on %s",
+		/* inpath */ get_client_name(client_p, HIDE_IP), name);
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+          "Link %s cancelled: Server/nick collision on %s",
+	  get_client_name(client_p, MASK_IP), name);
+      exit_client(client_p, client_p, client_p, "Nick as Server");
+      return;
+    }
+
+  /*
+   * Server is informing about a new server behind
+   * this link. Create REMOTE server structure,
+   * add it to list and propagate word to my other
+   * server links...
+   */
+  if (parc == 1 || info[0] == '\0')
+    {
+      sendto_one(client_p, "ERROR :No server info specified for %s", name);
+      return;
+    }
+
+  /*
+   * See if the newly found server is behind a guaranteed
+   * leaf. If so, close the link.
+   *
+   */
+
+  for (aconf = ConfigItemList; aconf; aconf=aconf->next)
+    {
+     if ((aconf->status & (CONF_LEAF|CONF_HUB)) == 0)
+       continue;
+
+     if (match(aconf->name, client_p->name))
+       {
+        if (aconf->status == CONF_HUB)
+	  {
+	    if(match(aconf->host, name))
+	      hlined++;
+	  }
+        else if (aconf->status == CONF_LEAF)
+	  {
+	    if(match(aconf->host, name))
+	      llined++;
+	  }
+       }
+    }
+
+  /* Ok, this way this works is
+   *
+   * A server can have a CONF_HUB allowing it to introduce servers
+   * behind it.
+   *
+   * connect {
+   *            name = "irc.bighub.net";
+   *            hub_mask="*";
+   *            ...
+   * 
+   * That would allow "irc.bighub.net" to introduce anything it wanted..
+   *
+   * However
+   *
+   * connect {
+   *            name = "irc.somehub.fi";
+   *		hub_mask="*";
+   *		leaf_mask="*.edu";
+   *...
+   * Would allow this server in finland to hub anything but
+   * .edu's
+   */
+
+  /* Ok, check client_p can hub the new server, and make sure it's not a LL */
+  if (!hlined || (IsCapable(client_p, CAP_LL) && !IsCapable(client_p, CAP_HUB)))
+    {
+      /* OOOPs nope can't HUB */
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN, "Non-Hub link %s introduced %s.",
+                get_client_name(client_p, HIDE_IP), name);
+
+      sendto_realops_flags(FLAGS_ALL, L_OPER,
+          "Non-Hub link %s introduced %s.",
+	  get_client_name(client_p, MASK_IP), name);
+
+      exit_client(NULL, source_p, &me, "No matching hub_mask.");
+      return;
+    }
+
+  /* Check for the new server being leafed behind this HUB */
+  if (llined)
+    {
+      /* OOOPs nope can't HUB this leaf */
+      sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+            "Link %s introduced leafed server %s.",
+	    get_client_name(client_p, HIDE_IP), name);
+      sendto_realops_flags(FLAGS_ALL, L_OPER, 
+            "Link %s introduced leafed server %s.",
+            client_p->name, name);
+      /* If it is new, we are probably misconfigured, so split the
+       * non-hub server introducing this. Otherwise, split the new
+       * server. -A1kmm.
+       */
+      /* wastes too much bandwidth, generates too many errors on
+       * larger networks, dont bother. --fl_
+       */
+#if 0
+      if ((CurrentTime - source_p->firsttime) < 20)
+        {
+          exit_client(NULL, source_p, &me, "Leafed Server.");
+          return;
+        }
+      else
+        {
+          sendto_one(source_p, ":%s SQUIT %s :Sorry, Leafed server.",
+                     me.name, name);
+          return;
+        }
+#endif
+
+      exit_client(NULL, client_p, &me, "Leafed Server.");
+      return;
+    }
+  
+
+
+  if(strlen(name) > HOSTLEN)
+  {
+    sendto_realops_flags(FLAGS_ALL, L_ADMIN,
+ 		         "Link %s introduced server with invalid servername %s",
+		         get_client_name(client_p, HIDE_IP), name);
+    sendto_realops_flags(FLAGS_ALL, L_OPER,
+		         "Link %s introduced server with invalid servername %s",
+			 client_p->name, name);
+    
+    exit_client(NULL, client_p, &me, "Invalid servername introduced.");
+    return;
+  }
+
+  target_p = make_client(client_p);
+  make_server(target_p);
+  target_p->hopcount = hop;
+
+  strlcpy(target_p->name, name, HOSTLEN+1);
+  
+  set_server_gecos(target_p, info);
+
+  target_p->serv->up = find_or_add(parv[0]);
+  target_p->servptr = source_p;
+
+  SetServer(target_p);
+
+  Count.server++;
+
+  add_client_to_list(target_p);
+  add_server_to_list(target_p);
+  add_to_client_hash_table(target_p->name, target_p);
+  add_client_to_llist(&(target_p->servptr->serv->servers), target_p);
+
+
+  /*
+   * Old sendto_serv_but_one() call removed because we now
+   * need to send different names to different servers
+   * (domain name matching)
+   */
+  for (ptr = serv_list.head; ptr; ptr = ptr->next)
+    {
+      bclient_p = ptr->data;
+
+      if (bclient_p == client_p)
+	continue;
+      if (!(aconf = bclient_p->serv->sconf))
+	{
+	  sendto_realops_flags(FLAGS_ALL, L_ADMIN, 
+	        "Lost N-line for %s on %s. Closing",
+		get_client_name(client_p, HIDE_IP), name);
+	  sendto_realops_flags(FLAGS_ALL, L_OPER, 
+	        "Lost N-line for %s on %s. Closing",
+		get_client_name(client_p, MASK_IP), name);
+	  exit_client(client_p, client_p, client_p, "Lost connect{} block");
+          return;
+	}
+      if (match(my_name_for_link(me.name, aconf), target_p->name))
+	continue;
+
+      sendto_one(bclient_p, ":%s SERVER %s %d :%s%s",
+		 parv[0], target_p->name, hop + 1,
+		 target_p->hidden_server ? "(H) " : "",
+		 target_p->info);
+    }
+      
+    if (!irccmp(ConfigFileEntry.services_host, target_p->name)) {
+	   ServicesOn = 1;
+	   sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+	     "Services (%s) become up", target_p->name);
+    }
+
+  sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+                       "Server %s being introduced by %s",
+		       target_p->name, source_p->name);
+
+}
+
+/* set_server_gecos()
+ *
+ * input	- pointer to client
+ * output	- none
+ * side effects - servers gecos field is set
+ */
+static int set_server_gecos(struct Client *client_p, char *info)
+{
+  /* check the info for [IP] */
+  if(info[0])
+  {
+    char *p;
+    char *s;
+    char *t;
+    
+    s = info;
+    
+    /* we should only check the first word for an ip */
+    if((p = strchr(s, ' ')))
+      *p = '\0';
+      
+    /* check for a ] which would symbolise an [IP] */
+    if((t = strchr(s, ']')))
+    {
+      /* set s to after the first space */
+      if(p)
+        s = ++p;
+      else
+        s = NULL;
+    }
+    /* no ], put the space back */
+    else if(p)
+      *p = ' ';
+
+    /* p may have been set to a trailing space, so check s exists and that
+     * it isnt \0 */
+    if(s && (*s != '\0'))
+    {
+      /* a space? if not (H) could be the last part of info.. */
+      if((p = strchr(s, ' ')))
+        *p = '\0';
+      
+      /* check for (H) which is a hidden server */
+      if(!strcmp(s, "(H)"))
+      {
+        client_p->hidden_server = 1;
+
+        /* if there was no space.. theres nothing to set info to */
+        if(p)
+	  s = ++p;
+	else
+	  s = NULL;
+      }
+      else if(p)
+        *p = ' ';
+      
+      /* if there was a trailing space, s could point to \0, so check */
+      if(s && (*s != '\0'))
+        strlcpy(client_p->info, s, REALLEN);
+      else
+        strlcpy(client_p->info, "(Unknown Location)", REALLEN);
+    }
+    else
+      strlcpy(client_p->info, "(Unknown Location)", REALLEN);
+  }
+  else
+    strlcpy(client_p->info, "(Unknown Location)", REALLEN);
+
+  return 1;
+}
+
+/*
+ * bogus_host
+ *
+ * inputs	- hostname
+ * output	- 1 if a bogus hostname input, 0 if its valid
+ * side effects	- none
+ */
+int bogus_host(char *host)
+{
+  int bogus_server = 0;
+  char *s;
+  int dots = 0;
+
+  for( s = host; *s; s++ )
+    {
+      if (!IsServChar(*s))
+	{
+	  bogus_server = 1;
+	  break;
+	}
+      if ('.' == *s)
+	++dots;
+    }
+
+  if (!dots || bogus_server )
+    return 1;
+
+  return 0;
+}
+
+/*
+ * server_exists()
+ * 
+ * inputs	- servername
+ * output	- 1 if server exists, 0 if doesnt exist
+ */
+struct Client *server_exists(char *servername)
+{
+  struct Client *target_p;
+  dlink_node *ptr;
+
+  for(ptr = global_serv_list.head; ptr; ptr = ptr->next)
+  {
+    target_p = ptr->data;
+
+    if(match(target_p->name, servername) || 
+         match(servername, target_p->name))
+      return target_p;
+  }
+
+  return NULL;
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_servid.c ircd-hybrid-fuis/modules/m_servid.c
--- ircd-hybrid-7.0rc9/modules/m_servid.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_servid.c	Fri May  2 16:00:21 2003
@@ -0,0 +1,265 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, modules/m_servid.c
+ *   Copyright (C) 2001 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_servid.c,v 1.0 2003/01/02 22:15:33 FUIS Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"
+#include "ircd.h"
+#include "config.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 "channel.h"
+#include "hash.h"
+
+static void ns_parse(struct Client *, struct Client *, int, char **);
+static void nk_parse(struct Client *, struct Client *, int, char **);
+static void os_parse(struct Client *, struct Client *, int, char **);
+static void ms_servid(struct Client *, struct Client *, int, char **);
+static void nokick_parse(struct Client *, struct Client *, int, char **);
+
+struct ServIDStruct
+{
+  char *cmd;
+  void (*handler)();
+};
+
+static struct ServIDStruct servid_cmd_table[] =
+{
+  { "NS", ns_parse, },
+  { "OS", os_parse, },
+  { "NK", nk_parse, },
+  { "NOKICK", nokick_parse, },
+  { (char *) 0, (void (*)()) 0, }
+};
+
+struct Message servid_msgtab = {
+  "SERVID", 0, 0, 1, 1, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_servid, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&servid_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&servid_msgtab);
+}
+
+const char *_version = "$Revision: 1.0 $";
+#endif
+
+/*
+ * ms_servid
+ *
+ *      parv[0] = sender prefix
+ *		parv[1] = NS | OS | NK | NOKICK
+ *		parv[2..4] = some args (no need to tell them here)
+ */
+static void ms_servid(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  int i;
+
+  if (!IsServer(source_p)) {
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "Non Server %s is attempting to use servid", source_p->name);
+	return;
+  }
+
+  for (i = 0; servid_cmd_table[i].handler; i++)
+  {
+	if (!irccmp(servid_cmd_table[i].cmd, parv[1]))
+	{
+	  servid_cmd_table[i].handler(client_p, source_p, parc, parv);
+	}
+  }
+}    
+
+/*
+ * ns_parse
+ *
+ *      parv[0] = sender prefix
+ *		parv[1] = NS
+ *		parv[2] = nickname
+ *		parv[3] = 1 | 0
+ *	    parv[4] = TS (maybe NULL)
+ */
+static void ns_parse(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  struct Client *target_p;
+
+  if (parc < 4)
+	return;
+
+  if ((target_p = find_person(parv[2])) == NULL) {
+	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[2]);
+    return;
+  }
+
+  if (!IsClient(target_p))
+	return;
+
+  if (parv[3][0] == '1')
+  {
+    if (!IsNSId(target_p) && ServicesOn)
+	{
+	  CurrentIdentUsers++;
+	  if (CurrentIdentUsers > MaxIdentUsers)
+		MaxIdentUsers = CurrentIdentUsers;
+	}
+
+	SetNSId(target_p);
+  }
+  else if (parv[3][0] == '0')
+  {
+    if (IsNSId(target_p) && ServicesOn)
+	  CurrentIdentUsers--;
+
+	ClearNSId(target_p);
+  }
+
+  if (parv[4])
+	target_p->ns_reg = (long) atoi(parv[4]);
+
+  sendto_server(source_p, target_p, NULL, NOCAPS, NOCAPS, NOFLAGS, "SERVID NS %s %c :%lu",
+				  target_p->name, parv[3][0], target_p->ns_reg ? target_p->ns_reg : time(NULL));
+}
+
+/*
+ * nk_parse
+ *      parv[0] = sender prefix
+ *		parv[1] = NK
+ *		parv[2] = nickname
+ *		parv[3] = 1
+ */
+static void nk_parse(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  struct Client *target_p;
+
+  if (parc < 4)
+	return;
+
+  if ((target_p = find_person(parv[2])) == NULL) {
+	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[2]);
+    return;
+  }
+
+  if (!IsClient(target_p))
+	return;
+
+   if (parv[3][0] == '1')
+         SetNetKeeper(target_p);
+   else if (parv[3][0] == '0')
+         ClearNetKeeper(target_p);
+
+  sendto_server(source_p, target_p, NULL, 0, 0, LL_ICLIENT, "SERVID NK %s %c",
+			  	  target_p->name, parv[3][0]);
+}
+
+/*
+ * os_parse
+ *      parv[0] = sender prefix
+ *		parv[1] = OS
+ *		parv[2] = nickname
+ *		parv[3] = 1 | 0
+ */
+static void os_parse(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  struct Client *target_p;
+
+  if (parc < 4)
+	return;
+
+  if ((target_p = find_person(parv[2])) == NULL) {
+	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[2]);
+    return;
+  }
+
+  if (!IsClient(target_p))
+	return;
+
+  if (parv[3][0] == '1')
+	SetOSId(target_p);
+  else if (parv[3][0] == '0')
+	ClearOSId(target_p);
+
+  sendto_server(source_p, target_p, NULL, 0, 0, LL_ICLIENT, "SERVID OS %s %c",
+			  	  target_p->name, parv[3][0]);
+}
+
+/*
+ * nokick_parse
+ *      parv[0] = sender prefix
+ *		parv[1] = NOKICK
+ *		parv[2] = channel
+ *		parv[3] = nickname
+ *		parv[4] = 1 | 0
+ */
+static void nokick_parse(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *cptr;
+
+  if (parc < 5)
+	return;
+
+  if ((target_p = find_person(parv[3])) == NULL) {
+	sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], parv[3]);
+    return;
+  }
+
+  if (!IsClient(target_p))
+	return;
+
+  if (!IsChannelName(parv[2]))
+	return;
+
+  if ((cptr = hash_find_channel(parv[2])) == NULL) {
+	sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name, parv[0], parv[2]);
+    return;
+  }
+
+  if (parv[4][0] == '1')
+	AddNokick(cptr, target_p);
+  else if (parv[4][0] == '0')
+	DelNokick(cptr, target_p);
+
+  sendto_server(source_p, target_p, NULL, 0, 0, LL_ICLIENT, "SERVID NOKICK %s %s %c",
+			  	  cptr->chname, target_p->name, parv[3][0]);
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_sjoin.c ircd-hybrid-fuis/modules/m_sjoin.c
--- ircd-hybrid-7.0rc9/modules/m_sjoin.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_sjoin.c	Thu Jul  4 12:07:23 2002
@@ -0,0 +1,935 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_sjoin.c: Joins a user to a channel.
+ *
+ *  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_sjoin.c,v 1.140 2002/07/04 16:07:23 androsyn Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "vchannel.h"
+#include "client.h"
+#include "hash.h"
+#include "irc_string.h"
+#include "ircd.h"
+#include "list.h"
+#include "numeric.h"
+#include "send.h"
+#include "common.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "s_serv.h"
+#include "s_conf.h"
+
+
+static void ms_sjoin(struct Client*, struct Client*, int, char**);
+
+struct Message sjoin_msgtab = {
+  "SJOIN", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_ignore, ms_sjoin, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&sjoin_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&sjoin_msgtab);
+}
+
+const char *_version = "$Revision: 1.140 $";
+#endif
+/*
+ * ms_sjoin
+ * parv[0] - sender
+ * parv[1] - TS
+ * parv[2] - channel
+ * parv[3] - modes + n arguments (key and/or limit)
+ * parv[4+n] - flags+nick list (all in one parameter)
+ * 
+ * process a SJOIN, taking the TS's into account to either ignore the
+ * incoming modes or undo the existing ones or merge them, and JOIN
+ * all the specified users while sending JOIN/MODEs to local clients
+ */
+
+static char    modebuf[MODEBUFLEN];
+static char    parabuf[MODEBUFLEN];
+static char    *para[MAXMODEPARAMS];
+static char    *mbuf;
+static int     pargs;
+
+static void set_final_mode(struct Mode *mode,struct Mode *oldmode);
+static void remove_our_modes(int type,
+		      struct Channel *chptr, struct Channel *top_chptr,
+		      struct Client *source_p);
+
+static void remove_a_mode(int hide_or_not,
+                          struct Channel *chptr, struct Channel *top_chptr,
+                          struct Client *source_p, dlink_list *list, char flag);
+
+
+static void ms_sjoin(struct Client *client_p,
+                    struct Client *source_p,
+                    int parc,
+                    char *parv[])
+{
+  struct Channel *chptr;
+  struct Channel *top_chptr=NULL;	/* XXX vchans */
+  struct Client  *target_p, *lclient_p;
+  time_t         newts;
+  time_t         oldts;
+  time_t         tstosend;
+  static         struct Mode mode, *oldmode;
+  int            args = 0;
+  int            keep_our_modes = 1;
+  int            keep_new_modes = 1;
+  int            doesop = 0;
+  int            fl;
+  int            people = 0;
+  int		 num_prefix=0;
+  int            isnew;
+  int		 buflen = 0;
+  register       char *s, *nhops;
+  static         char buf[2*BUFSIZE]; /* buffer for modes and prefix */
+  static         char sjbuf_nhops[BUFSIZE]; /* buffer with halfops as @ */
+  char           *p; /* pointer used making sjbuf */
+  int hide_or_not;
+  int i;
+  dlink_node *m;
+#ifdef HALFOPS
+  static         char sjbuf_hops[BUFSIZE]; /* buffer with halfops as % */
+  register char  *hops;
+#endif
+#ifdef VCHANS
+  int            vc_ts = 0;
+#endif
+
+  *buf = '\0';
+#ifdef HALFOPS
+  *sjbuf_hops = '\0';
+#endif
+  *sjbuf_nhops = '\0';
+
+  if (IsClient(source_p) || parc < 5)
+    return;
+  
+  if (!IsChannelName(parv[2]))
+    return;
+  if (!check_channel_name(parv[2]))
+    return;
+
+  /* SJOIN's for local channels can't happen. */
+  if (*parv[2] == '&')
+    return;
+
+  mbuf = modebuf;
+  *mbuf = '\0';
+  pargs = 0;
+  newts = atol(parv[1]);
+
+  mode.mode = 0;
+  mode.limit = 0;
+  mode.key[0] = '\0';;
+  s = parv[3];
+  while (*s)
+    switch(*(s++))
+      {
+      case 'i':
+        mode.mode |= MODE_INVITEONLY;
+        break;
+      case 'n':
+        mode.mode |= MODE_NOPRIVMSGS;
+        break;
+      case 'p':
+        mode.mode |= MODE_PRIVATE;
+        break;
+      case 's':
+        mode.mode |= MODE_SECRET;
+        break;
+      case 'm':
+        mode.mode |= MODE_MODERATED;
+        break;
+      case 't':
+        mode.mode |= MODE_TOPICLIMIT;
+        break;
+#ifdef ANONOPS
+      case 'a':
+	if(ConfigChannel.use_anonops)
+          mode.mode |= MODE_HIDEOPS;
+        break;
+#endif
+      case 'k':
+        strlcpy(mode.key, parv[4 + args], KEYLEN);
+        args++;
+        if (parc < 5+args)
+          return;
+        break;
+      case 'l':
+        mode.limit = atoi(parv[4+args]);
+        args++;
+        if (parc < 5+args)
+          return;
+        break;
+      }
+
+  *parabuf = '\0';
+
+  if ((chptr = get_or_create_channel(source_p, parv[2], &isnew)) == NULL)
+    return; /* channel name too long? */
+
+  /* XXX vchan cruft */
+  /* vchans are encoded as "##mainchanname_timestamp" */
+
+#ifdef VCHANS
+  if ( (parv[2][1] == '#') && (ConfigChannel.use_vchans) )
+    {
+      char *subp;
+
+      /* possible sub vchan being sent along ? */
+      if ((subp = strrchr(parv[2],'_')))
+	{
+          vc_ts = atol(subp+1);
+	  /* 
+           * XXX - Could be a vchan, but we can't be _sure_
+           *
+           * We now test the timestamp matches below,
+           * but that can still be faked.
+           *
+           * If there was some way to pass an extra bit of
+           * information over non-hybrid-7 servers, through SJOIN,
+           * we could tell other servers that it's a vchan.
+           * That's probably not possible, unfortunately :(
+           */
+
+	  *subp = '\0';	/* fugly hack for now ... */
+
+	  /* + 1 skip the extra '#' in the name */
+	  if ((top_chptr = hash_find_channel(parv[2] + 1)) != NULL)
+	    {
+	      /* If the vchan is already in the vchan_list for this
+	       * root, don't re-add it.
+	       */
+              /* Compare timestamps too */
+	      if (dlinkFind(&top_chptr->vchan_list,chptr) == NULL &&
+                 newts == vc_ts)
+		{
+		  m = make_dlink_node();
+		  dlinkAdd(chptr, m, &top_chptr->vchan_list);
+		  chptr->root_chptr=top_chptr;
+		}
+	    }
+          /* check TS before creating a root channel */
+	  else if (newts == vc_ts)
+	    {
+	      top_chptr = get_or_create_channel(source_p, (parv[2] + 1), NULL);
+	      m = make_dlink_node();
+	      dlinkAdd(chptr, m, &top_chptr->vchan_list);
+	      chptr->root_chptr=top_chptr;
+              /* let users access it somehow... */
+              chptr->vchan_id[0] = '!';
+              chptr->vchan_id[1] = '\0';
+	    }
+
+	  *subp = '_';	/* fugly hack, restore '_' */
+	}
+    }
+#endif
+
+  oldts = chptr->channelts;
+
+  doesop = (parv[4+args][0] == '@' || parv[4+args][1] == '@');
+
+  oldmode = &chptr->mode;
+
+#ifdef IGNORE_BOGUS_TS
+  if (newts < 800000000)
+    {
+      sendto_realops_flags(FLAGS_DEBUG, L_ALL,
+			"*** Bogus TS %lu on %s ignored from %s",
+			(unsigned long) newts,
+			chptr->chname,
+			client_p->name);
+
+      newts = (oldts==0) ? oldts : 800000000;
+    }
+#else
+
+  if(!isnew && !newts && oldts)
+  {
+    sendto_channel_local(ALL_MEMBERS, chptr,
+ 		":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to 0",
+		me.name, chptr->chname, chptr->chname, oldts);
+    sendto_realops_flags(FLAGS_ALL, L_ALL,
+		         "Server %s changing TS on %s from %lu to 0",
+			 source_p->name, chptr->chname, oldts);
+  }
+#endif
+
+  /*
+   * XXX - this no doubt destroys vchans
+   */
+  if (isnew)
+    chptr->channelts = tstosend = newts;
+  /* Remote is sending users to a permanent channel.. we need to drop our
+   * version and use theirs, to keep compatibility -- fl */
+  else if (chptr->users == 0 && parv[4+args][0])
+    {
+       keep_our_modes = NO;
+       chptr->channelts = tstosend = newts;
+    }
+  /* They're not sending users, lets just ignore it and carry on */
+  else if (chptr->users == 0 && !parv[4+args][0])
+    return;
+
+  /* It isnt a perm channel, do normal timestamp rules */
+  else if (newts == 0 || oldts == 0)
+    chptr->channelts = tstosend = 0;
+  else if (!newts)
+    chptr->channelts = tstosend = oldts;
+  else if (newts == oldts)
+    tstosend = oldts;
+  else if (newts < oldts)
+    {
+      keep_our_modes = NO;
+      chptr->channelts = tstosend = newts;
+    }
+  else
+    {
+      keep_new_modes = NO;
+      tstosend = oldts;
+    }
+
+  if (!keep_new_modes)
+    mode = *oldmode;
+  else if (keep_our_modes)
+    {
+      mode.mode |= oldmode->mode;
+      if (oldmode->limit > mode.limit)
+        mode.limit = oldmode->limit;
+      if (strcmp(mode.key, oldmode->key) < 0)
+        strcpy(mode.key, oldmode->key);
+    }
+
+#ifdef ANONOPS
+  if (mode.mode & MODE_HIDEOPS)
+    hide_or_not = ONLY_CHANOPS_HALFOPS;
+  else
+#endif
+    hide_or_not = ALL_MEMBERS;
+
+#ifdef ANONOPS
+  if ((MODE_HIDEOPS & mode.mode) && !(MODE_HIDEOPS & oldmode->mode))
+    sync_channel_oplists(chptr, MODE_DEL);
+
+  /* Don't reveal the ops, only to remove them all */
+  if (keep_our_modes)
+    if (!(MODE_HIDEOPS & mode.mode) && (MODE_HIDEOPS & oldmode->mode))
+      sync_channel_oplists(chptr, MODE_ADD);
+#endif
+
+  set_final_mode(&mode,oldmode);
+  chptr->mode = mode;
+
+  /* Lost the TS, other side wins, so remove modes on this side */
+  if (!keep_our_modes)
+    {
+      remove_our_modes(hide_or_not, chptr, top_chptr, source_p);
+      sendto_channel_local(ALL_MEMBERS, chptr,
+	    ":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to %lu",
+	    me.name, chptr->chname, chptr->chname, oldts, newts);
+    }
+     
+  if (*modebuf != '\0')
+    {
+      /* This _SHOULD_ be to ALL_MEMBERS
+       * It contains only +aimnstlki, etc */
+      if (top_chptr != NULL)
+	sendto_channel_local(ALL_MEMBERS,
+			     chptr, ":%s MODE %s %s %s",
+			     me.name,
+			     top_chptr->chname, modebuf, parabuf);
+      else
+	sendto_channel_local(ALL_MEMBERS,
+			     chptr, ":%s MODE %s %s %s",
+			     me.name,
+			     chptr->chname, modebuf, parabuf);
+    }
+
+  *modebuf = *parabuf = '\0';
+  if (parv[3][0] != '0' && keep_new_modes)
+    {
+      channel_modes(chptr, source_p, modebuf, parabuf);
+    }
+  else
+    {
+      modebuf[0] = '0';
+      modebuf[1] = '\0';
+    }
+
+  buflen = ircsprintf(buf, ":%s SJOIN %lu %s %s %s:",
+		      parv[0],
+		      (unsigned long) tstosend,
+		      parv[2], modebuf, parabuf);
+
+  /* check we can fit a nick on the end, as well as \r\n\0 and a prefix "
+   * @+".
+   */
+  if (buflen >= (BUFSIZE - 6 - NICKLEN))
+    {
+      sendto_realops_flags(FLAGS_ALL, L_ALL,
+			   "Long SJOIN from server: %s(via %s) (ignored)",
+			   source_p->name, client_p->name);
+      return;
+    }
+
+  mbuf = modebuf;
+  para[0] = para[1] = para[2] = para[3] = "";
+  pargs = 0;
+
+  *mbuf++ = '+';
+
+#ifdef HALFOPS
+  hops = sjbuf_hops;
+#endif
+  nhops = sjbuf_nhops;
+
+  s = parv[args+4];
+
+  /* remove any leading spaces */
+  while(*s == ' ')
+  {
+    s++;
+  }
+   
+  /* if theres a space, theres going to be more than one nick, change the
+   * first space to \0, so s is just the first nick, and point p to the
+   * second nick
+   */
+  if ((p = strchr(s, ' ')) != NULL)
+  {
+    *p++ = '\0';
+  }
+
+  while (s)
+    {
+      fl = 0;
+      num_prefix = 0;
+
+      for (i = 0; i < 2; i++)
+	{
+	  if (*s == '@')
+	    {
+	      fl |= MODE_CHANOP;
+	      if (keep_new_modes)
+	      {
+#ifdef HALFOPS
+	        *hops++ = *s;
+#endif
+		*nhops++ = *s;
+		num_prefix++;
+              }
+	      
+	      s++;
+	    }
+	  else if (*s == '+')
+	    {
+	      fl |= MODE_VOICE;
+	      if (keep_new_modes)
+	      {
+#ifdef HALFOPS
+	        *hops++ = *s;
+#endif
+		*nhops++ = *s;
+		num_prefix++;
+	      }
+	      
+	      s++;
+	    }
+	  else if (*s == '%')
+	    {
+#ifdef HALFOPS
+	      fl |= MODE_HALFOP;
+#else
+	      fl |= MODE_CHANOP;
+#endif
+	      if (keep_new_modes)
+	      {
+#ifdef HALFOPS
+	        *hops++ = *s;
+#endif
+		*nhops++ = '@';
+		num_prefix++;
+	      }
+	      
+	      s++;
+	    }
+	}
+
+      /* if the client doesnt exist, backtrack over the prefix (@%+) that we
+       * just added and skip to the next nick
+       */
+      /* also do this if its fake direction or a server */
+      if (!(target_p = find_client(s)) ||
+         (target_p->from != client_p) || !IsPerson(target_p))
+      {
+        sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+	           source_p->name, s);
+
+#ifdef HALFOPS
+        hops -= num_prefix;
+	*hops = '\0';
+#endif
+
+	nhops -= num_prefix;
+	*nhops = '\0';
+
+        goto nextnick;
+      }
+
+      /* copy the nick to the two buffers */
+#ifdef HALFOPS
+      hops += ircsprintf(hops, "%s ", s);
+      assert((hops - sjbuf_hops) < sizeof(sjbuf_hops));
+#endif
+
+      nhops += ircsprintf(nhops, "%s ", s);
+      assert((nhops-sjbuf_nhops) < sizeof(sjbuf_nhops));
+
+      if (!keep_new_modes)
+	{
+	  if ((fl & MODE_CHANOP) || (fl & MODE_HALFOP))
+	    {
+	      fl = MODE_DEOPPED;
+	    }
+	  else
+	    {
+	      fl = 0;
+	    }
+	}
+
+      people++;
+
+      /* LazyLinks - Introduce unknown clients before sending the sjoin */
+      if (ServerInfo.hub)
+	{
+	  for (m = serv_list.head; m; m = m->next)
+	    {
+	      lclient_p = m->data;
+	      
+	      /* Hopefully, the server knows about it's own clients. */
+	      if (client_p == lclient_p)
+		continue;
+
+	      /* Ignore non lazylinks */
+	      if (!IsCapable(lclient_p,CAP_LL))
+		continue;
+
+	      /* Ignore servers we won't tell anyway */
+	      if (!(RootChan(chptr)->lazyLinkChannelExists &
+		    lclient_p->localClient->serverMask) )
+		continue;
+
+	      /* Ignore servers that already know target_p */
+	      if (!(target_p->lazyLinkClientExists &
+		    lclient_p->localClient->serverMask) )
+		{
+		  /* Tell LazyLink Leaf about client_p,
+		   * as the leaf is about to get a SJOIN */
+		  sendnick_TS( lclient_p, target_p );
+		  add_lazylinkclient(lclient_p,target_p);
+		}
+	    }
+	}
+      
+      if (!IsMember(target_p, chptr))
+        {
+          add_user_to_channel(chptr, target_p, fl);
+	  /* XXX vchan stuff */
+
+#ifdef VCHANS
+	  if (top_chptr)
+	    {
+	      add_vchan_to_client_cache(target_p,top_chptr, chptr);
+	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
+				   target_p->name,
+				   target_p->username,
+				   target_p->host,
+				   top_chptr->chname);
+	    }
+	  else
+#endif
+	    {
+	      sendto_channel_local(ALL_MEMBERS,chptr, ":%s!%s@%s JOIN :%s",
+				   target_p->name,
+				   target_p->username,
+				   target_p->host,
+				   parv[2]);
+	    }
+	}
+
+      if (fl & MODE_CHANOP)
+        {
+          *mbuf++ = 'o';
+	  para[pargs++] = s;
+
+#ifdef REQUIRE_OANDV
+          /* a +ov user.. bleh */
+	  if(fl & MODE_VOICE)
+	  {
+	    /* its possible the +o has filled up MAXMODEPARAMS, if so, start
+	     * a new buffer
+	     */
+	    if(pargs >= MAXMODEPARAMS)
+	      {
+	        *mbuf = '\0';
+		sendto_channel_local(hide_or_not, chptr,
+		                     ":%s MODE %s %s %s %s %s %s",
+				     me.name, RootChan(chptr)->chname,
+				     modebuf,
+				     para[0], para[1], para[2], para[3]);
+                mbuf = modebuf;
+		*mbuf++ = '+';
+		para[0] = para[1] = para[2] = para[3] = "";
+		pargs = 0;
+	      }
+
+	    *mbuf++ = 'v';
+	    para[pargs++] = s;
+	  }
+#endif
+        }
+      else if (fl & MODE_VOICE)
+        {
+          *mbuf++ = 'v';
+	  para[pargs++] = s;
+        }
+#ifdef HALFOPS
+      else if (fl & MODE_HALFOP)
+        {
+          *mbuf++ = 'h';
+          para[pargs++] = s;
+        }
+#endif
+
+      if (pargs >= MAXMODEPARAMS)
+        {
+          *mbuf = '\0';
+          sendto_channel_local(hide_or_not, chptr,
+                               ":%s MODE %s %s %s %s %s %s",
+                               me.name,
+                               RootChan(chptr)->chname,
+                               modebuf,
+                               para[0],para[1],para[2],para[3]);
+          mbuf = modebuf;
+          *mbuf++ = '+';
+          para[0] = para[1] = para[2] = para[3] = "";
+          pargs = 0;
+        }
+
+nextnick:
+      /* p points to the next nick */
+      s = p;
+     
+      /* if there was a trailing space and p was pointing to it, then we
+       * need to exit.. this has the side effect of breaking double spaces
+       * in an sjoin.. but that shouldnt happen anyway
+       */
+      if (s && (*s == '\0'))
+        s = p = NULL;
+	
+      /* if p was NULL due to no spaces, s wont exist due to the above, so
+       * we cant check it for spaces.. if there are no spaces, then when
+       * we next get here, s will be NULL
+       */
+      if (s && ((p = strchr(s, ' ')) != NULL))
+      {
+        *p++ = '\0';
+      }
+    }
+  
+  *mbuf = '\0';
+  if (pargs)
+    {
+      sendto_channel_local(hide_or_not, chptr,
+                           ":%s MODE %s %s %s %s %s %s",
+                           me.name,
+                           RootChan(chptr)->chname,
+                           modebuf,
+                           para[0], para[1], para[2], para[3]);
+    }
+
+  if (!people)
+    return;
+
+  /* relay the SJOIN to other servers */
+  for(m = serv_list.head; m; m = m->next)
+    {
+      target_p = m->data;
+
+      if (target_p == client_p->from)
+        continue;
+
+      /* skip lazylinks that don't know about this server */
+      if (ServerInfo.hub && IsCapable(target_p,CAP_LL))
+      {
+        if (!(RootChan(chptr)->lazyLinkChannelExists &
+              target_p->localClient->serverMask) )
+          continue;
+      }
+
+      /* Its a blank sjoin, ugh */
+      if (!parv[4+args][0])
+          return;
+
+#ifdef HALFOPS
+      if (IsCapable(target_p, CAP_HOPS))
+        sendto_one(target_p, "%s%s", buf, sjbuf_hops);
+      else
+#endif
+        sendto_one(target_p, "%s%s", buf, sjbuf_nhops);
+   }
+}
+
+/*
+ * set_final_mode
+ *
+ * inputs	- pointer to mode to setup
+ *		- pointer to old mode
+ * output	- NONE
+ * side effects	- 
+ */
+
+struct mode_letter {
+  int mode;
+  char letter;
+};
+
+struct mode_letter flags[] = {
+  { MODE_NOPRIVMSGS, 'n' },
+  { MODE_TOPICLIMIT, 't' },
+  { MODE_SECRET,     's' },
+  { MODE_MODERATED,  'm' },
+  { MODE_INVITEONLY, 'i' },
+  { MODE_PRIVATE,    'p' },
+#ifdef ANONOPS
+  { MODE_HIDEOPS,    'a' },
+#endif
+  { 0, 0 }
+};
+
+static void set_final_mode(struct Mode *mode,struct Mode *oldmode)
+{
+  int what = 0;
+  char *pbuf=parabuf;
+  int  len;
+  int  i;
+
+  for (i = 0; flags[i].letter; i++)
+    {
+      if ((flags[i].mode & mode->mode) && !(flags[i].mode & oldmode->mode))
+	{
+	  if (what != 1)
+	    {
+	      *mbuf++ = '+';
+	      what = 1;
+	    }
+	  *mbuf++ = flags[i].letter;
+	}
+    }
+  for (i = 0; flags[i].letter; i++)
+    {
+      if ((flags[i].mode & oldmode->mode) && !(flags[i].mode & mode->mode))
+	{
+	  if (what != -1)
+	    {
+	      *mbuf++ = '-';
+	      what = -1;
+	    }
+	  *mbuf++ = flags[i].letter;
+	}
+    }
+  if (oldmode->limit && !mode->limit)
+    {
+      if (what != -1)
+        {
+          *mbuf++ = '-';
+          what = -1;
+        }
+      *mbuf++ = 'l';
+    }
+  if (oldmode->key[0] && !mode->key[0])
+    {
+      if (what != -1)
+        {
+          *mbuf++ = '-';
+          what = -1;
+        }
+      *mbuf++ = 'k';
+      len = ircsprintf(pbuf,"%s ", oldmode->key);
+      pbuf += len;
+      pargs++;
+    }
+  if (mode->limit && oldmode->limit != mode->limit)
+    {
+      if (what != 1)
+        {
+          *mbuf++ = '+';
+          what = 1;
+        }
+      *mbuf++ = 'l';
+      len = ircsprintf(pbuf, "%d ", mode->limit);
+      pbuf += len;
+      pargs++;
+    }
+  if (mode->key[0] && strcmp(oldmode->key, mode->key))
+    {
+      if (what != 1)
+        {
+          *mbuf++ = '+';
+          what = 1;
+        }
+      *mbuf++ = 'k';
+      len = ircsprintf(pbuf, "%s ", mode->key);
+      pbuf += len;
+      pargs++;
+    }
+  *mbuf = '\0';
+}
+
+/*
+ * remove_our_modes
+ *
+ * inputs	- hide from ops or not int flag
+ *		- pointer to channel to remove modes from
+ *		- if vchan basechannel pointer 
+ *		- client pointer
+ * output	- NONE
+ * side effects	- Go through the local members, remove all their
+ *		  chanop modes etc., this side lost the TS.
+ */
+static void remove_our_modes( int hide_or_not,
+                              struct Channel *chptr, struct Channel *top_chptr,
+                              struct Client *source_p)
+{
+  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->chanops, 'o');
+  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->voiced, 'v');
+
+  /* Move all voice/ops etc. to non opped list */
+  dlinkMoveList(&chptr->chanops, &chptr->peons);
+  dlinkMoveList(&chptr->voiced, &chptr->peons);
+  
+  dlinkMoveList(&chptr->locchanops, &chptr->locpeons);
+  dlinkMoveList(&chptr->locvoiced, &chptr->locpeons);
+
+#ifdef REQUIRE_OANDV
+  remove_a_mode(hide_or_not, chptr, top_chptr, source_p,
+                &chptr->chanops_voiced, 'o');
+  remove_a_mode(hide_or_not, chptr, top_chptr, source_p,
+                &chptr->chanops_voiced, 'v');    
+  dlinkMoveList(&chptr->chanops_voiced, &chptr->peons);
+  dlinkMoveList(&chptr->locchanops_voiced, &chptr->locpeons);
+#endif
+
+#ifdef HALFOPS
+  remove_a_mode(hide_or_not, chptr, top_chptr, source_p, &chptr->halfops, 'h');
+  dlinkMoveList(&chptr->halfops, &chptr->peons);
+  dlinkMoveList(&chptr->lochalfops, &chptr->locpeons);
+#endif
+}
+
+
+/*
+ * remove_a_mode
+ *
+ * inputs	-
+ * output	- NONE
+ * side effects	- remove ONE mode from a channel
+ */
+static void remove_a_mode( int hide_or_not,
+                           struct Channel *chptr, struct Channel *top_chptr,
+                           struct Client *source_p, dlink_list *list, char flag)
+{
+  dlink_node *ptr;
+  struct Client *target_p;
+  char buf[BUFSIZE];
+  char lmodebuf[MODEBUFLEN];
+  char *lpara[MAXMODEPARAMS];
+  char *chname;
+  int count = 0;
+
+  mbuf = lmodebuf;
+  *mbuf++ = '-';
+
+  lpara[0] = lpara[1] = lpara[2] = lpara[3] = "";
+
+  chname = chptr->chname;
+
+#ifdef VCHANS
+  if (IsVchan(chptr) && top_chptr)
+    chname = top_chptr->chname;
+#endif
+
+  ircsprintf(buf,":%s MODE %s ", me.name, chname);
+
+  for (ptr = list->head; ptr && ptr->data; ptr = ptr->next)
+    {
+      target_p = ptr->data;
+      lpara[count++] = target_p->name;
+
+      *mbuf++ = flag;
+
+      if (count >= MAXMODEPARAMS)
+	{
+	  *mbuf   = '\0';
+	  sendto_channel_local(hide_or_not, chptr,
+			       ":%s MODE %s %s %s %s %s %s",
+			       me.name,
+			       chname,
+			       lmodebuf,
+			       lpara[0], lpara[1], lpara[2], lpara[3] );
+
+	  mbuf = lmodebuf;
+	  *mbuf++ = '-';
+	  count = 0;
+	  lpara[0] = lpara[1] = lpara[2] = lpara[3] = "";
+	}
+    }
+
+  if (count != 0)
+    {
+      *mbuf   = '\0';
+      sendto_channel_local(hide_or_not, chptr,
+			   ":%s MODE %s %s %s %s %s %s",
+			   me.name,
+			   chname,
+			   lmodebuf,
+			   lpara[0], lpara[1], lpara[2], lpara[3] );
+
+    }
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_squit.c ircd-hybrid-fuis/modules/m_squit.c
--- ircd-hybrid-7.0rc9/modules/m_squit.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_squit.c	Wed Mar 12 16:24:46 2003
@@ -0,0 +1,235 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_squit.c: Makes a server quit.
+ *
+ *  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_squit.c,v 1.47 2003/02/14 23:01:53 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"      /* FALSE bleah */
+#include "irc_string.h"
+#include "ircd.h"
+#include "numeric.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"
+
+
+static void ms_squit(struct Client*, struct Client*, int, char**);
+static void mo_squit(struct Client*, struct Client*, int, char**);
+
+struct Message squit_msgtab = {
+  "SQUIT", 0, 0, 1, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, ms_squit, mo_squit}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&squit_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&squit_msgtab);
+}
+const char *_version = "$Revision: 1.47 $";
+#endif
+struct squit_parms 
+{
+  char *server_name;
+  struct Client *target_p;
+};
+
+static struct squit_parms *find_squit(struct Client *client_p,
+                                      struct Client *source_p,
+                                      char *server);
+
+
+/*
+ * mo_squit - SQUIT message handler
+ *      parv[0] = sender prefix
+ *      parv[1] = server name
+ *      parv[2] = comment
+ */
+static void mo_squit(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct squit_parms *found_squit;
+  char  *comment = (parc > 2 && parv[2]) ? parv[2] : client_p->name;
+
+  if (!IsOperRemote(source_p))
+    {
+      sendto_one(source_p,":%s NOTICE %s :You need remote = yes;",me.name,parv[0]);
+      return;
+    }
+
+  if(parc < 2)
+    {
+      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+                 me.name, parv[0], "SQUIT");
+      return;
+    }
+
+  if( (found_squit = find_squit(client_p,source_p,parv[1])) )
+    {
+      if(MyConnect(found_squit->target_p))
+	{
+	  sendto_realops_flags(FLAGS_ALL, L_ALL,
+			       "Received SQUIT %s from %s (%s)",
+			       found_squit->target_p->name,
+			       get_client_name(source_p, HIDE_IP), comment);
+          ilog(L_NOTICE, "Received SQUIT %s from %s (%s)",
+	       found_squit->target_p->name, get_client_name(source_p, HIDE_IP),
+	       comment);
+	}
+      exit_client(client_p, found_squit->target_p, source_p, comment);
+      return;
+    }
+  else
+    {
+	    sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
+		       me.name, parv[0], parv[1]);
+    }
+}
+
+/*
+ * ms_squit - SQUIT message handler
+ *      parv[0] = sender prefix
+ *      parv[1] = server name
+ *      parv[2] = comment
+ */
+static void ms_squit(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct squit_parms *found_squit;
+  char  *comment = (parc > 2 && parv[2]) ? parv[2] : client_p->name;
+
+  if(parc < 2)
+  {
+    exit_client(client_p, client_p, source_p, comment);
+    return;
+  }
+
+  if((found_squit = find_squit(client_p, source_p, parv[1])))
+  {
+    /*
+    **  Notify all opers, if my local link is remotely squitted
+    */
+    if (MyConnect(found_squit->target_p))
+    {
+      sendto_wallops_flags(FLAGS_WALLOP, &me,
+			   "Remote SQUIT %s from %s (%s)",
+			   found_squit->server_name,
+			   source_p->name, comment);
+      
+      sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+		    ":%s WALLOPS :Remote SQUIT %s from %s (%s)",
+		    me.name, found_squit->server_name,
+		    source_p->name, comment);
+
+      ilog(L_TRACE, "SQUIT From %s : %s (%s)", parv[0],
+	   found_squit->server_name, comment);
+
+    }
+    exit_client(client_p, found_squit->target_p, source_p, comment);
+    return;
+  }
+}
+
+
+/*
+ * find_squit
+ * inputs	- local server connection
+ *		-
+ *		-
+ * output	- pointer to struct containing found squit or none if not found
+ * side effects	-
+ */
+static struct squit_parms *
+find_squit(struct Client *client_p, struct Client *source_p, char *server)
+{
+  static struct squit_parms found_squit;
+  static struct Client *target_p;
+  struct ConfItem *aconf;
+
+  found_squit.target_p = NULL;
+  found_squit.server_name = NULL;
+
+  /*
+  ** To accomodate host masking, a squit for a masked server
+  ** name is expanded if the incoming mask is the same as
+  ** the server name for that link to the name of link.
+  */
+  if ((*server == '*') && IsServer(client_p))
+    {
+      aconf = client_p->serv->sconf;
+      if (aconf)
+        {
+	  if (!irccmp(server, my_name_for_link(me.name, aconf)))
+	    {
+	       found_squit.server_name = client_p->name;
+	       found_squit.target_p = client_p;
+	    }
+	}
+    }
+
+  /*
+  ** The following allows wild cards in SQUIT. Only useful
+  ** when the command is issued by an oper.
+  */
+  for (target_p = GlobalClientList; (target_p = next_client(target_p, server));
+       target_p = target_p->next)
+    {
+      if (IsServer(target_p) || IsMe(target_p))
+	break;
+    }
+
+  found_squit.target_p = target_p;
+  found_squit.server_name = server;
+
+  if (target_p && IsMe(target_p))
+    {
+       if (IsClient(client_p))
+         {
+		 sendto_one(source_p,":%s NOTICE %s :You are trying to squit me.",me.name,client_p->name);
+	         found_squit.target_p = NULL;
+         }
+       else
+         {
+           found_squit.target_p = client_p;
+           found_squit.server_name = client_p->name;
+         }
+       
+    }
+
+  if(found_squit.target_p != NULL)
+    return &found_squit;
+  else
+    return(NULL);
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_stats.c ircd-hybrid-fuis/modules/m_stats.c
--- ircd-hybrid-7.0rc9/modules/m_stats.c	Fri Jan 17 08:00:50 2003
+++ ircd-hybrid-fuis/modules/m_stats.c	Sun Feb 16 21:09:37 2003
@@ -31,7 +31,6 @@
 #include "irc_string.h"  
 #include "ircd.h"        /* me */
 #include "listener.h"    /* show_ports */
-#include "s_gline.h"
 #include "ircd_handler.h"
 #include "msg.h"         /* Message */
 #include "hostmask.h"  /* report_mtrie_conf_links */
@@ -67,16 +66,12 @@
 void
 _modinit(void)
 {
-  hook_add_event("doing_stats");
-  hook_add_event("doing_stats_p");
   mod_add_cmd(&stats_msgtab);
 }
 
 void
 _moddeinit(void)
 {
-  hook_del_event("doing_stats_p");
-  hook_del_event("doing_stats");
   mod_del_cmd(&stats_msgtab);
 }
 
@@ -91,8 +86,6 @@
 static void stats_L_list(struct Client *s, char *, int, int,
                          dlink_list *, char);
 static void stats_spy(struct Client *, char);
-static void stats_p_spy(struct Client *);
-static void stats_L_spy(struct Client *, char, char *);
 
 /* Heres our struct for the stats table */
 struct StatsStruct
@@ -108,8 +101,6 @@
 static void stats_deny(struct Client *);
 static void stats_exempt(struct Client *);
 static void stats_events(struct Client *);
-static void stats_pending_glines(struct Client *);
-static void stats_glines(struct Client *);
 static void stats_hubleaf(struct Client *);
 static void stats_auth(struct Client *);
 static void stats_tklines(struct Client *);
@@ -147,8 +138,6 @@
   { 'E',	stats_events,		1,	1,	},
   { 'f',	fd_dump,		1,	1,	},
   { 'F',	fd_dump,		1,	1,	},
-  { 'g',	stats_pending_glines,	1,	0,	},
-  { 'G',	stats_glines,		1,	0,	},
   { 'h',	stats_hubleaf,		1,	0,	},
   { 'H',	stats_hubleaf,		1,	0,	},
   { 'i',	stats_auth,		0,	0,	},
@@ -244,8 +233,7 @@
   /* Send the end of stats notice, and the stats_spy */
   sendto_one(source_p, form_str(RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
 
-  if((statchar != 'L') && (statchar != 'l'))
-    stats_spy(source_p, statchar);
+  stats_spy(source_p, statchar);
 }
 
 /*
@@ -295,8 +283,7 @@
   /* Send the end of stats notice, and the stats_spy */
   sendto_one(source_p, form_str(RPL_ENDOFSTATS), me.name, parv[0], parv[1]);
 
-  if((statchar != 'L') && (statchar != 'l'))
-    stats_spy(source_p, statchar);
+  stats_spy(source_p, statchar);
 }
 
 
@@ -378,109 +365,6 @@
   show_events(source_p);
 }
 
-/* stats_pending_glines()
- *
- * input	- client pointer
- * output	- none
- * side effects - client is shown list of pending glines
- */
-static void
-stats_pending_glines(struct Client *source_p)
-{
-  dlink_node *pending_node;
-  struct gline_pending *glp_ptr;
-  char timebuffer[MAX_DATE_STRING];
-  struct tm *tmptr;
-
-  if(!ConfigFileEntry.glines)
-  {
-    sendto_one(source_p, ":%s NOTICE %s :This server does not support G-Lines",
-               me.name, source_p->name); 
-    return;
-  }
-
-  if (dlink_list_length(&pending_glines) > 0)
-    sendto_one(source_p, ":%s NOTICE %s :Pending G-lines",
-	       me.name, source_p->name);
-
-  DLINK_FOREACH(pending_node, pending_glines.head)
-  {
-    glp_ptr = pending_node->data;
-      
-    tmptr = localtime(&glp_ptr->time_request1);
-    strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
-
-    sendto_one(source_p,
-	       ":%s NOTICE %s :1) %s!%s@%s on %s requested gline at %s for %s@%s [%s]",
-	       me.name, source_p->name, glp_ptr->oper_nick1,
-	       glp_ptr->oper_user1, glp_ptr->oper_host1,
-	       glp_ptr->oper_server1, timebuffer,
-	       glp_ptr->user, glp_ptr->host, glp_ptr->reason1);
-
-    if(glp_ptr->oper_nick2[0] != '\0')
-    {
-      tmptr = localtime(&glp_ptr->time_request2);
-      strftime(timebuffer, MAX_DATE_STRING, "%Y/%m/%d %H:%M:%S", tmptr);
-      sendto_one(source_p,
-      ":%s NOTICE %s :2) %s!%s@%s on %s requested gline at %s for %s@%s [%s]",
-		 me.name, source_p->name, glp_ptr->oper_nick2,
-		 glp_ptr->oper_user2, glp_ptr->oper_host2,
-		 glp_ptr->oper_server2, timebuffer,
-		 glp_ptr->user, glp_ptr->host, glp_ptr->reason2);
-    }
-  }
-
-  sendto_one(source_p, ":%s NOTICE %s :End of Pending G-lines",
-	     me.name, source_p->name);
-}
-
-/* stats_glines()
- *
- * input	- client pointer
- * output	- none
- * side effects - client is shown list of glines
- */
-static void
-stats_glines(struct Client *source_p)
-{
-  dlink_node *gline_node;
-  struct ConfItem *kill_ptr;
-  char *host;
-  char *name;
-  char *reason;
-
-  if(!ConfigFileEntry.glines)
-  {
-    sendto_one(source_p, ":%s NOTICE %s :This server does not support G-Lines",
-               me.name, source_p->name); 
-    return;
-  }
-
-  DLINK_FOREACH(gline_node, glines.head)
-  {
-    kill_ptr = gline_node->data;
-
-    if(kill_ptr->host)
-      host = kill_ptr->host;
-    else
-      host = "*";
-
-    if(kill_ptr->name)
-      name = kill_ptr->name;
-    else
-      name = "*";
-
-    if(kill_ptr->passwd)
-      reason = kill_ptr->passwd;
-    else
-      reason = "No Reason";
-    
-    sendto_one(source_p, form_str(RPL_STATSKLINE), me.name,
-	       source_p->name, 'G', host, name, reason);
-  }
-}
-
-
 static void
 stats_hubleaf(struct Client *source_p)
 {
@@ -680,8 +564,6 @@
 
   sendto_one(source_p, ":%s %d %s :%d OPER(s)", me.name, RPL_STATSDEBUG,
              source_p->name, j);
-
-  stats_p_spy(source_p);
 }
 
 static void
@@ -883,7 +765,6 @@
     statchar=parv[1][0];
 
     stats_L(source_p, name, doall, wilds, statchar);
-    stats_L_spy(source_p, statchar, name);
   }
   else
     sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
@@ -978,20 +859,21 @@
 	}
       else
 	{
+
           /* If its a hidden ip, an admin, or a server, mask the real IP */
 	  if(IsIPSpoof(target_p) || IsServer(target_p) || IsAdmin(target_p)
 	     || IsHandshake(target_p) || IsConnecting(target_p))
-	    sendto_one(source_p, Lformat, me.name,
-		       RPL_STATSLINKINFO, source_p->name,
-		       get_client_name(target_p, MASK_IP),
-		       (int)linebuf_len(&target_p->localClient->buf_sendq),
-		       (int)target_p->localClient->sendM,
-		       (int)target_p->localClient->sendK,
-		       (int)target_p->localClient->receiveM,
-		       (int)target_p->localClient->receiveK,
-		       CurrentTime - target_p->firsttime,
-		       (CurrentTime > target_p->since) ? (CurrentTime - target_p->since):0,
-		       IsServer(target_p) ? show_capabilities(target_p) : "-");
+        sendto_one(source_p, Lformat, me.name,
+               RPL_STATSLINKINFO, source_p->name,
+               get_client_name(target_p, MASK_IP),
+               (int)linebuf_len(&target_p->localClient->buf_sendq),
+               (int)target_p->localClient->sendM,
+               (int)target_p->localClient->sendK,
+               (int)target_p->localClient->receiveM,
+               (int)target_p->localClient->receiveK,
+               CurrentTime - target_p->firsttime,
+               (CurrentTime > target_p->since) ? (CurrentTime - target_p->since):0,
+               IsServer(target_p) ? show_capabilities(target_p) : "-");
 	  else /* show the real IP */
 	    sendto_one(source_p, Lformat, me.name,
 		       RPL_STATSLINKINFO, source_p->name,
@@ -1026,53 +908,13 @@
 static void
 stats_spy(struct Client *source_p, char statchar)
 {
-  struct hook_stats_data data;
-
-  data.source_p = source_p;
-  data.statchar = statchar;
-  data.name = NULL;
-
-  hook_call_event("doing_stats", &data);
-}
-
-/* stats_p_spy()
- *
- * input	- pointer to client doing stats
- * ouput	-
- * side effects - call hook doing_stats_p
- */
-static void
-stats_p_spy(struct Client *source_p)
-{
-  struct hook_stats_data data;
-
-  data.source_p = source_p;
-  data.name = NULL;
-  data.statchar = 'p';
-
-  hook_call_event("doing_stats_p", &data);
-}
-
-/* 
- * stats_L_spy
- * 
- * inputs	- pointer to source_p, client doing stats L
- *		- stat that they are doing 'L' 'l'
- * 		- any name argument they have given
- * output	- NONE
- * side effects	- a notice is sent to opers, IF spy mode is configured
- * 		  in the conf file.
- */
-static void
-stats_L_spy(struct Client *source_p, char statchar, char *name)
-{
-  struct hook_stats_data data;
-
-  data.source_p = source_p;
-  data.statchar = statchar;
-  data.name = name;
-
-  hook_call_event("doing_stats", &data);
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+		       "STATS %c requested by %s (%s@%s) [%s]",
+      		   statchar,
+			   source_p->name,
+			   source_p->username,
+               source_p->host,
+			   source_p->user->server);
 }
 
 /*
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_svscmds.c ircd-hybrid-fuis/modules/m_svscmds.c
--- ircd-hybrid-7.0rc9/modules/m_svscmds.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_svscmds.c	Sat Mar 22 18:55:33 2003
@@ -0,0 +1,474 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, m_svscmds.c
+ *   Copyright (C) 2002 NeoIRCd 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_svscmds.c,v 1.9 2002/10/31 13:01:56 fishwaldo + FUIS Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "common.h"
+#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 "s_user.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "hash.h"
+#include "whowas.h"
+
+#define NS_NICK "NS"
+
+static void ms_svsnick(struct Client *client_p, struct Client *source_p,
+					   int parc, char *parv[]);
+static void ms_svsjoin(struct Client *client_p, struct Client *source_p,
+                       int parc, char *parv[]);
+static void ms_svspart(struct Client *client_p, struct Client *source_p,
+		               int parc, char *parv[]);
+static void ms_svsmode(struct Client *client_p, struct Client *source_p,
+		               int parc, char *parv[]);
+static void m_netname(struct Client *client_p, struct Client *source_p,
+		              int parc, char *parv[]);
+static void m_identify(struct Client *client_p, struct Client *source_p,
+		              int parc, char *parv[]);
+static int clean_nick_name(char *);
+
+struct Message netname_msgtab = {
+  "NETNAME", 0, 0, 1, 0, MFLG_SLOW, 0,
+  {m_ignore, m_netname, m_netname, m_netname}
+};
+
+struct Message identify_msgtab = {
+  "IDENTIFY", 0, 0, 2, 1, MFLG_SLOW, 0,
+  {m_ignore, m_identify, m_identify, m_identify}
+};
+
+struct Message svsnick_msgtab = {
+  "SVSNICK", 0, 0, 4, 4, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_svsnick, m_ignore}
+};
+
+struct Message svsjoin_msgtab = {
+  "SVSJOIN", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_svsjoin, m_ignore}
+};
+
+struct Message svspart_msgtab = {
+  "SVSPART", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_svspart, m_ignore}
+};
+
+struct Message svsmode_msgtab = {
+  "SVSMODE", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_svsmode, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&identify_msgtab);
+  mod_add_cmd(&netname_msgtab);
+  mod_add_cmd(&svsnick_msgtab);
+  mod_add_cmd(&svsjoin_msgtab);
+  mod_add_cmd(&svspart_msgtab);
+  mod_add_cmd(&svsmode_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&identify_msgtab);
+  mod_del_cmd(&netname_msgtab);
+  mod_del_cmd(&svsnick_msgtab);
+  mod_del_cmd(&svsjoin_msgtab);
+  mod_del_cmd(&svspart_msgtab);
+  mod_del_cmd(&svsmode_msgtab);
+}
+
+const char *_version = "$Revision: 1.91 $";
+#endif
+/* m_netname
+ *
+ * Displays the current ServerInfo.network_name
+ *
+ * parv[0] = sender prefix
+ */
+static void m_netname(struct Client *client_p, struct Client *source_p,
+		              int parc, char *parv[])
+{
+  if (!source_p->user)
+	return;
+
+  /* now it's a user requesting the netname give it to him */
+  sendto_one(source_p, ":%s NOTICE %s :The network name is: %s", me.name, source_p->name, ServerInfo.network_name);
+}
+
+/* m_identify
+ *
+ * Identifies you in the NS.
+ *
+ * parv[0] = sender prefix
+ * parv[1] = password
+ */
+static void m_identify(struct Client *client_p, struct Client *source_p,
+		              int parc, char *parv[])
+{
+  struct Client *services_p;
+
+  if (!source_p->user)
+	return;
+
+  if (ServicesOn && (services_p = find_person(NS_NICK)) != NULL)
+	/* now it's a user wanting to identify in NS */
+	sendto_one(services_p, ":%s PRIVMSG %s :identify %s", parv[0], services_p->name, parv[1]);
+  else
+	sendto_one(source_p, ":%s PRIVMSG %s :Services are temporaly down please be patient...", me.name, source_p->name);
+}
+
+/* ms_svsnick
+ *
+ *	Changes the targets nickname
+ * 	parv[0] = sender prefix
+ *	parv[1] = target 
+ *	parv[2] = new nickname
+ *	parv[3] = ts
+ */
+static void ms_svsnick(struct Client *client_p, struct Client *source_p,
+			           int parc, char *parv[])
+{
+  struct Client *target_p;
+
+  target_p = find_person(parv[1]);
+
+  if (target_p == NULL) {
+	ilog(L_WARN, "SVSNICK from %s was invalid. Can't find the client", parv[1]);
+	return;
+  }
+
+  if (!IsClient(target_p)) 
+	return;
+
+  if (!IsServer(source_p)) {
+	sendto_realops_flags(FLAGS_ALL, L_ALL, "Non Server %s is attempting to use svsnick on %s", source_p->name, target_p->name);
+	return;
+  }
+
+  if (MyClient(target_p)) {
+    if (!clean_nick_name(parv[2]) || !irccmp(target_p->name, parv[2])) {
+	  ilog(L_WARN, "SVSNICK: Invalid Nickname");
+	  return;
+	}
+
+	target_p->tsinfo = parv[4] ? atol(parv[3]) : CurrentTime;
+	sendto_common_channels_local(target_p, 1, ":%s!%s@%s NICK :%s", target_p->name, target_p->username, target_p->host, parv[2]);
+
+	if (target_p->user) {
+	  add_history(target_p, 1);
+	  sendto_server(NULL, target_p, NULL, 0, 0, LL_ICLIENT, ":%s NICK %s :%lu", target_p->name, parv[2], target_p->tsinfo);
+	}	
+
+	if (target_p->name[0])
+	  del_from_client_hash_table(target_p->name, target_p);
+
+	strcpy(target_p->name, parv[2]);
+	add_to_client_hash_table(target_p->name, target_p);
+
+	del_all_accepts(target_p);
+  } else {
+	/* just relay the svsnick to a server that has this client */
+	sendto_one(target_p, ":%s SVSNICK %s %s :%lu", source_p->name, target_p->name, parv[2], atol(parv[3]));
+  }
+  return;
+}
+
+/* clean_nick_name()
+ *
+ * input	- nickname
+ * output	- none
+ * side effects - walks through the nickname, returning 0 if erroneous
+ */
+static int clean_nick_name(char *nick)
+{
+  assert(nick);
+  if (nick == NULL)
+	return 0;
+
+  if (*nick == '-' || IsDigit(*nick))
+    return 0;
+
+  for(; *nick; nick++)
+  {
+    if(!IsNickChar(*nick))
+      return 0;
+  }
+
+  return 1;
+}
+
+/* ms_svsjoin
+ *
+ *  parv[0] = sender prefix
+ *  parv[1] = user to force
+ *  parv[2] = channel to force them into
+ *	parv[3] = key
+ */
+static void ms_svsjoin(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 (!IsServer(source_p)) {
+	sendto_realops_flags(FLAGS_ALL, L_ALL, "Non Server %s is attempting to use svsjoin", source_p->name);
+	return;
+  }
+
+  if ((hunt_server(client_p, source_p, ":%s SVSJOIN %s %s", 1, parc, parv)) != HUNTED_ISME)
+    return;
+
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    if (IsClient(source_p))
+	  sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+				 me.name, source_p->name, parv[1]);
+    return;
+  }
+
+  if(!IsClient(target_p))
+    return;
+
+  if (parv[2][0] == '@')
+  {
+    type = CHFL_CHANOP;
+    mode = 'o';
+    sjmode = '@';
+  }
+  else if (parv[2][0] == '%')
+  {
+    type = CHFL_HALFOP;
+    mode = 'h';
+    sjmode = '%';
+  }
+  else if (parv[2][0] == '+')
+  {
+    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))
+    {
+         return;
+    }
+    if (!BadPtr(chptr->mode.key) && irccmp(chptr->mode.key, parc >= 4 ? parv[3] : "") && !IsOper(target_p))
+	{
+	  sendto_one(target_p, ":%s NOTICE %s :*** Notice -- You've messed up the key brother!",
+			     me.name, target_p->name);
+	  return;
+	}
+
+	if ((chptr->mode.mode & MODE_INVITEONLY) && !IsOper(target_p))
+	{
+	  sendto_one(target_p, ":%s NOTICE %s :*** Notice -- The channel is invite only, and you're not invited to the party!:P",
+				 me.name, target_p->name);
+	  return;
+	}
+
+	if ((chptr->mode.limit) && chptr->users >= chptr->mode.limit && !IsOper(target_p))
+	{
+	  sendto_one(target_p, ":%s NOTICE %s :*** Notice -- There's not enough room for the both of us, esse (channel is full)!",
+			     me.name, target_p->name);
+	  return;
+	}
+
+    add_user_to_channel(chptr, target_p, type);
+
+    if (chptr->chname[0] != '&')
+      sendto_server(NULL, 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))
+    {
+      if (IsClient(source_p))
+	    sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name, source_p->name, (unsigned char*)newch);
+	  return;
+	}
+
+    if (!IsChannelName(newch))
+    {
+      if (IsClient(source_p))
+		sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name, source_p->name, (unsigned char*)newch);
+      return;
+    }
+
+    if (ConfigServerHide.disable_local_channels && (*newch == '&'))
+    {
+      if (IsClient(source_p))
+	    sendto_one(source_p, ":%s NOTICE %s :No such channel (%s)", me.name, source_p->name, newch);
+      return;
+    }
+
+    if (strlen(newch) > CHANNELLEN)
+    {
+	  if (IsClient(source_p))
+	    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);
+
+    if (chptr->chname[0] != '&')
+      sendto_server(NULL, 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);
+  }
+}
+
+/* ms_svspart
+ *
+ * parv[0] - sender
+ * parv[1] - nickname
+ * parv[2] - channel to part from
+ */
+static void ms_svspart(struct Client *client_p, struct Client *source_p,
+		               int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *chptr;
+
+  if (!IsServer(source_p))
+    return;
+
+  if ((hunt_server(client_p, source_p, ":%s SVSPART %s %s", 1, parc, parv)) != HUNTED_ISME)
+    return;
+
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    if (IsClient(source_p))
+	  sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]);
+    return;
+  }
+
+  if (!IsClient(target_p))
+    return;
+
+  if ((chptr = hash_find_channel(parv[2])) == NULL)
+  {
+    if (IsClient(source_p))
+	  sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), me.name, parv[0], parv[1]);
+    return;
+  }
+
+  if (!IsMember(target_p, chptr))
+  {
+    if (IsClient(source_p))
+	  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);
+}
+
+/* ms_svsmode
+ *
+ * parv[0] - sender
+ * parv[1] - username to change mode for
+ * parv[2] - modes to change
+ */
+static void ms_svsmode(struct Client *client_p, struct Client *source_p,
+                       int parc, char *parv[])
+{
+  if (!IsServer(source_p))
+	return;
+
+  user_mode(client_p, source_p, parc, parv);
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_tburst.c ircd-hybrid-fuis/modules/m_tburst.c
--- ircd-hybrid-7.0rc9/modules/m_tburst.c	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/modules/m_tburst.c	Wed Dec 18 00:33:29 2002
@@ -0,0 +1,162 @@
+/*  contrib/m_tburst.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_tburst.c,v 1.12 2002/12/18 05:33:29 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"
+#include "ircd.h"
+#include "send.h"
+#include "msg.h"
+#include "modules.h"
+#include "hook.h"
+#include "hash.h"
+#include "s_serv.h"
+#include "s_conf.h"
+
+
+/* TBURST_PROPAGATE
+ *
+ * If this is defined, when we receive a TBURST thats successful
+ * (ie: our topic changes), the TBURST will be propagated to other
+ * servers that support TBURST
+ */
+#define TBURST_PROPAGATE
+
+
+
+static void ms_tburst(struct Client *, struct Client *, int, char **);
+static void set_topic(struct Client *, struct Channel *, 
+		      time_t, char *, char *);
+static void set_tburst_capab();
+static void unset_tburst_capab();
+int send_tburst(struct hook_burst_channel *);
+
+struct Message tburst_msgtab = {
+  "TBURST", 0, 0, 6, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_tburst, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&tburst_msgtab);
+  hook_add_hook("burst_channel", (hookfn *)send_tburst);
+  set_tburst_capab();
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&tburst_msgtab);
+  hook_del_hook("burst_channel", (hookfn *)send_tburst);
+  unset_tburst_capab();
+}
+
+const char *_version = "$Revision: 1.12 $";
+#endif
+
+/* ms_tburst()
+ * 
+ *      parv[0] = sender prefix
+ *      parv[1] = channel timestamp
+ *      parv[2] = channel
+ *      parv[3] = topic timestamp
+ *      parv[4] = topic setter
+ *      parv[5] = topic
+ */
+static void ms_tburst(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct Channel *chptr;
+  time_t newchannelts;
+  time_t newtopicts;
+
+  newchannelts = atol(parv[1]);
+  newtopicts = atol(parv[3]);
+
+  if((chptr = hash_find_channel(parv[2])))
+  {
+    if(chptr->channelts < newchannelts)
+      return;
+
+    else if(chptr->channelts == newchannelts)
+    {
+      if(chptr->topic == NULL || (chptr->topic_time > newtopicts))
+	set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
+      else
+	return;
+    }
+
+    else
+      set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
+  }
+}
+
+static void set_topic(struct Client *source_p, struct Channel *chptr, 
+		      time_t newtopicts, char *topicwho, char *topic)
+{
+  set_channel_topic(chptr, topic, topicwho, newtopicts);
+
+  sendto_channel_local(ALL_MEMBERS, chptr, ":%s TOPIC %s :%s",
+		       ConfigServerHide.hide_servers ? me.name : me.name,
+		       chptr->chname, chptr->topic == NULL ? "" : chptr->topic);
+
+#ifdef TBURST_PROPAGATE
+  sendto_server(source_p, NULL, chptr, CAP_TBURST, NOCAPS, NOFLAGS,
+		":%s TBURST %ld %s %ld %s :%s",
+		me.name, chptr->channelts, chptr->chname,
+		chptr->topic_time, 
+                chptr->topic_info == NULL ? "" : chptr->topic_info,
+                chptr->topic == NULL ? "" : chptr->topic);
+#endif
+}
+
+static void set_tburst_capab()
+{
+  default_server_capabs |= CAP_TBURST;
+}
+
+static void unset_tburst_capab()
+{
+  default_server_capabs &= ~CAP_TBURST;
+}
+
+int send_tburst(struct hook_burst_channel *data)
+{
+  if(data->chptr->topic != NULL && IsCapable(data->client, CAP_TBURST))
+    sendto_one(data->client, ":%s TBURST %ld %s %ld %s :%s",
+               me.name, data->chptr->channelts, data->chptr->chname,
+	       data->chptr->topic_time, data->chptr->topic_info, 
+	       data->chptr->topic);
+
+  return 0;
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_trace.c ircd-hybrid-fuis/modules/m_trace.c
--- ircd-hybrid-7.0rc9/modules/m_trace.c	Wed Sep  4 21:10:24 2002
+++ ircd-hybrid-fuis/modules/m_trace.c	Tue Feb 11 08:20:56 2003
@@ -58,14 +58,12 @@
 void
 _modinit(void)
 {
-  hook_add_event("doing_trace");
   mod_add_cmd(&trace_msgtab);
 }
 
 void
 _moddeinit(void)
 {
-  hook_del_event("doing_trace");
   mod_del_cmd(&trace_msgtab);
 }
 const char *_version = "$Revision: 1.51 $";
@@ -171,7 +169,7 @@
           sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
                      me.name, parv[0], class_name, name, 
                      MyOper(source_p) ? ipaddr :
-		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
+					 (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
                      CurrentTime - target_p->lasttime,
                      (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
         }
@@ -180,7 +178,7 @@
           sendto_one(source_p,form_str(RPL_TRACEUSER),
                      me.name, parv[0], class_name, name, 
                      MyOper(source_p) ? ipaddr : 
-		     (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
+					 (IsIPSpoof(target_p) ? "255.255.255.255" : ipaddr),
                      CurrentTime - target_p->lasttime,
                      (target_p->user)?(CurrentTime - target_p->user->last):0);
         }
@@ -365,7 +363,7 @@
           if (IsAdmin(target_p))
 	    sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
                        me.name, source_p->name, class_name, name,
-                       IsOperAdmin(source_p) ? ip : "255.255.255.255",
+					   IsOperAdmin(source_p) ? ip : "255.255.255.255",
                        CurrentTime - target_p->lasttime,
                        (target_p->user) ? (CurrentTime - target_p->user->last) : 0);
 		       
@@ -375,10 +373,10 @@
 	    sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
 		       me.name, source_p->name, class_name, name, 
 #ifdef HIDE_SPOOF_IPS
-		       IsIPSpoof(target_p) ? "255.255.255.255" : ip,
+              IsIPSpoof(target_p) ? "255.255.255.255" : ip,
 #else
                        MyOper(source_p) ? ip :
-		       (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
+              (IsIPSpoof(target_p) ? "255.255.255.255" : ip),
 #endif
 		       CurrentTime - target_p->lasttime,
 		       (target_p->user)?(CurrentTime - target_p->user->last):0);
@@ -428,11 +426,10 @@
 static void
 trace_spy(struct Client *source_p)
 {
-  struct hook_spy_data data;
-
-  data.source_p = source_p;
-
-  hook_call_event("doing_trace", &data);
+  sendto_realops_flags(FLAGS_SPY, L_ALL,
+           "trace requested by %s (%s@%s) [%s]",
+           source_p->name, source_p->username,
+           source_p->host, source_p->user->server);
 }
 
 /* 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_unkline.c ircd-hybrid-fuis/modules/m_unkline.c
--- ircd-hybrid-7.0rc9/modules/m_unkline.c	Mon Nov 18 14:54:58 2002
+++ ircd-hybrid-fuis/modules/m_unkline.c	Sun Feb 16 21:09:37 2003
@@ -39,22 +39,18 @@
 #include "s_misc.h"
 #include "send.h"
 #include "msg.h"
-#include "s_gline.h"
 #include "parse.h"
 #include "modules.h"
 
 
 static void mo_unkline(struct Client*, struct Client*, int, char**);
 static void mo_undline(struct Client*, struct Client*, int, char**);
-static void mo_ungline(struct Client*, struct Client*, int, char**);
 
 struct Message msgtabs[] = {
   {"UNKLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
    {m_unregistered, m_not_oper, m_error, mo_unkline}},
   {"UNDLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
-   {m_unregistered, m_not_oper, m_error, mo_undline}}, 
-  {"UNGLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
-   {m_unregistered, m_not_oper, m_error, mo_ungline}}
+   {m_unregistered, m_not_oper, m_error, mo_undline}}
 };
 
 #ifndef STATIC_MODULES
@@ -424,74 +420,3 @@
   ilog(L_NOTICE, "%s removed D-Line for [%s]", get_oper_name(source_p),
        cidr);
 }
-
-/*
-** m_ungline
-** added May 29th 2000 by Toby Verrall <toot@melnet.co.uk>
-** added to hybrid-7 7/11/2000 --is
-**
-**      parv[0] = sender nick
-**      parv[1] = gline to remove
-*/
-
-static void
-mo_ungline(struct Client *client_p, struct Client *source_p,
-	   int parc,char *parv[])
-{
-  char  *user,*host;
-
-  if (!ConfigFileEntry.glines)
-    {
-      sendto_one(source_p,":%s NOTICE %s :UNGLINE disabled",me.name,parv[0]);
-      return;
-    }
-
-  if (!IsOperUnkline(source_p) || !IsOperGline(source_p))
-    {
-      sendto_one(source_p,":%s NOTICE %s :You need unkline = yes;",
-                 me.name,parv[0]);
-      return;
-    }
-
-  if ((host = strchr(parv[1], '@')) || *parv[1] == '*')
-    {
-      /* Explicit user@host mask given */
-
-      if(host != NULL)                  /* Found user@host */
-        {
-          user = parv[1];       /* here is user part */
-          *(host++) = '\0';     /* and now here is host */
-        }
-      else
-        {
-          user = "*";           /* no @ found, assume its *@somehost */
-          host = parv[1];
-        }
-    }
-  else
-    {
-      sendto_one(source_p, ":%s NOTICE %s :Invalid parameters",
-                 me.name, parv[0]);
-      return;
-    }
-
-  if(remove_gline_match(user, host))
-    {
-      sendto_one(source_p, ":%s NOTICE %s :G-Line for [%s@%s] is removed",
-                 me.name, parv[0], user, host);
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "%s has removed the G-Line for: [%s@%s]",
-			   get_oper_name(source_p), user, host );
-      ilog(L_NOTICE, "%s removed G-Line for [%s@%s]",
-          get_oper_name(source_p), user, host);
-      return;
-    }
-  else
-    {
-      sendto_one(source_p, ":%s NOTICE %s :No G-Line for %s@%s",
-                 me.name, parv[0],user,host);
-      return;
-    }
-}
-
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_userhost.c ircd-hybrid-fuis/modules/m_userhost.c
--- ircd-hybrid-7.0rc9/modules/m_userhost.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-fuis/modules/m_userhost.c	Sun Feb  9 08:21:20 2003
@@ -76,6 +76,9 @@
   int cur_len;
   int rl;
 
+  if (client_p->user)
+    client_p->user->known = 1;
+
   cur_len = ircsprintf(buf,form_str(RPL_USERHOST),me.name, parv[0], "");
   t = buf + cur_len;
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_users.c ircd-hybrid-fuis/modules/m_users.c
--- ircd-hybrid-7.0rc9/modules/m_users.c	Fri May 24 19:34:23 2002
+++ ircd-hybrid-fuis/modules/m_users.c	Sun Feb  9 08:21:20 2003
@@ -78,6 +78,9 @@
 
   sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, parv[0],
                  Count.total, Count.max_tot);
+				 
+  sendto_one(source_p, form_str(RPL_IDENTUSERS), me.name, parv[0],
+                 CurrentIdentUsers, MaxIdentUsers);
 }
 
 /*
@@ -99,6 +102,9 @@
 
       sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, parv[0],
                  Count.total, Count.max_tot);
+				 
+      sendto_one(source_p, form_str(RPL_IDENTUSERS), me.name, parv[0],
+                 CurrentIdentUsers, MaxIdentUsers);
     }
 }
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_version.c ircd-hybrid-fuis/modules/m_version.c
--- ircd-hybrid-7.0rc9/modules/m_version.c	Wed Jul 17 19:09:10 2002
+++ ircd-hybrid-fuis/modules/m_version.c	Sun Feb 16 21:09:37 2003
@@ -157,10 +157,6 @@
   if(ConfigChannel.use_except)
     *p++ = 'e';
     
-  if (ConfigFileEntry.glines)
-    *p++ = 'g';
-    *p++ = 'G';
-
   /* might wanna hide this :P */
   if (ServerInfo.hub && 
       (!ConfigServerHide.disable_remote || IsOper(source_p)) )
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_wallops.c ircd-hybrid-fuis/modules/m_wallops.c
--- ircd-hybrid-7.0rc9/modules/m_wallops.c	Thu Jan  9 01:20:07 2003
+++ ircd-hybrid-fuis/modules/m_wallops.c	Sat Feb 22 16:44:15 2003
@@ -77,6 +77,12 @@
       return;
     }
 
+  if (MyClient(source_p) && !IsOperOperwall(source_p))
+  {
+    sendto_one(source_p, "YYyy, haven't I told you, that you don't have rights to do this?!");
+    return;
+  }
+  
   sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
   sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
                 ":%s WALLOPS :%s", parv[0], message);
@@ -100,6 +106,12 @@
                  me.name, parv[0], "WALLOPS");
       return;
     }
+
+  if (MyClient(source_p) && !IsOperOperwall(source_p))
+  {
+    sendto_one(source_p, "YYyy, haven't I told you, that you don't have rights to do this?!");
+    return;
+  }
 
   if(IsClient(source_p))
     sendto_wallops_flags(FLAGS_OPERWALL, source_p, "OPERWALL - %s", message);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_who.c ircd-hybrid-fuis/modules/m_who.c
--- ircd-hybrid-7.0rc9/modules/m_who.c	Thu Jan 16 18:54:02 2003
+++ ircd-hybrid-fuis/modules/m_who.c	Sat Mar 22 18:55:33 2003
@@ -112,8 +112,10 @@
   struct Channel *vchan;
 #endif
 
-  /* See if mask is there, collapse it or return if not there */
+/*  if (client_p->user)
+    client_p->user->known = 1;*/
 
+  /* See if mask is there, collapse it or return if not there */
   if (mask != NULL)
     {
       (void)collapse(mask);
@@ -371,7 +373,7 @@
     if (!IsPerson(target_p))
       continue;
 
-    if (IsInvisible(target_p))
+    if (IsInvisible(target_p) && !IsOper(source_p))
     {
       ClearMark(target_p);
       continue;
@@ -456,9 +458,10 @@
 {
 #ifndef ANONOPS
   dlink_node *ptr;
+#else
+  int done=0;
 #endif
   struct Client *target_p;
-  int done=0;
   int i=0;
   
   if(peons_list != NULL)
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/modules/m_whois.c ircd-hybrid-fuis/modules/m_whois.c
--- ircd-hybrid-7.0rc9/modules/m_whois.c	Sat Feb  8 19:02:28 2003
+++ ircd-hybrid-fuis/modules/m_whois.c	Wed Mar 12 16:24:46 2003
@@ -44,6 +44,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "hook.h"
+#include "resv.h"
 
 static int do_whois(struct Client *client_p, struct Client *source_p,
                     int parc, char *parv[]);
@@ -51,7 +52,7 @@
                         int wilds, int glob);
 static void whois_person(struct Client *source_p,struct Client *target_p,int glob);
 static int global_whois(struct Client *source_p, char *nick, int wilds, int glob);
-
+static char *get_random_reason ();
 static void m_whois(struct Client*, struct Client*, int, char**);
 static void ms_whois(struct Client*, struct Client*, int, char**);
 static void mo_whois(struct Client*, struct Client*, int, char**);
@@ -65,14 +66,12 @@
 void
 _modinit(void)
 {
-  hook_add_event("doing_whois");
   mod_add_cmd(&whois_msgtab);
 }
 
 void
 _moddeinit(void)
 {
-  hook_del_event("doing_whois");
   mod_del_cmd(&whois_msgtab);
 }
 
@@ -381,7 +380,7 @@
   char *t;
   int tlen;
   int reply_to_send = NO;
-  struct hook_mfunc_data hd;
+  struct ResvNick *resv;
 #ifdef VCHANS
   struct Channel *bchan;
 #endif
@@ -393,54 +392,68 @@
 	 target_p->username, target_p->host, target_p->info);
   server_name = (char *)target_p->user->server;
 
-  ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
-	       me.name, source_p->name, target_p->name, "");
+  if (IsOper(source_p) || (target_p == source_p))
+      sendto_one(source_p, form_str(RPL_WHOISREALHOST), me.name,
+      source_p->name, target_p->name,
+      ServerInfo.network_name, target_p->realhost);
 
-  mlen = strlen(buf);
-  cur_len = mlen;
-  t = buf + mlen;
+  if ((resv = return_nick_resv(target_p->name)) && !irccmp(resv->reason, 
+ConfigFileEntry.services_qline)) {
+          sendto_one(source_p, form_str(RPL_SERVICESCHANS),
+                                 me.name, source_p->name, target_p->name);
+} else if(HasNoChannelList(target_p) && !IsOper(source_p) && (target_p != source_p)) {
+	  sendto_one(source_p, form_str(RPL_NOLIST),
+  				 me.name, source_p->name, target_p->name);
+}
+  else {
+	ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
+	    	   me.name, source_p->name, target_p->name, "");
+    mlen = strlen(buf);
+	cur_len = mlen;
+    t = buf + mlen;
 
-  DLINK_FOREACH(lp, target_p->user->channel.head)
-  {
-    chptr = lp->data;
-    chname = chptr->chname;
+	DLINK_FOREACH(lp, target_p->user->channel.head)
+    {
+	  chptr = lp->data;
+      chname = chptr->chname;
 
 #ifdef VCHANS
-    if (IsVchan(chptr))
-    {
-      bchan = find_bchan (chptr);
-      if (bchan != NULL)
-	chname = bchan->chname;
-    }
+	  if (IsVchan(chptr))
+  	  {
+    	bchan = find_bchan (chptr);
+    	if (bchan != NULL)
+		  chname = bchan->chname;
+  	  }
 #endif
 
-    if (ShowChannel(source_p, chptr))
-    {
-      if ((cur_len + strlen(chname) + 2) > (BUFSIZE - 4))
-      {
-	sendto_one(source_p, "%s", buf);
-	cur_len = mlen;
-	t = buf + mlen;
-      }
+  	  if (ShowChannel(source_p, chptr) || IsOper(source_p))
+  	  {
+  	    if ((cur_len + strlen(chname) + 2) > (BUFSIZE - 4))
+    	{
+		  sendto_one(source_p, "%s", buf);
+		  cur_len = mlen;
+		  t = buf + mlen;
+	    }
 
-      if (chptr->mode.mode & MODE_HIDEOPS && !is_any_op(chptr,source_p))
-      {
-	ircsprintf(t,"%s ",chname);
-      }
-      else
-      {
-	ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p), chname);
-      }
+        if (chptr->mode.mode & MODE_HIDEOPS && !is_any_op(chptr,source_p) && !IsOper(source_p))
+	    {
+		  ircsprintf(t,"%s ",chname);
+        }
+	    else
+        {
+		  ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p), chname);
+    	}
 
-      tlen = strlen(t);
-      t += tlen;
-      cur_len += tlen;
-      reply_to_send = YES;
-    }
-  }
+    	tlen = strlen(t);
+    	t += tlen;
+    	cur_len += tlen;
+    	reply_to_send = YES;
+  	  }
+	}
 
-  if (reply_to_send)
-    sendto_one(source_p, "%s", buf);
+	if (reply_to_send)
+	  sendto_one(source_p, "%s", buf);
+  }
           
   if ((IsOper(source_p) || !ConfigServerHide.hide_servers) || target_p == source_p)
     sendto_one(source_p, form_str(RPL_WHOISSERVER),
@@ -456,16 +469,34 @@
     sendto_one(source_p, form_str(RPL_AWAY), me.name,
 	       source_p->name, target_p->name, target_p->user->away);
 
-  if (IsOper(target_p))
+  if (IsOper(target_p) && MyClient(source_p))
     sendto_one(source_p, form_str(RPL_WHOISOPERATOR),
-	       me.name, source_p->name, target_p->name);
+	       me.name, source_p->name, target_p->name, get_random_reason());
+
+  if (IsNSId(target_p))
+   sendto_one(source_p, form_str(RPL_NS_ID),
+     me.name, source_p->name, target_p->name);
+
+  if ((target_p->umodes & FLAGS_AVFH))
+   sendto_one(source_p, form_str(RPL_AVFH),
+     me.name, source_p->name, target_p->name);
+
+  if (IsOSId(target_p))
+   sendto_one(source_p, form_str(RPL_OS_ID),
+     me.name, source_p->name, target_p->name);
+
+  if (IsNetKeeper(target_p))
+   sendto_one(source_p, form_str(RPL_NK_ID),
+     me.name, source_p->name, target_p->name);
+
+  if (HasSilence(target_p))
+   sendto_one(source_p, form_str(RPL_SILENCE),
+     me.name, source_p->name, target_p->name);
 
   if (MyConnect(target_p)) /* Can't do any of this if not local! db */
   {
-    if ( (glob) ||
-         ( MyClient(source_p) && (IsOper(source_p) ||
-                                  !ConfigServerHide.hide_servers) ) ||
-         (source_p == target_p) )
+    if (((glob) || (MyClient(source_p) && (IsOper(source_p) || !ConfigServerHide.hide_servers)) ||
+         (source_p == target_p)) && (!(target_p->umodes & FLAGS_NOIDLE) || IsOper(source_p)))
     {
       sendto_one(source_p, form_str(RPL_WHOISIDLE),
 	         me.name, source_p->name, target_p->name,
@@ -474,14 +505,16 @@
     }
   }
 
-  hd.client_p = target_p;
-  hd.source_p = source_p;
-
 /* although we should fill in parc and parv, we don't ..
  *	 be careful of this when writing whois hooks
  */
-  if(MyClient(source_p)) 
-    hook_call_event("doing_whois", &hd);
+  if (MyClient(source_p) && IsOper(target_p) && target_p != source_p && (target_p->umodes & FLAGS_SPY))
+	sendto_one(target_p, ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you",
+			   me.name,
+			   target_p->name,
+			   source_p->name,
+			   source_p->username,
+			   source_p->host);
   
   return;
 }
@@ -617,3 +650,20 @@
   do_whois(client_p, source_p, parc, parv);
   return;
 }
+
+static char *get_random_reason()
+{
+  int i, desired;
+  MessageFileLine *linenode = ConfigFileEntry.fopers.contentsOfFile;
+
+  if (linenode == NULL)
+    return "Is an IRC Operator";
+
+  desired = random() % ConfigFileEntry.fopers.linecount;
+
+  for (i = 0; i < desired; i++)
+    linenode = linenode->next;
+
+  return linenode->line;
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/servlink/.cvsignore ircd-hybrid-fuis/servlink/.cvsignore
--- ircd-hybrid-7.0rc9/servlink/.cvsignore	Tue Jul  3 00:53:12 2001
+++ ircd-hybrid-fuis/servlink/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,3 +0,0 @@
-Makefile
-setup.h
-servlink
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/.cvsignore ircd-hybrid-fuis/src/.cvsignore
--- ircd-hybrid-7.0rc9/src/.cvsignore	Tue Jul  3 00:53:13 2001
+++ ircd-hybrid-fuis/src/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,6 +0,0 @@
-Makefile
-y.tab.*
-lex.yy.c
-ircd
-version.c.last
-version.c
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/.depend ircd-hybrid-fuis/src/.depend
--- ircd-hybrid-7.0rc9/src/.depend	Thu Jan 30 05:28:45 2003
+++ ircd-hybrid-fuis/src/.depend	Wed Mar 12 16:47:08 2003
@@ -61,7 +61,7 @@
   ../include/memory.h ../include/balloc.h ../include/irc_string.h \
   ../include/sprintf_irc.h ../include/class.h ../include/channel_mode.h \
   ../include/common.h ../include/event.h ../include/fdlist.h \
-  ../include/hash.h ../include/list.h ../include/s_gline.h \
+  ../include/hash.h ../include/list.h \
   ../include/numeric.h ../include/packet.h ../include/s_auth.h \
   ../include/s_bsd.h ../include/s_conf.h ../include/motd.h \
   ../include/s_log.h ../include/s_misc.h ../include/s_serv.h \
@@ -138,7 +138,7 @@
   ../include/irc_string.h ../include/sprintf_irc.h ../include/common.h \
   ../include/event.h ../include/fdlist.h ../include/hash.h \
   ../include/ircdauth.h ../include/ircd_signal.h ../include/list.h \
-  ../include/s_gline.h ../include/motd.h ../include/md5.h \
+  ../include/motd.h ../include/md5.h \
   ../include/msg.h ../include/hostmask.h ../include/numeric.h \
   ../include/parse.h ../include/restart.h ../include/s_auth.h \
   ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
@@ -344,7 +344,7 @@
   ../include/list.h ../include/listener.h ../include/hostmask.h \
   ../include/modules.h ../include/parse.h ../include/msg.h \
   ../include/numeric.h ../include/fdlist.h ../include/s_bsd.h \
-  ../include/s_log.h ../include/send.h ../include/s_gline.h \
+  ../include/s_log.h ../include/send.h \
   ../include/s_debug.h
 s_debug.o: s_debug.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/tools.h \
@@ -357,19 +357,6 @@
   ../include/list.h ../include/numeric.h ../include/s_conf.h \
   ../include/motd.h ../include/s_log.h ../include/scache.h \
   ../include/send.h ../include/whowas.h
-s_gline.o: s_gline.c ../include/stdinc.h ../include/config.h \
-  ../include/setup.h ../include/defaults.h ../include/tools.h \
-  ../include/handlers.h ../include/channel.h ../include/ircd_defs.h \
-  ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
-  ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
-  ../include/memory.h ../include/balloc.h ../include/irc_string.h \
-  ../include/sprintf_irc.h ../include/common.h ../include/m_kline.h \
-  ../include/hostmask.h ../include/numeric.h ../include/fdlist.h \
-  ../include/s_bsd.h ../include/s_conf.h ../include/motd.h \
-  ../include/class.h ../include/s_misc.h ../include/scache.h \
-  ../include/send.h ../include/msg.h ../include/s_serv.h \
-  ../include/s_gline.h ../include/hash.h ../include/event.h \
-  ../include/list.h
 s_log.o: s_log.c ../include/stdinc.h ../include/config.h \
   ../include/setup.h ../include/defaults.h ../include/client.h \
   ../include/ircd_defs.h ../include/ircd_handler.h ../include/linebuf.h \
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/.depend~ ircd-hybrid-fuis/src/.depend~
--- ircd-hybrid-7.0rc9/src/.depend~	Wed Dec 31 19:00:00 1969
+++ ircd-hybrid-fuis/src/.depend~	Sun Feb 16 21:09:37 2003
@@ -0,0 +1,459 @@
+adns.o: adns.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/fileio.h \
+ ../include/res.h ../include/ircd_defs.h ../adns/adns.h \
+ ../include/ircd.h ../include/tools.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/send.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/s_bsd.h \
+ ../include/fdlist.h ../include/s_log.h ../include/event.h \
+ ../include/numeric.h ../adns/internal.h ../adns/dlist.h
+balloc.o: balloc.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd_defs.h \
+ ../include/ircd.h ../include/tools.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/s_log.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/sprintf_irc.h ../include/fdlist.h
+channel.o: channel.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/channel.h ../include/ircd_defs.h ../include/channel_mode.h \
+ ../include/vchannel.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/hash.h ../include/list.h \
+ ../include/numeric.h ../include/s_serv.h ../include/s_user.h \
+ ../include/send.h ../include/whowas.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/event.h \
+ ../include/resv.h ../include/s_log.h
+channel_mode.o: channel_mode.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/channel.h ../include/ircd_defs.h ../include/channel_mode.h \
+ ../include/vchannel.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/hash.h ../include/list.h \
+ ../include/numeric.h ../include/s_serv.h ../include/s_user.h \
+ ../include/send.h ../include/whowas.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/event.h \
+ ../include/s_log.h
+vchannel.o: vchannel.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/vchannel.h ../include/channel.h ../include/ircd_defs.h \
+ ../include/channel_mode.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/hash.h \
+ ../include/list.h ../include/send.h ../include/numeric.h \
+ ../include/s_conf.h ../include/motd.h ../include/class.h
+class.o: class.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/class.h ../include/client.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/list.h \
+ ../include/numeric.h ../include/s_conf.h ../include/motd.h \
+ ../include/send.h ../include/s_debug.h
+client.o: client.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/class.h ../include/channel_mode.h \
+ ../include/common.h ../include/event.h ../include/fdlist.h \
+ ../include/hash.h ../include/list.h \
+ ../include/numeric.h ../include/packet.h ../include/s_auth.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/motd.h \
+ ../include/s_log.h ../include/s_misc.h ../include/s_serv.h \
+ ../include/send.h ../include/whowas.h ../include/s_debug.h \
+ ../include/s_user.h ../include/hostmask.h ../include/listener.h
+dynlink.o: dynlink.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/modules.h \
+ ../include/parse.h ../include/ircd_handler.h ../include/msg.h \
+ ../include/memory.h ../include/ircd_defs.h ../include/balloc.h \
+ ../include/tools.h ../include/s_log.h ../include/client.h \
+ ../include/linebuf.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/send.h
+event.o: event.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd.h \
+ ../include/tools.h ../include/memory.h ../include/ircd_defs.h \
+ ../include/balloc.h ../include/event.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/send.h \
+ ../include/s_log.h
+fdlist.o: fdlist.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/fdlist.h \
+ ../include/ircd_defs.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/tools.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/event.h ../include/s_bsd.h ../include/send.h
+fileio.o: fileio.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/fileio.h \
+ ../include/irc_string.h ../include/client.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/tools.h \
+ ../include/channel.h ../include/res.h ../adns/adns.h \
+ ../include/ircd.h ../include/memory.h ../include/balloc.h \
+ ../include/sprintf_irc.h ../include/send.h ../include/fdlist.h
+getopt.o: getopt.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd_getopt.h
+hash.o: hash.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/s_conf.h ../include/fileio.h ../include/ircd_defs.h \
+ ../include/motd.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/hash.h ../include/resv.h \
+ ../include/numeric.h ../include/send.h ../include/s_debug.h \
+ ../include/fdlist.h
+hook.o: hook.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/list.h ../include/memory.h ../include/ircd_defs.h \
+ ../include/balloc.h ../include/hook.h
+hostmask.o: hostmask.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/memory.h \
+ ../include/ircd_defs.h ../include/balloc.h ../include/tools.h \
+ ../include/s_conf.h ../include/fileio.h ../include/motd.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/res.h \
+ ../adns/adns.h ../include/ircd.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/hostmask.h ../include/numeric.h \
+ ../include/send.h
+irc_string.o: irc_string.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/irc_string.h ../include/client.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/sprintf_irc.h \
+ ../include/list.h
+ircd.o: ircd.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/ircd.h ../include/memory.h ../include/ircd_defs.h \
+ ../include/balloc.h ../include/channel.h ../include/channel_mode.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/event.h ../include/fdlist.h \
+ ../include/hash.h ../include/ircdauth.h ../include/ircd_signal.h \
+ ../include/list.h ../include/motd.h \
+ ../include/md5.h ../include/msg.h ../include/hostmask.h \
+ ../include/numeric.h ../include/parse.h ../include/restart.h \
+ ../include/s_auth.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_log.h ../include/s_misc.h \
+ ../include/s_serv.h ../include/s_stats.h ../include/scache.h \
+ ../include/send.h ../include/whowas.h ../include/modules.h \
+ ../include/hook.h ../include/ircd_getopt.h
+ircd_signal.o: ircd_signal.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd_signal.h \
+ ../include/ircd.h ../include/tools.h ../include/memory.h \
+ ../include/ircd_defs.h ../include/balloc.h ../include/restart.h \
+ ../include/s_log.h ../include/s_bsd.h ../include/fdlist.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h \
+ ../include/irc_string.h ../include/sprintf_irc.h
+kdparse.o: kdparse.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/s_log.h ../include/s_conf.h ../include/fileio.h \
+ ../include/ircd_defs.h ../include/motd.h ../include/class.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h ../include/res.h ../adns/adns.h \
+ ../include/ircd.h ../include/memory.h ../include/balloc.h \
+ ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/hostmask.h
+linebuf.o: linebuf.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/event.h ../include/list.h \
+ ../include/hook.h
+list.o: list.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/channel.h ../include/ircd_defs.h ../include/class.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/list.h \
+ ../include/hostmask.h ../include/numeric.h ../include/restart.h \
+ ../include/s_log.h ../include/send.h
+listener.o: listener.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/listener.h \
+ ../include/ircd_defs.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/fdlist.h ../include/numeric.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h ../include/s_stats.h ../include/send.h
+m_error.o: m_error.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/handlers.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/numeric.h \
+ ../include/send.h ../include/s_debug.h ../include/msg.h \
+ ../include/s_log.h
+match.o: match.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/irc_string.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/sprintf_irc.h
+md5.o: md5.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/memory.h \
+ ../include/ircd_defs.h ../include/balloc.h ../include/tools.h \
+ ../include/s_log.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/md5.h
+memory.o: memory.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd_defs.h \
+ ../include/ircd.h ../include/tools.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/list.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/sprintf_irc.h ../include/send.h \
+ ../include/s_log.h ../include/restart.h
+modules.o: modules.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/modules.h \
+ ../include/parse.h ../include/ircd_handler.h ../include/msg.h \
+ ../include/memory.h ../include/ircd_defs.h ../include/balloc.h \
+ ../include/tools.h ../include/s_log.h ../include/ircd.h \
+ ../include/client.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/send.h \
+ ../include/s_conf.h ../include/motd.h ../include/class.h \
+ ../include/handlers.h ../include/numeric.h ../include/list.h
+motd.o: motd.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/motd.h ../include/ircd_defs.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/fdlist.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/send.h ../include/numeric.h
+numeric.o: numeric.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/numeric.h \
+ ../include/irc_string.h ../include/common.h ../include/memory.h \
+ ../include/ircd_defs.h ../include/balloc.h ../include/tools.h \
+ messages.tab
+packet.o: packet.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/s_bsd.h ../include/fdlist.h ../include/ircd_defs.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/s_serv.h \
+ ../include/common.h ../include/list.h ../include/parse.h \
+ ../include/packet.h ../include/hook.h
+parse.o: parse.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/parse.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/handlers.h ../include/common.h \
+ ../include/hash.h ../include/numeric.h ../include/s_log.h \
+ ../include/s_stats.h ../include/send.h ../include/s_debug.h \
+ ../include/msg.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h ../include/vchannel.h ../include/s_serv.h
+rsa.o: rsa.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/memory.h \
+ ../include/ircd_defs.h ../include/balloc.h ../include/tools.h \
+ ../include/rsa.h ../include/s_conf.h ../include/fileio.h \
+ ../include/motd.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../adns/adns.h ../include/ircd.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/s_log.h
+restart.o: restart.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/restart.h ../include/common.h ../include/fdlist.h \
+ ../include/ircd_defs.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/send.h ../include/s_debug.h ../include/s_log.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h
+resv.o: resv.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/restart.h ../include/common.h ../include/fdlist.h \
+ ../include/ircd_defs.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/send.h ../include/s_debug.h ../include/numeric.h \
+ ../include/s_log.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/channel.h ../include/resv.h \
+ ../include/hash.h
+s_auth.o: s_auth.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/list.h ../include/memory.h ../include/ircd_defs.h \
+ ../include/balloc.h ../include/s_auth.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/irc_string.h ../include/sprintf_irc.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/common.h ../include/event.h ../include/fdlist.h \
+ ../include/ircdauth.h ../include/numeric.h ../include/packet.h \
+ ../include/s_bsd.h ../include/s_log.h ../include/s_stats.h \
+ ../include/send.h
+s_bsd.o: s_bsd.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/fdlist.h \
+ ../include/ircd_defs.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/tools.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/s_bsd.h ../include/class.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h ../include/common.h ../include/event.h \
+ ../include/ircdauth.h ../include/list.h ../include/listener.h \
+ ../include/numeric.h ../include/packet.h ../include/restart.h \
+ ../include/s_auth.h ../include/s_conf.h ../include/motd.h \
+ ../include/s_log.h ../include/s_serv.h ../include/s_stats.h \
+ ../include/send.h ../include/s_debug.h
+s_bsd_kqueue.o: s_bsd_kqueue.c ../include/config.h ../include/setup.h \
+ ../include/defaults.h
+s_bsd_poll.o: s_bsd_poll.c ../include/config.h ../include/setup.h \
+ ../include/defaults.h ../include/stdinc.h ../include/fdlist.h \
+ ../include/ircd_defs.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/tools.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/s_bsd.h ../include/class.h \
+ ../include/client.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/channel.h ../include/common.h ../include/ircdauth.h \
+ ../include/list.h ../include/listener.h ../include/numeric.h \
+ ../include/packet.h ../include/restart.h ../include/s_auth.h \
+ ../include/s_conf.h ../include/motd.h ../include/s_log.h \
+ ../include/s_serv.h ../include/s_stats.h ../include/send.h \
+ ../include/s_debug.h
+s_bsd_select.o: s_bsd_select.c ../include/config.h ../include/setup.h \
+ ../include/defaults.h
+s_bsd_devpoll.o: s_bsd_devpoll.c ../include/config.h \
+ ../include/setup.h ../include/defaults.h
+s_bsd_sigio.o: s_bsd_sigio.c ../include/config.h ../include/setup.h \
+ ../include/defaults.h
+s_conf.o: s_conf.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/ircd_defs.h \
+ ../include/tools.h ../include/s_conf.h ../include/fileio.h \
+ ../include/motd.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/channel.h \
+ ../include/res.h ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/s_serv.h ../include/resv.h ../include/s_stats.h \
+ ../include/common.h ../include/event.h ../include/hash.h \
+ ../include/list.h ../include/listener.h ../include/hostmask.h \
+ ../include/modules.h ../include/parse.h ../include/msg.h \
+ ../include/numeric.h ../include/fdlist.h ../include/s_bsd.h \
+ ../include/s_log.h ../include/send.h \
+ ../include/s_debug.h
+s_debug.o: s_debug.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/s_debug.h ../include/channel.h ../include/ircd_defs.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/fdlist.h ../include/hash.h \
+ ../include/list.h ../include/numeric.h ../include/s_conf.h \
+ ../include/motd.h ../include/s_log.h ../include/scache.h \
+ ../include/send.h ../include/whowas.h
+s_log.o: s_log.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/client.h \
+ ../include/ircd_defs.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/tools.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/s_log.h ../include/s_misc.h \
+ ../include/event.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h
+s_misc.o: s_misc.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/s_misc.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/numeric.h \
+ ../include/fdlist.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/motd.h ../include/class.h ../include/s_serv.h \
+ ../include/send.h
+s_serv.o: s_serv.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/rsa.h \
+ ../include/tools.h ../include/s_serv.h ../include/channel_mode.h \
+ ../include/ircd_defs.h ../include/vchannel.h ../include/channel.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/event.h ../include/fdlist.h \
+ ../include/hash.h ../include/md5.h ../include/list.h \
+ ../include/numeric.h ../include/packet.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/motd.h ../include/s_log.h \
+ ../include/s_stats.h ../include/s_user.h ../include/scache.h \
+ ../include/send.h ../include/s_debug.h ../include/hook.h
+s_stats.o: s_stats.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/s_stats.h \
+ ../include/client.h ../include/ircd_defs.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/numeric.h ../include/fdlist.h \
+ ../include/s_bsd.h ../include/send.h
+s_user.o: s_user.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/s_user.h ../include/channel.h ../include/ircd_defs.h \
+ ../include/channel_mode.h ../include/class.h ../include/client.h \
+ ../include/ircd_handler.h ../include/linebuf.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/fdlist.h \
+ ../include/hash.h ../include/list.h ../include/listener.h \
+ ../include/motd.h ../include/msg.h ../include/numeric.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/s_log.h \
+ ../include/s_serv.h ../include/s_stats.h ../include/scache.h \
+ ../include/send.h ../include/supported.h ../include/whowas.h \
+ ../include/md5.h ../include/packet.h
+scache.o: scache.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/client.h \
+ ../include/ircd_defs.h ../include/ircd_handler.h ../include/linebuf.h \
+ ../include/tools.h ../include/channel.h ../include/res.h \
+ ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/numeric.h \
+ ../include/send.h ../include/scache.h
+send.o: send.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h \
+ ../include/send.h ../include/channel.h ../include/ircd_defs.h \
+ ../include/class.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/res.h ../include/fileio.h \
+ ../adns/adns.h ../include/ircd.h ../include/memory.h \
+ ../include/balloc.h ../include/irc_string.h ../include/sprintf_irc.h \
+ ../include/common.h ../include/handlers.h ../include/numeric.h \
+ ../include/fdlist.h ../include/s_bsd.h ../include/s_serv.h \
+ ../include/s_conf.h ../include/motd.h ../include/list.h \
+ ../include/s_debug.h ../include/s_log.h ../include/vchannel.h \
+ ../include/hook.h
+sprintf_irc.o: sprintf_irc.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/sprintf_irc.h \
+ ../include/irc_string.h
+tools.o: tools.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/tools.h
+whowas.o: whowas.c ../include/stdinc.h ../include/config.h \
+ ../include/setup.h ../include/defaults.h ../include/whowas.h \
+ ../include/ircd_defs.h ../include/client.h ../include/ircd_handler.h \
+ ../include/linebuf.h ../include/tools.h ../include/channel.h \
+ ../include/res.h ../include/fileio.h ../adns/adns.h ../include/ircd.h \
+ ../include/memory.h ../include/balloc.h ../include/irc_string.h \
+ ../include/sprintf_irc.h ../include/common.h ../include/hash.h \
+ ../include/numeric.h ../include/s_serv.h ../include/s_user.h \
+ ../include/send.h ../include/s_conf.h ../include/motd.h \
+ ../include/class.h
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/Makefile.in ircd-hybrid-fuis/src/Makefile.in
--- ircd-hybrid-7.0rc9/src/Makefile.in	Tue Nov 26 22:56:24 2002
+++ ircd-hybrid-fuis/src/Makefile.in	Sun Feb 16 21:09:37 2003
@@ -97,7 +97,6 @@
   s_bsd_sigio.c			\
   s_conf.c                      \
   s_debug.c                     \
-  s_gline.c                     \
   s_log.c                       \
   s_misc.c                      \
   s_serv.c                      \
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/channel.c ircd-hybrid-fuis/src/channel.c
--- ircd-hybrid-7.0rc9/src/channel.c	Thu Feb  6 03:46:01 2003
+++ ircd-hybrid-fuis/src/channel.c	Wed Mar 12 15:54:10 2003
@@ -57,6 +57,8 @@
 static void free_channel_list(dlink_list * list);
 static int  sub1_from_channel(struct Channel *);
 static void destroy_channel(struct Channel *);
+void DelNokick(struct Channel *cptr, struct Client *source_p);
+void AddNokick(struct Channel *cptr, struct Client *source_p);
 
 static void delete_members(struct Channel *chptr, dlink_list * list);
 
@@ -222,6 +224,23 @@
     free_dlink_node(ptr);
   }
 
+  if((ptr = find_user_link(&chptr->nokick, who)))
+  {
+    dlinkDelete(ptr, &chptr->nokick);
+    free_dlink_node(ptr);
+  }
+
+  for (ptr = who->user->repeat.head; ptr; ptr = next_ptr) {
+    struct Repeat *repeatptr = ptr->data;
+	next_ptr = ptr->next;
+	if (repeatptr->chptr == chptr) {
+	  MyFree(repeatptr->text); MyFree(repeatptr);
+	  dlinkDelete(ptr, &who->user->repeat);
+	  free_dlink_node(ptr);
+	  break;
+	}
+  }
+
   if (MyClient(who))
   {
     if ((ptr = find_user_link(&chptr->locpeons, who)))
@@ -602,6 +621,9 @@
   while ((ptr = chptr->invites.head))
     del_invite(chptr, ptr->data);
 
+  while ((ptr = chptr->nokick.head))
+    DelNokick(chptr, ptr->data);
+
   /* free all bans/exceptions/denies */
   free_channel_list(&chptr->banlist);
   free_channel_list(&chptr->exceptlist);
@@ -1431,6 +1453,31 @@
     if(chptr->topic != NULL)
       free_topic(chptr);
     chptr->topic_time = 0;
+  }
+}
+
+void AddNokick(struct Channel *cptr, struct Client *source_p)
+{
+  dlink_node *nokick;
+
+  DelNokick(cptr, source_p);
+
+  nokick = make_dlink_node();
+  dlinkAdd(source_p, nokick, &cptr->nokick);
+}
+
+void DelNokick(struct Channel *cptr, struct Client *source_p)
+{
+  dlink_node *ptr;
+
+  DLINK_FOREACH(ptr, cptr->nokick.head)
+  {
+    if (ptr->data == source_p)
+    {
+      dlinkDelete(ptr, &cptr->invites);
+      free_dlink_node(ptr);
+      break;
+    }
   }
 }
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/channel_mode.c ircd-hybrid-fuis/src/channel_mode.c
--- ircd-hybrid-7.0rc9/src/channel_mode.c	Thu Feb  6 05:12:39 2003
+++ ircd-hybrid-fuis/src/channel_mode.c	Sun May  4 18:18:40 2003
@@ -44,7 +44,7 @@
 #include "event.h"
 #include "memory.h"
 #include "balloc.h"
-
+#include "resv.h"
 
 #include "s_log.h"
 
@@ -495,6 +495,18 @@
     *mbuf++ = 'i';
   if (chptr->mode.mode & MODE_NOPRIVMSGS)
     *mbuf++ = 'n';
+  if (chptr->mode.mode & MODE_NOCOLOR)
+    *mbuf++ = 'c';
+  if (chptr->mode.mode & MODE_NOTALK)
+    *mbuf++ = 'M';
+  if (chptr->mode.mode & MODE_NOSPAM)
+    *mbuf++ = 'H';
+  if (chptr->mode.mode & MODE_NOREPEAT)
+    *mbuf++ = 'z';
+  if (chptr->mode.mode & MODE_NOCTCP)
+    *mbuf++ = 'C';
+  if (chptr->mode.mode & MODE_JOINF)
+    *mbuf++ = 'q';
 #ifdef ANONOPS
   if (chptr->mode.mode & MODE_HIDEOPS)
     *mbuf++ = 'a';
@@ -690,6 +702,7 @@
 #define SM_ERR_RESTRICTED       0x00000080      /* Restricted chanop */
 #define SM_ERR_RPL_I            0x00000100
 #define SM_ERR_RPL_D            0x00000200
+#define SM_ERR_SERVICESNICK     0x00000400
 
 /* Now lets do some stuff to keep track of what combinations of
  * servers exist...
@@ -808,6 +821,7 @@
            const char *chname)
 {
   long mode_type;
+  int admin = 0;
 
   mode_type = (long)d;
 
@@ -817,11 +831,15 @@
   if((alev < CHACCESS_HALFOP) ||
     ((mode_type == MODE_PRIVATE) && (alev < CHACCESS_CHANOP)))
   {
-    if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
-                 source_p->name, chname);
-    *errors |= SM_ERR_NOOPS;
-    return;
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
+  	  if (!(*errors & SM_ERR_NOOPS))
+    	sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+              	   source_p->name, chname);
+  	  *errors |= SM_ERR_NOOPS;
+  	  return;
+	}
   }
 
   /* If have already dealt with this simple mode, ignore it */
@@ -834,6 +852,9 @@
   {
     chptr->mode.mode |= mode_type;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +%c on %s", source_p->name, c, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = 0;
@@ -848,6 +869,9 @@
 
     chptr->mode.mode &= ~mode_type;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -%c on %s", source_p->name, c, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = 0;
@@ -869,16 +893,22 @@
    * have the capab if we support it, so we should never get
    * here for a remote server if we dont support it..
    */
+  int admin = 0;
+
   if(!ConfigChannel.use_anonops)
     return;
 
   if (alev < CHACCESS_HALFOP)
   {
-    if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
-                 source_p->name, chname);
-    *errors |= SM_ERR_NOOPS;
-    return;
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
+  	  if (!(*errors & SM_ERR_NOOPS))
+    	sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+            	   source_p->name, chname);
+	  *errors |= SM_ERR_NOOPS;
+	  return;
+	}
   }
 
   if (MyClient(source_p) && (++mode_limit > MAXMODEPARAMS))
@@ -892,6 +922,9 @@
   {
     chptr->mode.mode |= MODE_HIDEOPS;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set hideops on %s", source_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = CAP_AOPS;
@@ -904,6 +937,9 @@
   {
     chptr->mode.mode &= ~MODE_HIDEOPS;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to unset hideops on %s", source_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = CAP_AOPS;
@@ -925,6 +961,7 @@
   char *raw_mask;
   dlink_node *ptr;
   struct Ban *banptr;
+  int admin = 0;
 
   if (dir == 0 || parc <= *parn)
   {
@@ -955,24 +992,30 @@
     return;
   }
 
-  if (alev < CHACCESS_HALFOP)
-  {
-    if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
-                 source_p->name, chname);
-    *errors |= SM_ERR_NOOPS;
-    return;
-  }
 
   if (MyClient(source_p) && (++mode_limit > MAXMODEPARAMS))
     return;
 
+  if (alev < CHACCESS_HALFOP)
+  {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
+  	  if (!(*errors & SM_ERR_NOOPS))
+    	sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+              	   source_p->name, chname);
+	  *errors |= SM_ERR_NOOPS;
+  	  return;
+	}
+  }
+
   raw_mask = parv[(*parn)++];
   
   if (IsServer(client_p))
     mask = raw_mask;
   else
     mask = pretty_mask(raw_mask);
+
     
   /* if we're adding a NEW id */
   if (dir == MODE_ADD) 
@@ -980,6 +1023,9 @@
     if((add_id(source_p, chptr, mask, CHFL_BAN) == 0) && MyClient(source_p))
       return;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to ban %s on %s", source_p->name, mask, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = 0;
@@ -990,9 +1036,13 @@
   }
   else if (dir == MODE_DEL)
   {
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to unban %s on %s", source_p->name, mask, chptr->chname);
+
 /* XXX grrrrrrr */
 #ifdef NO_BAN_COOKIE
 
+
     if (del_id(chptr, mask, CHFL_BAN) == 0)
     {
       /* mask isn't a valid ban, check raw_mask */
@@ -1033,6 +1083,7 @@
   dlink_node *ptr;
   struct Ban *banptr;
   char *mask, *raw_mask;
+  int admin = 0;
 
   /* if we have +e disabled, allow local clients to do anything but
    * set the mode.  This prevents the abuse of +e when just a few
@@ -1050,11 +1101,15 @@
 
   if (alev < CHACCESS_HALFOP)
   {
-    if (!(*errors & SM_ERR_NOOPS))
-      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
-                 source_p->name, chname);
-    *errors |= SM_ERR_NOOPS;
-    return;
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
+  	  if (!(*errors & SM_ERR_NOOPS))
+    	sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
+                   source_p->name, chname);
+  	  *errors |= SM_ERR_NOOPS;
+	  return;
+	}
   }
 
   if ((dir == MODE_QUERY) || parc <= *parn)
@@ -1063,6 +1118,9 @@
       return;
     *errors |= SM_ERR_RPL_E;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to see the exception list on %s", source_p->name, chptr->chname);
+
     DLINK_FOREACH(ptr, chptr->exceptlist.head)
     {
       banptr = ptr->data;
@@ -1084,12 +1142,16 @@
   else
     mask = pretty_mask(raw_mask);
 
+
   /* If we're adding a NEW id */
   if (dir == MODE_ADD)
   {
     if((add_id(source_p, chptr, mask, CHFL_EXCEPTION) == 0) && MyClient(source_p))
       return;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +e %s on %s", source_p->name, mask, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = CAP_EX;
@@ -1105,6 +1167,9 @@
   }
   else if (dir == MODE_DEL)
   {
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to unset +e %s on %s", source_p->name, mask, chptr->chname);
+
     if (del_id(chptr, mask, CHFL_EXCEPTION) == 0)
     {
       /* mask isn't a valid ban, check raw_mask */
@@ -1135,6 +1200,7 @@
   char *mask, *raw_mask;
   dlink_node *ptr;
   struct Ban *banptr;
+  int admin = 0;
 
   /* if we have +I disabled, allow local clients to do anything but
    * set the mode.  This prevents the abuse of +I when just a few
@@ -1152,11 +1218,15 @@
 
   if (alev < CHACCESS_HALFOP)
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if ((dir == MODE_QUERY) || parc <= *parn)
@@ -1165,6 +1235,9 @@
       return;
     *errors |= SM_ERR_RPL_I;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to see the invex list on %s", source_p->name, chptr->chname);
+
     DLINK_FOREACH(ptr, chptr->invexlist.head)
     {
       banptr = ptr->data;
@@ -1186,11 +1259,15 @@
   else
     mask = pretty_mask(raw_mask);
 
+
   if(dir == MODE_ADD)
   {
     if((add_id(source_p, chptr, mask, CHFL_INVEX) == 0) && MyClient(source_p))
       return;
 
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +I %s on %s", source_p->name, mask, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = CAP_IE;
@@ -1206,6 +1283,9 @@
   }
   else if (dir == MODE_DEL)
   {
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -I %s on %s", source_p->name, mask, chptr->chname);
+
     if (del_id(chptr, mask, CHFL_INVEX) == 0)
     {
       /* mask isn't a valid ban, check raw_mask */
@@ -1254,17 +1334,23 @@
   int wasnt_voiced = 0, t_op, t_hop, t_voice;
   char *opnick;
   struct Client *targ_p;
+  struct ResvNick *resv;
+  int admin = 0;
 #ifdef HALFOPS
   int wasnt_hopped = 0;
 #endif
 
   if (alev < CHACCESS_CHANOP)
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if ((dir == MODE_QUERY) || (parc <= *parn))
@@ -1283,6 +1369,7 @@
 
   opnick = parv[(*parn)++];
 
+
   if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
   {
     return;
@@ -1297,6 +1384,15 @@
     return;
   }
 
+  if (MyClient(source_p) && (resv = return_nick_resv(opnick)) && !irccmp(resv->reason, ConfigFileEntry.services_qline))
+  {
+    if (!(*errors & SM_ERR_SERVICESNICK))
+      sendto_one(source_p, form_str(ERR_SERVICESNICKHOP), me.name,
+                 source_p->name, chname);
+    *errors |= SM_ERR_SERVICESNICK;
+    return;
+  }
+
   mode_get_status(chptr, targ_p, &t_op, &t_hop, &t_voice, 1);
 
   if (((dir == MODE_ADD) && t_op) ||
@@ -1341,6 +1437,9 @@
   if (dir == MODE_ADD)
   {
 
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +o %s on %s", source_p->name, targ_p->name, chptr->chname);
+
 #ifndef REQUIRE_OANDV
     if (!wasnt_voiced && t_voice)
     {
@@ -1379,6 +1478,9 @@
   }
   else
   {
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -o %s on %s", source_p->name, targ_p->name, chptr->chname);
+
 #ifdef HALFOPS
     /* Converting -o to -h... */
     if (t_hop)
@@ -1439,9 +1541,10 @@
            char **parv, int *errors, int alev, int dir, char c, void *d,
            const char *chname)
 {
-  int i, wasnt_voiced = 0, t_voice, t_op, t_hop;
+  int i, wasnt_voiced = 0, t_voice, t_op, t_hop, admin = 0;
   char *opnick;
   struct Client *targ_p;
+  struct ResvNick *resv;
 
   /* halfops have been disabled.. disallow local users to set,
    * remote is taken care of via BOUNCE_BAD_HOPS, and we shouldnt
@@ -1467,11 +1570,15 @@
       ((chptr->mode.mode & MODE_PRIVATE) ?
         CHACCESS_CHANOP : CHACCESS_HALFOP))
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if ((dir == MODE_QUERY) || parc <= *parn)
@@ -1482,6 +1589,7 @@
 
   opnick = parv[(*parn)++];
 
+
   if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
   {
     return;
@@ -1522,6 +1630,15 @@
   }
 #endif
 
+  if (MyClient(source_p) && (resv = return_nick_resv(opnick)) && !irccmp(resv->reason, ConfigFileEntry.services_qline))
+  {
+    if (!(*errors & SM_ERR_SERVICESNICK))
+      sendto_one(source_p, form_str(ERR_SERVICESNICKHOP), me.name,
+                 source_p->name, chname);
+    *errors |= SM_ERR_SERVICESNICK;
+    return;
+  }
+
   /* Cancel out all other mode changes... */
   for (i = 0; i < mode_count; i++)
     if (mode_changes[i].dir == MODE_ADD &&
@@ -1540,6 +1657,10 @@
 
   if (dir == MODE_ADD)
   {
+
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +h %s on %s", source_p->name, targ_p->name, chptr->chname);
+
     if (!wasnt_voiced && t_voice)
     {
       mode_changes[mode_count].letter = 'v';
@@ -1574,6 +1695,10 @@
   }
   else 
   { /* MODE_DEL */
+
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -h %s on %s", source_p->name, targ_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = 'h';
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = CAP_HOPS;
@@ -1603,17 +1728,21 @@
           char **parv, int *errors, int alev, int dir, char c, void *d,
           const char *chname)
 {
-  int i, t_op, t_hop, t_voice;
+  int i, t_op, t_hop, t_voice, admin = 0;
   char *opnick;
   struct Client *targ_p;
 
   if (alev < CHACCESS_HALFOP)
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if ((dir == MODE_QUERY) || parc <= *parn)
@@ -1621,6 +1750,7 @@
 
   opnick = parv[(*parn)++];
 
+
   if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
   {
     return;
@@ -1653,6 +1783,10 @@
 
   if (dir == MODE_ADD)
   {
+
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +v %s on %s", source_p->name, targ_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = 0;
@@ -1674,6 +1808,9 @@
       }
     }
 
+  if (admin)
+    sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -v %s on %s", source_p->name, targ_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = 'v';
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = 0;
@@ -1691,16 +1828,20 @@
           char **parv, int *errors, int alev, int dir, char c, void *d,
           const char *chname)
 {
-  int i, limit;
+  int i, limit, admin = 0;
   char *lstr;
 
   if (alev < CHACCESS_HALFOP)
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if (dir == MODE_QUERY)
@@ -1722,6 +1863,9 @@
         mode_changes[i].letter = 0;
     }
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +l %d on %s", source_p->name, limit, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = 0;
@@ -1739,6 +1883,9 @@
 
     chptr->mode.limit = 0;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -l on %s", source_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = 0;
@@ -1755,16 +1902,20 @@
         char **parv, int *errors, int alev, int dir, char c, void *d,
         const char *chname)
 {
-  int i;
+  int i, admin = 0;
   char *key;
 
   if (alev < CHACCESS_HALFOP)
   {
+	if (IsOperRemote(source_p) && !ServicesOn) {
+	  admin = 1;
+	} else {
     if (!(*errors & SM_ERR_NOOPS))
       sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name,
                  source_p->name, chname);
     *errors |= SM_ERR_NOOPS;
     return;
+	}
   }
 
   if (dir == MODE_QUERY)
@@ -1789,6 +1940,9 @@
         mode_changes[i].letter = 0;
     }
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set +k %s on %s", source_p->name, chptr->mode.key, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_ADD;
     mode_changes[mode_count].caps = 0;
@@ -1807,6 +1961,9 @@
 
     *chptr->mode.key = 0;
 
+	if (admin)
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, "%s is using his admin flag to set -k on %s", source_p->name, chptr->chname);
+
     mode_changes[mode_count].letter = c;
     mode_changes[mode_count].dir = MODE_DEL;
     mode_changes[mode_count].caps = 0;
@@ -1831,17 +1988,17 @@
   {chm_nosuch, NULL},
   {chm_nosuch, NULL},                             /* A */
   {chm_nosuch, NULL},                             /* B */
-  {chm_nosuch, NULL},                             /* C */
+  {chm_simple, (void *) MODE_NOCTCP},             /* s */
   {chm_nosuch, NULL},                             /* D */
   {chm_nosuch, NULL},                             /* E */
   {chm_nosuch, NULL},                             /* F */
   {chm_nosuch, NULL},                             /* G */
-  {chm_nosuch, NULL},                             /* H */
+  {chm_simple, (void *) MODE_NOSPAM},             /* H */
   {chm_invex, NULL},                              /* I */
   {chm_nosuch, NULL},                             /* J */
   {chm_nosuch, NULL},                             /* K */
   {chm_nosuch, NULL},                             /* L */
-  {chm_nosuch, NULL},                             /* M */
+  {chm_simple, (void *) MODE_NOTALK},             /* M */
   {chm_nosuch, NULL},                             /* N */
   {chm_nosuch, NULL},                             /* O */
   {chm_nosuch, NULL},                             /* P */
@@ -1867,7 +2024,7 @@
   {chm_nosuch, NULL},				  /* a */
 #endif
   {chm_ban, NULL},                                /* b */
-  {chm_nosuch, NULL},                             /* c */
+  {chm_simple, (void *) MODE_NOCOLOR},             /* s */
   {chm_nosuch, NULL},                             /* d */
   {chm_except, NULL},                             /* e */
   {chm_nosuch, NULL},                             /* f */
@@ -1885,7 +2042,7 @@
   {chm_simple, (void *) MODE_NOPRIVMSGS},         /* n */
   {chm_op, NULL},                                 /* o */
   {chm_simple, (void *) MODE_PRIVATE},            /* p */
-  {chm_nosuch, NULL},                             /* q */
+  {chm_simple, (void *) MODE_JOINF},	          /* q */
   {chm_nosuch, NULL},                             /* r */
   {chm_simple, (void *) MODE_SECRET},             /* s */
   {chm_simple, (void *) MODE_TOPICLIMIT},         /* t */
@@ -1894,7 +2051,7 @@
   {chm_nosuch, NULL},                             /* w */
   {chm_nosuch, NULL},                             /* x */
   {chm_nosuch, NULL},                             /* y */
-  {chm_nosuch, NULL},                             /* z */
+  {chm_simple, (void *) MODE_NOREPEAT},           /* z */
 };
 /* *INDENT-ON* */
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/client.c ircd-hybrid-fuis/src/client.c
--- ircd-hybrid-7.0rc9/src/client.c	Sun Feb 16 17:54:37 2003
+++ ircd-hybrid-fuis/src/client.c	Sat Mar 22 18:55:33 2003
@@ -35,7 +35,6 @@
 #include "irc_string.h"
 #include "ircd.h"
 #include "list.h"
-#include "s_gline.h"
 #include "numeric.h"
 #include "packet.h"
 #include "s_auth.h"
@@ -458,96 +457,47 @@
 
     if (IsPerson(client_p))
     {
-      if (ConfigFileEntry.glines &&
-	  (aconf = find_gkill(client_p, client_p->username)))
-      {
-	if (IsExemptKline(client_p))
-	{
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-		       "GLINE over-ruled for %s, client is kline_exempt",
-			       get_client_name(client_p, HIDE_IP));
-	  continue;
-	}
-	
-	if (IsExemptGline(client_p))
-	{
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-			"GLINE over-ruled for %s, client is gline_exempt",
-			       get_client_name(client_p, HIDE_IP));
-	  continue;
-	}
-       
-	sendto_realops_flags(FLAGS_ALL, L_ALL, "GLINE active for %s",
-			     get_client_name(client_p, HIDE_IP));
-			    
-	if(ConfigFileEntry.kline_with_connection_closed &&
-	   ConfigFileEntry.kline_with_reason)
-	{
-	  reason = "Connection closed";
-
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
-		     me.name, client_p->name,
-		     aconf->passwd ? aconf->passwd : "G-lined");
-	} 
-	else 
-	{
-	  if(ConfigFileEntry.kline_with_connection_closed)
-	    reason = "Connection closed";
-	  else if(ConfigFileEntry.kline_with_reason && aconf->passwd)
-	    reason = aconf->passwd;
-	  else
-	    reason = "G-lined";
-
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
-		     me.name, client_p->name, reason);
-	}
-	
-	(void)exit_client(client_p, client_p, &me, reason);
-	/* and go examine next fd/client_p */    
-	continue;
-      } 
-      else if((aconf = find_kill(client_p)) != NULL) 
+	  if((aconf = find_kill(client_p)) != NULL) 
       {
-	/* if there is a returned struct ConfItem.. then kill it */
-	if (IsExemptKline(client_p))
-	{
-	  sendto_realops_flags(FLAGS_ALL, L_ALL,
-			     "KLINE over-ruled for %s, client is kline_exempt",
-			     get_client_name(client_p, HIDE_IP));
-	  continue;
-	}
+		/* if there is a returned struct ConfItem.. then kill it */
+		if (IsExemptKline(client_p))
+	    {
+		  sendto_realops_flags(FLAGS_ALL, L_ALL,
+				   "KLINE over-ruled for %s, client is kline_exempt",
+			  	   get_client_name(client_p, HIDE_IP));
+	  	  continue;
+		}
 
-	sendto_realops_flags(FLAGS_ALL, L_ALL, "KLINE active for %s",
+	  	sendto_realops_flags(FLAGS_ALL, L_ALL, "KLINE active for %s",
 			     get_client_name(client_p, HIDE_IP));
 	
-	if(ConfigFileEntry.kline_with_connection_closed &&
-	   ConfigFileEntry.kline_with_reason)
-	{
-	  reason = "Connection closed";
+		if(ConfigFileEntry.kline_with_connection_closed &&
+	     ConfigFileEntry.kline_with_reason)
+		{
+		  reason = "Connection closed";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
-		     me.name, client_p->name, 
-		     aconf->passwd ? aconf->passwd : "K-lined");
-	}
-	else
-	{
-	  if(ConfigFileEntry.kline_with_connection_closed)
-	    reason = "Connection closed";
-	  else if(ConfigFileEntry.kline_with_reason && aconf->passwd)
-	    reason = aconf->passwd;
-	  else
-	    reason = "K-lined";
+		  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+			     me.name, client_p->name, 
+			     aconf->passwd ? aconf->passwd : "K-lined");
+	    }
+  		else
+		{
+		  if(ConfigFileEntry.kline_with_connection_closed)
+	  		reason = "Connection closed";
+		  else if(ConfigFileEntry.kline_with_reason && aconf->passwd)
+	  		reason = aconf->passwd;
+		  else
+	  		reason = "K-lined";
 
-	  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
-		     me.name, client_p->name, reason);
-	}
+		  sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP),
+				     me.name, client_p->name, reason);
+		}
 	      
 	(void)exit_client(client_p, client_p, &me, reason);
 	continue; 
       }
-    }
   }
- 
+} 
   /* also check the unknowns list for new dlines */
   DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head)
   {
@@ -590,6 +540,8 @@
       --Count.oper;
     if (IsInvisible(client_p)) 
       --Count.invisi;
+	if (IsNSId(client_p) && ServicesOn)
+  	  --CurrentIdentUsers;  
   }
 
   if(splitchecking && !splitmode)
@@ -961,10 +913,35 @@
       }
 
       target_p = source_p->from;
-      if (target_p && IsServer(target_p) && target_p != client_p &&
-          !IsMe(target_p) && !IsKilled(source_p))
-        sendto_one(target_p, ":%s SQUIT %s :%s", from->name, source_p->name,
-                   comment);
+      if (target_p && IsServer(target_p) && target_p != client_p && !IsMe(target_p) &&
+          (!IsKilled(source_p)))
+        sendto_one(target_p, ":%s SQUIT %s :%s", from->name, source_p->name, comment);
+   else
+        sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+            "Server %s dropped. Message from %s", source_p->name, from->name);
+
+     if (!irccmp(source_p->name, ConfigFileEntry.services_host))
+     {
+       struct Client *tmpptr;
+
+       ServicesOn = 0;
+        CurrentIdentUsers = 0;
+
+       sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
+         "Services (%s) become down", source_p->name);
+
+       for (tmpptr = GlobalClientList; tmpptr; tmpptr = tmpptr->next) {
+         if (IsServer(tmpptr) || IsMe(tmpptr))
+           continue;
+
+         if (IsNSId(tmpptr))
+           ClearNSId(tmpptr);
+         if (IsOSId(tmpptr))
+           ClearOSId(tmpptr);
+         if (IsNetKeeper(tmpptr))
+           ClearNetKeeper(tmpptr);
+    	}
+      }
     }
   else if (IsPerson(source_p)) /* ...just clean all others with QUIT... */
     {
@@ -1334,11 +1311,11 @@
 
     if (IsIpHash(source_p))
       remove_one_ip(&source_p->localClient->ip);
-    
+
     delete_adns_queries(source_p->localClient->dns_query);
     delete_identd_queries(source_p);
     client_flush_input(source_p);
-    
+
     /* This source_p could have status of one of STAT_UNKNOWN, STAT_CONNECTING
      * STAT_HANDSHAKE or STAT_UNKNOWN
      * all of which are lumped together into unknown_list
@@ -1358,7 +1335,7 @@
     if (IsClient(source_p))
     {
       Count.local--;
-      
+
       /* a little extra paranoia */
       if (IsPerson(source_p))
         dlinkDelete(&source_p->localClient->lclient_node, &lclient_list);
@@ -1386,19 +1363,19 @@
       else
         uplink = NULL;
     }
-    
+
     if (IsPerson(source_p))
       sendto_realops_flags(FLAGS_CCONN, L_ALL,
                            "Client exiting: %s (%s@%s) [%s] [%s]",
                            source_p->name, source_p->username, source_p->host,
-                           comment, 
+                           comment,
 #ifdef HIDE_SPOOF_IPS
                            IsIPSpoof(source_p) ? "255.255.255.255" :
 #endif
                            source_p->localClient->sockhost);
-    
+
     log_user_exit(source_p);
-  
+
     if (!IsDead(source_p))
     {
       if (client_p != NULL && source_p != client_p)
@@ -1408,7 +1385,6 @@
         sendto_one(source_p, "ERROR :Closing Link: %s (%s)",
                    source_p->host, comment);
     }
-
     /*
     ** Currently only server connections can have
     ** depending remote clients here, but it does no
@@ -1429,7 +1405,7 @@
   {
     if(ConfigServerHide.hide_servers)
     {
-      /* set netsplit message to "me.name *.split" to still show 
+      /* set netsplit message to "me.name *.split" to still show
        * that its a split, but hide the servers splitting
        */
       ircsprintf(comment1,"%s *.split", me.name);
@@ -1440,7 +1416,7 @@
         strcpy(comment1, source_p->serv->up);
       else
         strcpy(comment1, "<Unknown>");
-      
+
       strcat(comment1," ");
       strcat(comment1, source_p->name);
     }
@@ -1448,7 +1424,7 @@
     /* XXX Why does this happen */
     if (source_p->serv != NULL)
       remove_dependents(client_p, source_p, from, comment, comment1);
-    
+
     if (source_p->servptr == &me)
     {
       sendto_realops_flags(FLAGS_ALL, L_ALL,
@@ -1457,11 +1433,11 @@
                            source_p->localClient->sendK,
                            source_p->localClient->receiveK);
       ilog(L_NOTICE, "%s was connected for %d seconds.  %d/%d sendK/recvK.",
-           source_p->name, CurrentTime - source_p->firsttime, 
+           source_p->name, CurrentTime - source_p->firsttime,
            source_p->localClient->sendK, source_p->localClient->receiveK);
     }
   }
-  
+
   /* The client *better* be off all of the lists */
   assert(dlinkFind(&unknown_list, source_p) == NULL);
   assert(dlinkFind(&lclient_list, source_p) == NULL);
@@ -1727,6 +1703,11 @@
       return 0;
     }
 
+  if (IsNSId(source_p) && ServicesOn)
+   CurrentIdentUsers--;
+
+  ClearNSId(source_p);
+
   /* Finally, add to hash */
   del_from_client_hash_table(source_p->name, source_p);
   strcpy(source_p->name, nick);
@@ -1744,4 +1725,39 @@
   return 1;
 }
 
+static char cyr2lat[] = {
+  'A', 'B', 'V', 'G', 'D', 'E', 'Z', 'Z', 'I', 'J', 'K', 'L', 'M', 'N',
+  'O', 'P', 'R', 'S', 'T', 'U', 'F', 'H', 'C', '4', '6', '@', 'Y', '#',
+  'J', '#', 'U', 'Q',
+  'a', 'b', 'v', 'g', 'd', 'e', 'z', 'z', 'i', 'j', 'k', 'l', 'm', 'n',
+  'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'c', '4', '6', '@', 'y', '#',
+  'j', '#', 'u', 'q'
+};
+
+/*
+ * this will transpose cyrillic characters
+ * into their latin phonetic counterparts
+ *
+ *                                -demond
+ */
+char *translate(struct Client *client_p, char *buf)
+{
+  unsigned char *p = buf;
+  int offset;
+
+  if (IsSetTransWin(client_p))
+    offset = 192;
+  else if (IsSetTransISO(client_p))
+    offset = 176;
+  else
+    return buf;
 
+  while (*p)
+  {
+	if ((*p >= offset) && (*p < offset + 2*32))
+  	  *p = cyr2lat[*p - offset];
+    ++p;
+  }
+
+  return buf;
+}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/descrip.mms ircd-hybrid-fuis/src/descrip.mms
--- ircd-hybrid-7.0rc9/src/descrip.mms	Thu May 23 18:20:15 2002
+++ ircd-hybrid-fuis/src/descrip.mms	Sun Feb 16 21:09:37 2003
@@ -13,7 +13,7 @@
 		HASH.OBJ,HOOK.OBJ,HOSTMASK.OBJ,IRC_STRING.OBJ,IRCD_SIGNAL.OBJ,LINEBUF.OBJ,LIST.OBJ,IRCD.OBJ,-
 		LISTENER.OBJ,M_ERROR.OBJ,MATCH.OBJ,MD5.OBJ,MEMORY.OBJ,MODULES.OBJ,MOTD.OBJ,NUMERIC.OBJ,PACKET.OBJ,-
 		PARSE.OBJ,RESTART.OBJ,RSA.OBJ,S_AUTH.OBJ,S_BSD.OBJ,S_BSD_SELECT.OBJ,S_CONF.OBJ,S_DEBUG.OBJ,-
-		S_GLINE.OBJ,S_LOG.OBJ,S_MISC.OBJ,S_SERV.OBJ,S_STATS.OBJ,S_USER.OBJ,SCACHE.OBJ,SEND.OBJ,SPRINTF_IRC.OBJ,-
+		S_LOG.OBJ,S_MISC.OBJ,S_SERV.OBJ,S_STATS.OBJ,S_USER.OBJ,SCACHE.OBJ,SEND.OBJ,SPRINTF_IRC.OBJ,-
 		VCHANNEL.OBJ,WHOWAS.OBJ,TOOLS.OBJ,RESV.OBJ,KDPARSE.OBJ,-
 		CHANNEL_MODE.OBJ,CRYPT.OBJ,BALLOC.OBJ,SNPRINTF.OBJ
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/ircd.c ircd-hybrid-fuis/src/ircd.c
--- ircd-hybrid-7.0rc9/src/ircd.c	Sun Feb 16 16:22:25 2003
+++ ircd-hybrid-fuis/src/ircd.c	Wed Mar 12 15:54:10 2003
@@ -45,7 +45,6 @@
 #include "ircdauth.h"
 #include "ircd_signal.h"
 #include "list.h"
-#include "s_gline.h"
 #include "motd.h"
 #include "ircd_handler.h"
 #include "md5.h"
@@ -117,6 +116,7 @@
 int     debuglevel = -1;        /* Server debug level */
 char*   debugmode  = "";        /*  -"-    -"-   -"-  */
 time_t  nextconnect = 1;        /* time for next try_connections call */
+int      ServicesOn  = 0;
 
 /* Set to zero because it should be initialized later using
  * initialize_server_capabs
@@ -404,10 +404,12 @@
   InitMessageFile( USER_MOTD, MPATH, &ConfigFileEntry.motd );
   InitMessageFile( OPER_MOTD, OPATH, &ConfigFileEntry.opermotd );
   InitMessageFile( USER_LINKS, LIPATH, &ConfigFileEntry.linksfile );
+  InitMessageFile( OPERS_FILE, OFPATH, &ConfigFileEntry.fopers );
 
   ReadMessageFile( &ConfigFileEntry.motd );
   ReadMessageFile( &ConfigFileEntry.opermotd );
   ReadMessageFile( &ConfigFileEntry.linksfile );
+  ReadMessageFile( &ConfigFileEntry.fopers );
 }
 
 /*
@@ -530,11 +532,11 @@
 {
   /* Check to see if the user is running us as root, which is a nono */
   
-  if(geteuid() == 0)
+/*  if(geteuid() == 0)
   {
     fprintf(stderr, "Don't run ircd as root!!!\n");
     return -1;
-  }
+  }*/
 
   /*
    * save server boot time right away, so getrusage works correctly
@@ -581,7 +583,6 @@
   ConfigFileEntry.configfile = CPATH;   /* Server configuration file */
   ConfigFileEntry.klinefile = KPATH;    /* Server kline file */
   ConfigFileEntry.dlinefile = DLPATH;   /* dline file */
-  ConfigFileEntry.glinefile = GPATH;    /* gline log file */
 
   myargv = argv;
   umask(077);                /* better safe than sorry --SRB */
@@ -731,7 +732,12 @@
 #ifdef VCHANS
   eventAddIsh("clear_channels", clear_channels, NULL, 1800);
 #endif
-  eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
+
+  eventAddIsh("check_warn_drone", check_warn_drone, NULL, CHECK_DRONE_TIME);
+ 
+  eventAddIsh("check_drone_queue", check_drone_queue, NULL, ConfigFileEntry.drone_rate_period);
+
+  eventAddIsh("purge_repeats", purge_repeats, NULL, ConfigFileEntry.repeat_grace);
 
   eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/ircd_lexer.l ircd-hybrid-fuis/src/ircd_lexer.l
--- ircd-hybrid-7.0rc9/src/ircd_lexer.l	Wed Oct 30 12:44:56 2002
+++ ircd-hybrid-fuis/src/ircd_lexer.l	Fri Mar  7 13:21:33 2003
@@ -170,20 +170,24 @@
 fallback_to_ip6_int { return FALLBACK_IP6_INT; }
 flatten_links	{ return FLATTEN_LINKS; }
 fname_foperlog  { return FNAME_FOPERLOG; }
+netid              { return NETID; }
+services_host  { return SERVICES_HOST; }
+services_qline { return SERVICES_QLINE; }
+network_server_site { return SERVER_SITE; }
+equivalent      { return EQUIVALENT; }
+nicks           { return NICKS; }
 fname_operlog   { return FNAME_OPERLOG; }
 fname_userlog   { return FNAME_USERLOG; }
 gecos		{ return GECOS; }
 general		{ return GENERAL; }
-gline		{ return GLINE; }
-gline_exempt    { return GLINE_EXEMPT; }
-gline_log       { return GLINE_LOG; }
-gline_time      { return GLINE_TIME; }
 global_kill	{ return GLOBAL_KILL; }
 have_ident	{ return HAVE_IDENT; }
 havent_read_conf { return HAVENT_READ_CONF; }
 hidden		{ return HIDDEN; }
 hide_servers	{ return HIDE_SERVERS; }
 host		{ return HOST; }
+maskhost    { return MASKHOST; }
+webchat    { return WEBCHAT; }
 hub		{ return HUB; }
 hub_mask	{ return HUB_MASK; }
 idletime        { return IDLETIME; }
@@ -209,6 +213,7 @@
 masked		{ return TMASKED; }
 max_buffer	{ return T_MAX_BUFFER; }
 max_clients     { return T_MAX_CLIENTS; }
+have_operwall     { return OPER_OPERWALL; }
 max_number	{ return MAX_NUMBER; }
 maximum_links   { return MAXIMUM_LINKS; }
 message_locale	{ return MESSAGE_LOCALE; }
@@ -252,6 +257,7 @@
 shared          { return T_SHARED; }
 short_motd      { return SHORT_MOTD; }
 silent          { return SILENT; }
+skip_on_fail    { return SKIP_ON_FAIL; }
 spoof		{ return SPOOF; }
 spoof_notice	{ return SPOOF_NOTICE; }
 true_no_oper_flood { return TRUE_NO_OPER_FLOOD; }
@@ -261,10 +267,13 @@
 use_except	{ return USE_EXCEPT; }
 use_halfops     { return USE_HALFOPS; }
 use_help        { return USE_HELP; }
+silence_default        { return SILENCE_DEFAULT; }
+no_colors_quit_msg     { return NO_COLORS; }
 use_invex	{ return USE_INVEX; }
 use_knock	{ return USE_KNOCK; }
 use_vchans      { return USE_VCHANS; }
 throttle_time { return THROTTLE_TIME; }
+how_old { return HOW_OLD; }
 user		{ return USER;} 
 vchans_oper_only { return VCHANS_OPER_ONLY; }
 vhost	{ return VHOST; }
@@ -282,11 +291,24 @@
 ts_max_delta            { return TS_MAX_DELTA; }
 ts_warn_delta           { return TS_WARN_DELTA; }
 links_delay           { return LINKS_DELAY; }
+grace_time              { return GRACE_TIME; }
 kline_with_connection_closed { return KLINE_WITH_CONNECTION_CLOSED; }
 kline_with_reason       { return KLINE_WITH_REASON; }
 warn_no_nline           { return WARN_NO_NLINE; }
 non_redundant_klines    { return NON_REDUNDANT_KLINES; }
-
+userpar         { return USERPAR; }
+param           { return PARAM; }
+dccforb         { return DCCFORB; }
+fileext           { return FILEEXT; }
+quitcheck         { return QUITCHECK; }
+adv_text           { return ADV_TEXT; }
+repeat_grace        { return REPEAT_GRACE; }
+drone_rate_max      { return DRONE_RATE_MAX; }
+drone_rate_period   { return DRONE_RATE_PERIOD; }
+drone_kline         { return DRONE_KLINE; }
+drone_batch         { return DRONE_BATCH; }
+drone_kline_time    { return DRONE_KLINE_TIME; }
+drone_reason        { return DREASON; }
 stats_o_oper_only       { return STATS_O_OPER_ONLY; }
 stats_k_oper_only	{ return STATS_K_OPER_ONLY; }
 stats_i_oper_only	{ return STATS_I_OPER_ONLY; }
@@ -297,7 +319,6 @@
 knock_delay_channel	{ return KNOCK_DELAY_CHANNEL; }
 iauth_server            { return IAUTH_SERVER; }
 iauth_port		{ return IAUTH_PORT; }
-glines                  { return GLINES; }
 max_bans                { return MAX_BANS; }
 modules                 { return MODULES; }
 module                  { return MODULE; }
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/ircd_parser.y ircd-hybrid-fuis/src/ircd_parser.y
--- ircd-hybrid-7.0rc9/src/ircd_parser.y	Tue Nov 12 08:45:42 2002
+++ ircd-hybrid-fuis/src/ircd_parser.y	Fri Mar  7 13:22:10 2003
@@ -100,6 +100,25 @@
 %token  AUTH
 %token  AUTOCONN
 %token  BYTES KBYTES MBYTES GBYTES TBYTES
+%token  USERPAR
+%token  PARAM
+
+%token  DCCFORB
+%token  FILEEXT
+%token  QUITCHECK
+%token  ADV_TEXT
+
+%token  DRONE_RATE_MAX
+%token  DRONE_RATE_PERIOD
+%token  DRONE_KLINE
+%token  DRONE_BATCH
+%token  DRONE_KLINE_TIME
+%token  DREASON
+%token  REPEAT_GRACE
+
+%token  EQUIVALENT
+%token  NICKS
+
 %token  CALLER_ID_WAIT
 %token  CAN_FLOOD
 %token  CHANNEL
@@ -135,19 +154,22 @@
 %token  FNAME_FOPERLOG
 %token  FNAME_OPERLOG
 %token  FNAME_USERLOG
+%token  NETID
+%token  SERVICES_HOST
+%token  OPERSS_FILE
+%token  SERVICES_QLINE
+%token  SERVER_SITE
 %token  GECOS
 %token  GENERAL
-%token  GLINE
-%token  GLINES
-%token  GLINE_EXEMPT
-%token  GLINE_LOG
-%token  GLINE_TIME
 %token  GLOBAL_KILL
 %token  HAVE_IDENT
 %token	HAVENT_READ_CONF
 %token  HIDDEN
 %token  HIDE_SERVERS
 %token  HOST
+%token  MASKHOST
+%token  WEBCHAT
+%token  SKIP_ON_FAIL
 %token  HUB
 %token  HUB_MASK
 %token  IAUTH_PORT
@@ -260,6 +282,7 @@
 %token  T_MAX_CLIENTS
 %token  T_NCHANGE
 %token  T_OPERWALL
+%token  OPER_OPERWALL
 %token  T_REJ
 %token  T_SERVNOTICE
 %token  T_SKILL
@@ -267,6 +290,7 @@
 %token  T_UNAUTH
 %token  T_WALLOP
 %token  THROTTLE_TIME
+%token  HOW_OLD
 %token  TRUE_NO_OPER_FLOOD
 %token  UNKLINE
 %token  USER
@@ -275,9 +299,12 @@
 %token  USE_EXCEPT
 %token  USE_HALFOPS
 %token  USE_HELP
+%token  SILENCE_DEFAULT
+%token  NO_COLORS
 %token  USE_INVEX
 %token  USE_KNOCK
 %token  USE_VCHANS
+%token  GRACE_TIME
 %token  VCHANS_OPER_ONLY
 %token  VHOST
 %token  VHOST6
@@ -313,7 +340,11 @@
 		| exempt_entry
 		| general_entry
                 | gecos_entry
+                | userpar_entry
+				| dccforb_entry
+				| quitcheck_entry
                 | modules_entry
+				| equivalent_entry
                 | error ';'
                 | error '}'
         ;
@@ -621,7 +652,7 @@
                         logging_item ;
 
 logging_item:           logging_path | logging_oper_log |
-                        logging_gline_log | logging_log_level |
+                        logging_log_level |
 			error;
 
 logging_path:           T_LOGPATH '=' QSTRING ';' 
@@ -632,10 +663,6 @@
                         {
                         };
 
-logging_gline_log:	GLINE_LOG '=' QSTRING ';'
-                        {
-                        };
-
 logging_log_level:     LOG_LEVEL '=' T_L_CRIT ';'
   { set_log_level(L_CRIT); }
                        |
@@ -740,8 +767,8 @@
                 oper_item;
 
 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_class | oper_global_kill | oper_remote | oper_operwall |
+		oper_kline | oper_unkline | oper_nick_changes |
                 oper_die | oper_rehash | oper_admin | oper_rsa_public_key_file | error;
 
 oper_name:      NAME '=' QSTRING ';'
@@ -856,6 +883,10 @@
 oper_remote: REMOTE '=' TYES ';' { yy_achead->port |= CONF_OPER_REMOTE;}
              |
              REMOTE '=' TNO ';' { yy_achead->port &= ~CONF_OPER_REMOTE; } ;
+	     
+oper_operwall: OPER_OPERWALL '=' TYES ';' { yy_achead->port |= CONF_OPER_OPERWALL;}
+             |
+             OPER_OPERWALL '=' TNO ';' { yy_achead->port &= ~CONF_OPER_OPERWALL; } ;
 
 oper_kline: KLINE '=' TYES ';' { yy_achead->port |= CONF_OPER_K;}
             |
@@ -865,10 +896,6 @@
               |
               UNKLINE '=' TNO ';' { yy_achead->port &= ~CONF_OPER_UNKLINE; } ;
 
-oper_gline: GLINE '=' TYES ';' { yy_achead->port |= CONF_OPER_GLINE;}
-            |
-            GLINE '=' TNO ';' { yy_achead->port &= ~CONF_OPER_GLINE; };
-
 oper_nick_changes: NICK_CHANGES '=' TYES ';' { yy_achead->port |= CONF_OPER_N;}
                    |
                    NICK_CHANGES '=' TNO ';' { yy_achead->port &= ~CONF_OPER_N;};
@@ -951,6 +978,81 @@
     class_sendq_var = $3;
   };
 
+/***************************************************************************
+ *  section equivalent, defines equivalent nicks          -demond
+ ***************************************************************************/
+
+equivalent_entry:   EQUIVALENT
+  {
+  }
+  '{' equivalent_items '}' ';'
+  {
+  };
+
+equivalent_items:   equivalent_items equivalent_item |
+                    equivalent_item
+;
+equivalent_item:    equivalent_nicks | error
+;
+equivalent_nicks:   NICKS '=' QSTRING ';'
+  {
+    add_equiv_nicks(yylval.string);
+  };
+
+/***************************************************************************
+ *  section userpar, defines USER constant parameters
+ *  by various clients, mostly Java applets                    -demond
+ ***************************************************************************/
+
+ userpar_entry:      USERPAR
+ { }
+ '{' userpar_items '}' ';'
+  {  };
+
+ userpar_items:      userpar_items userpar_item | userpar_item;
+ userpar_item:       userpar_param | error;
+
+ userpar_param:      PARAM '=' QSTRING ';'
+ {
+   add_userpar_param(yylval.string);
+ };
+
+/***************************************************************************
+ *  section dccforb, defines file types that wont be accepted (by DCC) if the
+ *  user has mode +D
+ ***************************************************************************/
+
+ dccforb_entry:      DCCFORB
+ { }
+ '{' dccforb_items '}' ';'
+  {  };
+
+ dccforb_items:      dccforb_items dccforb_item | dccforb_item;
+ dccforb_item:       dccforb_fileext | error;
+
+ dccforb_fileext:      FILEEXT '=' QSTRING ';'
+ {
+   add_dccforb_fileext(yylval.string);
+ };
+
+/***************************************************************************
+ *  section quitcheck, defines which words in the quit message will be
+ *  considered as advertisment and it will be blocked (the quit messages
+ *  will be blanked to Client Quit).
+ ***************************************************************************/
+
+ quitcheck_entry:      QUITCHECK
+ { }
+ '{' quitcheck_items '}' ';'
+  {  };
+
+ quitcheck_items:      quitcheck_items quitcheck_item | quitcheck_item;
+ quitcheck_item:       quitcheck_adv_text | error;
+
+ quitcheck_adv_text:      ADV_TEXT '=' QSTRING ';'
+ {
+   add_adv_text(yylval.string);
+ };
 
 /***************************************************************************
  *  section listen
@@ -1074,10 +1176,10 @@
 
 auth_item:      auth_user | auth_passwd | auth_class |
                 auth_kline_exempt | auth_have_ident | auth_is_restricted |
-                auth_exceed_limit | auth_no_tilde | auth_gline_exempt |
-                auth_spoof | auth_spoof_notice |
+                auth_exceed_limit | auth_no_tilde |
+                auth_spoof | auth_spoof_notice | auth_maskhost | auth_webchat |
                 auth_redir_serv | auth_redir_port | auth_can_flood |
-                error;
+				auth_skipfail | error;
 
 auth_user:   USER '=' QSTRING ';'
   {
@@ -1204,17 +1306,6 @@
     yy_achead->flags &= ~CONF_FLAGS_NO_TILDE;
   };
 
-auth_gline_exempt:  GLINE_EXEMPT '=' TYES ';' 
-  {
-    yy_achead->flags |= CONF_FLAGS_EXEMPTGLINE;
-  }
-                    |
-                    GLINE_EXEMPT '=' TNO ';'
-  {
-    yy_achead->flags &= ~CONF_FLAGS_EXEMPTGLINE;
-  };
-
-
 auth_redir_serv:    REDIRSERV '=' QSTRING ';'
   {
     yy_achead->flags |= CONF_FLAGS_REDIR;
@@ -1234,6 +1325,32 @@
     DupString(yy_achead->className, yylval.string);
   };
 
+auth_maskhost: MASKHOST '=' TYES ';'
+  {
+     yy_achead->flags |= CONF_FLAGS_MASKHOST;
+ }
+ |            MASKHOST '=' TNO ';'
+ {
+  yy_achead->flags &= CONF_FLAGS_MASKHOST;
+};
+
+auth_webchat: WEBCHAT '=' TYES ';'
+  {
+     yy_achead->flags |= CONF_FLAGS_WEBCHAT;
+ }
+ |            WEBCHAT '=' TNO ';'
+ {
+  yy_achead->flags &= CONF_FLAGS_WEBCHAT;
+};
+
+auth_skipfail: SKIP_ON_FAIL '=' TYES ';'
+ {
+	  yy_achead->flags |= CONF_FLAGS_SKIPFAIL;
+ }
+ |            SKIP_ON_FAIL '=' TNO ';'
+ {
+  yy_achead->flags &= CONF_FLAGS_SKIPFAIL;
+};
 
 /***************************************************************************
  *  section resv
@@ -1948,7 +2065,10 @@
                     general_max_nick_changes | general_max_accept |
                     general_anti_spam_exit_message_time |
                     general_ts_warn_delta | general_ts_max_delta |
-                    general_kline_with_reason |
+                    general_kline_with_reason | general_grace_time |
+                    general_drate_max | general_drate_period |
+                    general_drone_kline | general_drone_batch |
+                    general_drone_ktime | general_drone_reason |
                     general_kline_with_connection_closed |
                     general_warn_no_nline |
                     general_non_redundant_klines | general_dots_in_ident |
@@ -1959,21 +2079,23 @@
                     general_true_no_oper_flood |
                     general_iauth_server |
                     general_iauth_port |
-                    general_glines | general_gline_time |
                     general_idletime |
                     general_maximum_links |
                     general_message_locale | general_client_exit |
                     general_fname_userlog | general_fname_operlog |
                     general_fname_foperlog | general_oper_only_umodes |
-                    general_max_targets |
+                    general_max_targets | general_services_host |
+					general_services_qline | general_network_server_site |
                     general_use_egd | general_egdpool_path |
-                    general_oper_umodes |
+                    general_oper_umodes | general_repeat_grace |
                     general_caller_id_wait | general_default_floodcount |
-                    general_min_nonwildcard |
+                    general_min_nonwildcard | general_netid |
                     general_servlink_path | general_use_help |
+					general_silence_default | general_no_colors_quit_msg |
                     general_default_cipher_preference |
                     general_compression_level | general_client_flood |
                     general_throttle_time | general_havent_read_conf |
+					general_how_old |
                     general_dot_in_ip6_addr | general_ping_cookie |
                     general_fallback_to_ip6_int | 
                     error;
@@ -2038,6 +2160,46 @@
     exit(0);
   }
 };
+general_repeat_grace:  REPEAT_GRACE '=' timespec ';'
+  {
+      ConfigFileEntry.repeat_grace = $3;
+  } ;
+
+general_drate_max:     DRONE_RATE_MAX '=' NUMBER ';'
+  {
+    ConfigFileEntry.drone_rate_max = $3;
+  } ;
+
+general_drate_period:  DRONE_RATE_PERIOD '=' timespec ';'
+  {
+    ConfigFileEntry.drone_rate_period = $3;
+  } ;
+
+general_drone_ktime:   DRONE_KLINE_TIME '=' timespec ';'
+  {
+    ConfigFileEntry.drone_kline_time = $3;
+  } ;
+
+general_drone_kline:   DRONE_KLINE '=' TYES ';'
+  {
+    ConfigFileEntry.drone_kline = 1;
+  }
+    |
+    DRONE_KLINE '=' TNO ';'
+  {
+    ConfigFileEntry.drone_kline = 0;
+  } ;
+
+general_drone_batch:   DRONE_BATCH '=' TYES ';'
+  {
+    ConfigFileEntry.drone_batch = 1;
+  }
+    |
+    DRONE_BATCH '=' TNO ';'
+  {
+    ConfigFileEntry.drone_batch = 0;
+  } ;
+
 general_kline_with_reason: KLINE_WITH_REASON '=' TYES ';'
   {
     ConfigFileEntry.kline_with_reason = 1;
@@ -2209,21 +2371,40 @@
 	      MAXPATHLEN);
 };
 
+general_netid: NETID '=' QSTRING ';'
+{
+  strlcpy(ConfigFileEntry.netid, yylval.string, MAXNETID);
+};
+
+general_services_host: SERVICES_HOST '=' QSTRING ';'
+{
+  MyFree(ConfigFileEntry.services_host);
+  DupString(ConfigFileEntry.services_host, yylval.string);
+};
+
+general_services_qline: SERVICES_QLINE '=' QSTRING ';'
+{
+  MyFree(ConfigFileEntry.services_qline);
+  DupString(ConfigFileEntry.services_qline, yylval.string);
+};
+
+general_network_server_site: SERVER_SITE '=' QSTRING ';'
+{
+  MyFree(ConfigFileEntry.network_server_site);
+  DupString(ConfigFileEntry.network_server_site, yylval.string);
+};
+
+
 general_fname_operlog: FNAME_OPERLOG '=' QSTRING ';'
 {
   strlcpy(ConfigFileEntry.fname_operlog, yylval.string,
 	      MAXPATHLEN);
 };
 
-general_glines: GLINES '=' TYES ';'
-  {
-    ConfigFileEntry.glines = 1;
-  } 
-    |
-    GLINES '=' TNO ';'
-  {
-    ConfigFileEntry.glines = 0;
-  } ;
+general_drone_reason: DREASON '=' QSTRING ';'
+{
+  strlcpy(ConfigFileEntry.drone_reason, yylval.string, MAXDREASON);
+};
 
 general_message_locale: MESSAGE_LOCALE '=' QSTRING ';'
   {
@@ -2234,11 +2415,6 @@
     putenv(langenv);
   } ;
 
-general_gline_time: GLINE_TIME '=' timespec ';'
-  {
-    ConfigFileEntry.gline_time = $3;
-  } ;
-
 general_idletime: IDLETIME '=' timespec ';'
   {
     ConfigFileEntry.idletime = $3;
@@ -2354,11 +2530,36 @@
     ConfigFileEntry.use_help = 0;
   } ;
 
+general_silence_default: SILENCE_DEFAULT '=' TYES ';'
+  {
+    ConfigFileEntry.silence_default = 1;
+  }
+    |
+    SILENCE_DEFAULT '=' TNO ';'
+  {
+    ConfigFileEntry.silence_default = 0;
+  } ;
+
+general_no_colors_quit_msg: NO_COLORS '=' TYES ';'
+  {
+    ConfigFileEntry.no_colors_quit_msg = 1;
+  }
+    |
+    NO_COLORS '=' TNO ';'
+  {
+    ConfigFileEntry.no_colors_quit_msg = 0;
+  } ;
+
 general_throttle_time: THROTTLE_TIME '=' timespec ';'
 {
  ConfigFileEntry.throttle_time = yylval.number;
 } ;
 
+general_how_old: HOW_OLD '=' timespec ';'
+{
+ ConfigFileEntry.how_old = yylval.number;
+} ;
+
 general_fallback_to_ip6_int: FALLBACK_IP6_INT '=' TYES ';'
 {
 #ifdef IPV6
@@ -2820,6 +3021,11 @@
 
   };
 
+general_grace_time:    GRACE_TIME '=' timespec ';'
+  {
+      ConfigFileEntry.grace_time = $3;
+  } ;
+
 serverhide_hidden: HIDDEN '=' TYES ';'
   {
     ConfigServerHide.hidden = 1;
@@ -2839,6 +3045,3 @@
   {
     ConfigServerHide.disable_hidden = 0;
   };
-  
-  
-  
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/ircdauth.c ircd-hybrid-fuis/src/ircdauth.c
--- ircd-hybrid-7.0rc9/src/ircdauth.c	Tue Feb  4 00:30:50 2003
+++ ircd-hybrid-fuis/src/ircdauth.c	Wed Mar 12 15:54:10 2003
@@ -330,8 +330,6 @@
 	 */
 	buffer[length] = '\0';
 
-	fprintf(stderr, "%s", buffer);
-
 	/*
 	 * buffer could possibly contain several lines of info,
 	 * especially if this is the inital connect burst, so go
@@ -700,7 +698,7 @@
 
 #if 0
   sendto_serv_butone(client,
-		     "NICK %s %d %lu %s %s %s %s :%s",
+		     "NICK %s %d %lu %s %s %s %s %s :%s",
 		     client->name,
 		     client->hopcount + 1,
 		     client->tsinfo,
@@ -708,30 +706,31 @@
 		     client->username,
 		     client->host,
 		     client->user->server,
+			 client->host,
 		     client->info);
 #endif
 
   if (!ServerInfo.hub && uplink && IsCapable(uplink,CAP_LL))
   {
-    sendto_one(uplink, "NICK %s %d %lu %s %s %s %s :%s",
+    sendto_one(uplink, "NICK %s %d %lu %s %s %s %s %s :%s",
 		client->name,
 		client->hopcount+1,
 		(unsigned long) client->tsinfo,
 		ubuf,
 		client->username, client->host,
-		client->user->server, client->info);
+		client->user->server, client->host, client->info);
   }
   else
   {
     /* send to all servers, except LL servers */
     sendto_server(NULL, NULL, NULL, NOCAPS, CAP_LL,
-                  NOFLAGS, "NICK %s %d %lu %s %s %s %s :%s",
+                  NOFLAGS, "NICK %s %d %lu %s %s %s %s %s :%s",
                   client->name,
                   client->hopcount+1,
                   (unsigned long) client->tsinfo,
                   ubuf,
                   client->username, client->host,
-                  client->user->server, client->info);
+                  client->user->server, client->host, client->info);
   }
   if (ubuf[1])
   {
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/list.c ircd-hybrid-fuis/src/list.c
--- ircd-hybrid-7.0rc9/src/list.c	Tue Jan 28 16:04:06 2003
+++ ircd-hybrid-fuis/src/list.c	Wed Mar 12 16:09:42 2003
@@ -38,7 +38,7 @@
 #include "send.h"
 #include "memory.h"
 #include "balloc.h"
-
+#include "s_conf.h"
 
 /* XXX assummed 32 bit ints */
 int links_count=0;
@@ -134,32 +134,31 @@
 free_user(struct User* user, struct Client* client_p)
 {
   if (--user->refcnt <= 0)
-  {
-    if (user->away)
-      MyFree((char *)user->away);
-    /*
-     * sanity check
-     */
-    if (user->joined || user->refcnt < 0 ||
-	user->invited.head || user->channel.head)
     {
-      sendto_realops_flags(FLAGS_ALL, L_ALL,
-			   "* %#lx user (%s!%s@%s) %#lx %#lx %#lx %d %d *",
-			   (unsigned long)client_p, client_p ? client_p->name : "<noname>",
-			   client_p->username, client_p->host, (unsigned long)user,
-			   (unsigned long)user->invited.head,
-			   (unsigned long)user->channel.head, user->joined,
-			   user->refcnt);
-      assert(!user->joined);
-      assert(!user->refcnt);
-      assert(!user->invited.head);
-      assert(!user->channel.head);
+      if (user->away)
+        MyFree((char *)user->away);
+      /*
+       * sanity check
+       */
+      if (user->joined || user->refcnt < 0 ||
+          user->invited.head || user->channel.head)
+      {
+        sendto_realops_flags(FLAGS_ALL, L_ALL,
+			     "* %#lx user (%s!%s@%s) %#lx %#lx %#lx %d %d *",
+			     (unsigned long)client_p, client_p ? client_p->name : "<noname>",
+			     client_p->username, client_p->host, (unsigned long)user,
+			     (unsigned long)user->invited.head,
+			     (unsigned long)user->channel.head, user->joined,
+			     user->refcnt);
+        assert(!user->joined);
+        assert(!user->refcnt);
+        assert(!user->invited.head);
+        assert(!user->channel.head);
+      }
+      BlockHeapFree(user_heap, user);
+      --user_count;
+      assert(user_count >= 0);
     }
-
-    BlockHeapFree(user_heap, user);
-    --user_count;
-    assert(user_count >= 0);
-  }
 }
 
 
@@ -240,7 +239,3 @@
   *count = links_count;
   *links_memory_used = links_count * sizeof(dlink_node);
 }
-
-
-
-
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/match.c ircd-hybrid-fuis/src/match.c
--- ircd-hybrid-7.0rc9/src/match.c	Wed Aug 28 13:00:14 2002
+++ ircd-hybrid-fuis/src/match.c	Sun Feb  9 08:21:21 2003
@@ -403,7 +403,7 @@
   '_',
   '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
   'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
-  't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~',
+  't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\', ']', '^',
   0x7f,
   0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
   0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
@@ -434,7 +434,7 @@
   ':', ';', '<', '=', '>', '?',
   '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
   'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
-  'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^',
+  'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~',
   0x5f,
   '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
   'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/messages.tab ircd-hybrid-fuis/src/messages.tab
--- ircd-hybrid-7.0rc9/src/messages.tab	Thu Jan 16 18:10:56 2003
+++ ircd-hybrid-fuis/src/messages.tab	Sun Feb 16 11:17:57 2003
@@ -248,7 +248,7 @@
 /* 225 RPL_STATSDLINE*/         ":%s 225 %s %c %s :%s",
 /* 226 RPL_STATSALINE*/         ":%s 226 %s %s",
 /* 227 */       NULL,
-/* 228 */       NULL,
+/* 228 RPL_EQUIVALENTS*/   ":%s 228 %s Equiv %s/%s",
 /* 229 */       NULL,
 /* 230 */       NULL,
 /* 231 */       NULL,
@@ -291,7 +291,7 @@
 /* 264 */       NULL,
 /* 265 RPL_LOCALUSERS, */       ":%s 265 %s :Current local  users: %d  Max: %d",
 /* 266 RPL_GLOBALUSERS, */      ":%s 266 %s :Current global users: %d  Max: %d",
-/* 267 */       NULL,
+/* 267 RPL_IDENTUSERS, */       ":%s 267 %s :Current identified users: %d  Max: %d",
 /* 268 */       NULL,
 /* 269 */       NULL,
 /* 270 */       NULL,
@@ -337,29 +337,29 @@
 /* 310 */       NULL,
 /* 311 RPL_WHOISUSER, */        ":%s 311 %s %s %s %s * :%s",
 /* 312 RPL_WHOISSERVER, */      ":%s 312 %s %s %s :%s",
-/* 313 RPL_WHOISOPERATOR, */    ":%s 313 %s %s :is an IRC Operator",
+/* 313 RPL_WHOISOPERATOR, */    ":%s 313 %s %s :%s",
 /* 314 RPL_WHOWASUSER, */       ":%s 314 %s %s %s %s * :%s",
 /* 315 RPL_ENDOFWHO, */         ":%s 315 %s %s :End of /WHO list.",
 /* 316 RPL_WHOISCHANOP, */      NULL,
 /* 317 RPL_WHOISIDLE, */        ":%s 317 %s %s %d %d :seconds idle, signon time",
 /* 318 RPL_ENDOFWHOIS, */       ":%s 318 %s %s :End of /WHOIS list.",
 /* 319 RPL_WHOISCHANNELS, */    ":%s 319 %s %s :%s",
-/* 320 */      NULL,
+/* 320 RPL_SERVICESCHANS, */	":%s 320 %s %s :Is a services nickname (channel list hidden)",
 /* 321 RPL_LISTSTART, */        ":%s 321 %s Channel :Users  Name",
 /* 322 RPL_LIST, */             ":%s 322 %s %s %d :%s",
 /* 323 RPL_LISTEND, */          ":%s 323 %s :End of /LIST",
 /* 324 RPL_CHANNELMODEIS, */    ":%s 324 %s %s %s %s",
-/* 325 */       NULL,
-/* 326 */       NULL,
-/* 327 */       NULL,
-/* 328 */       NULL,
+/* 325 RPL_NS_ID */              ":%s 325 %s %s :is idented to NS", 
+/* 326 RPL_OS_ID */              ":%s 326 %s %s :is Services Administrator",
+/* 327 RPL_NK_ID */              ":%s 327 %s %s :is a NetKeeper", 
+/* 328 RPL_SILENCE */            ":%s 328 %s %s :is in Silence mode!",
 /* 329 RPL_CREATIONTIME, */      ":%s 329 %s %s %lu", 
-/* 330 */       NULL,
+/* 330 RPL_AVFH, */				 ":%s 330 %s %s :is available for help",
 /* 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,
+/* 334 RPL_WHOISREALHOST, */    ":%s 334 %s %s :logged on %s from %s",
+/* 335 RPL_NOLIST, */			":%s 335 %s %s :channel list hidden.",
 /* 336 */       NULL,
 /* 337 */       NULL,
 /* 338 RPL_WHOISACTUALLY */	":%s 338 %s :%s is actually %s@%s [%s]",
@@ -394,7 +394,7 @@
 /* 367 RPL_BANLIST, */          ":%s 367 %s %s %s %s %lu",
 /* 368 RPL_ENDOFBANLIST, */     ":%s 368 %s %s :End of Channel Ban List",
 /* 369 RPL_ENDOFWHOWAS, */      ":%s 369 %s %s :End of WHOWAS",
-/* 370 */       NULL,
+/* 370 RPL_LINKSUSERS, */       ":%s 370 %s :Please look %s for a full list of the IRC Servers",
 /* 371 RPL_INFO, */             ":%s 371 %s :%s",
 /* 372 RPL_MOTD, */             ":%s 372 %s :- %s",
 /* 373 RPL_INFOSTART, */        ":%s 373 %s :Server INFO",
@@ -477,7 +477,7 @@
 /* 449 */       NULL,
 /* 450 */       NULL,
 /* 451 ERR_NOTREGISTERED, */    ":%s 451 %s :You have not registered",
-/* 452 */       NULL,
+/* 452 ERR_NOREPEATING, */      ":%s 452 %s %s :No repeating allowed (+z)",
 /* 453 */       NULL,
 /* 454 */       NULL,
 /* 455 */       NULL,
@@ -513,15 +513,15 @@
 /* 484 ERR_RESTRICTED, */       ":%s 484 %s :You are restricted",
 /* 485 ERR_BANNEDNICK, */
        ":%s 485 %s :Can't change nick when banned or on a moderated channel (%s)",
-/* 486 */       NULL,
-/* 487 */       NULL,
-/* 488 */       NULL,
-/* 489 */       NULL,
-/* 490 */       NULL,
+/* 486 ERR_SERVICESNICKHOP, */  ":%s 486 %s %s :Can't op/deop Services nick!",
+/* 487 ERR_SERVICESNICKKICK, */ ":%s 487 %s %s :Can't kick Services nick!",
+/* 488 ERR_NOKICK, */ ":%s 488 %s %s :Can't kick this user he's overprotected by Services!",
+/* 489 ERR_NOCOLOR, */ ":%s 489 %s %s :Colors are forbidden on this channel!",
+/* 490 ERR_JOINF, */   ":%s 490 %s %s :Can't join the channel, because your nick is either not regged or too young!",
 /* 491 ERR_NOOPERHOST, */       ":%s 491 %s :Only few of mere mortals may try to enter the twilight zone",
-/* 492 */       NULL,
-/* 493 */       NULL,
-/* 494 */       NULL,
+/* 492 ERR_NOCTCP, */		":%s 492 %s %s :CTCP messages from non +v/+o/+h are forbidden!",
+/* 493 ERR_NOTALK, */		":%s 493 %s %s :You can't talk on this channel, while your nickname is not regged ot regged too recently!",
+/* 494 ERR_NOSPAM, */		":%s 494 %s %s :You can't send this to the channel, while it contains a spam phrase, if you think it's not contact the admin (/ADMIN)",
 /* 495 */       NULL,
 /* 496 */       NULL,
 /* 497 */       NULL,
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/modules.c ircd-hybrid-fuis/src/modules.c
--- ircd-hybrid-7.0rc9/src/modules.c	Tue Jan 21 09:26:51 2003
+++ ircd-hybrid-fuis/src/modules.c	Sun Mar  9 19:07:45 2003
@@ -57,18 +57,7 @@
 
 static char *core_module_table[] =
 {
-  "m_die.s",
-  "m_kick.s",
-  "m_kill.s",
-  "m_message.s",
-  "m_mode.s",
-  "m_nick.s",
-  "m_part.s",
-  "m_quit.s",
-  "m_server.s",
-  "m_sjoin.s",
-  "m_squit.s",
-  NULL
+    NULL
 };
 
 #define MODS_INCREMENT 10
@@ -571,7 +560,6 @@
 	mod_add_cmd(&dmem_msgtab);
 	mod_add_cmd(&drop_msgtab);
 	mod_add_cmd(&eob_msgtab);
-	mod_add_cmd(&gline_msgtab);
 	mod_add_cmd(&help_msgtab);
 	mod_add_cmd(&info_msgtab);
 	mod_add_cmd(&invite_msgtab);
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/motd.c ircd-hybrid-fuis/src/motd.c
--- ircd-hybrid-7.0rc9/src/motd.c	Thu Oct 10 14:49:30 2002
+++ ircd-hybrid-fuis/src/motd.c	Sun Feb  9 08:21:21 2003
@@ -50,6 +50,7 @@
     motd->motdType = motdType;
     motd->contentsOfFile = NULL;
     motd->lastChangedDate[0] = '\0';
+	motd->linecount = 0;
   }
 
 /*
@@ -119,7 +120,6 @@
         }
       sendto_one(source_p,":%s NOTICE %s :Start of OPER MOTD",me.name,source_p->name);
       break;
-
     default:
       return 0;
       /* NOT REACHED */
@@ -173,6 +173,7 @@
     }
 
   MessageFileptr->contentsOfFile = NULL;
+  MessageFileptr->linecount = 0;
   if(stat(MessageFileptr->fileName, &sb) < 0)
     return -1;
 
@@ -199,7 +200,7 @@
 
       strlcpy(newMessageLine->line, buffer, sizeof(newMessageLine->line));
       newMessageLine->next = (MessageFileLine *)NULL;
-
+	  MessageFileptr->linecount++;
       if(MessageFileptr->contentsOfFile)
         {
           if (currentMessageLine)
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_bsd_devpoll.c ircd-hybrid-fuis/src/s_bsd_devpoll.c
--- ircd-hybrid-7.0rc9/src/s_bsd_devpoll.c	Tue Nov 26 22:46:57 2002
+++ ircd-hybrid-fuis/src/s_bsd_devpoll.c	Sat Mar 22 18:55:33 2003
@@ -300,5 +300,6 @@
 /**
  * Don't let an empty compilation unit slip through.
  */
-static int dummy;
+//static int dummy;
 #endif /* USE_DEVPOLL */
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_bsd_kqueue.c ircd-hybrid-fuis/src/s_bsd_kqueue.c
--- ircd-hybrid-7.0rc9/src/s_bsd_kqueue.c	Tue Nov 26 22:46:57 2002
+++ ircd-hybrid-fuis/src/s_bsd_kqueue.c	Sat Mar 22 18:55:33 2003
@@ -290,5 +290,5 @@
 /**
  * Don't let an empty compilation unit slip through.
  */
-static int dummy;
+//static int dummy;
 #endif /* USE_KQUEUE */
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_bsd_select.c ircd-hybrid-fuis/src/s_bsd_select.c
--- ircd-hybrid-7.0rc9/src/s_bsd_select.c	Tue Nov 26 22:46:57 2002
+++ ircd-hybrid-fuis/src/s_bsd_select.c	Sat Mar 22 18:55:33 2003
@@ -223,5 +223,5 @@
 /**
  * Don't let an empty compilation unit slip through.
  */
-static int dummy;
+//static int dummy;
 #endif /* USE_SELECT */
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_bsd_sigio.c ircd-hybrid-fuis/src/s_bsd_sigio.c
--- ircd-hybrid-7.0rc9/src/s_bsd_sigio.c	Tue Nov 26 22:46:58 2002
+++ ircd-hybrid-fuis/src/s_bsd_sigio.c	Sat Mar 22 18:55:33 2003
@@ -357,5 +357,5 @@
 /**
  * Don't let an empty compilation unit slip through.
  */
-static int dummy;
+//static int dummy;
 #endif
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_conf.c ircd-hybrid-fuis/src/s_conf.c
--- ircd-hybrid-7.0rc9/src/s_conf.c	Sun Feb 16 17:06:46 2003
+++ ircd-hybrid-fuis/src/s_conf.c	Sat Mar 22 18:55:33 2003
@@ -46,7 +46,6 @@
 #include "s_bsd.h"
 #include "s_log.h"
 #include "send.h"
-#include "s_gline.h"
 #include "s_debug.h"
 #include "fileio.h"
 #include "memory.h"
@@ -94,6 +93,20 @@
 
 #define IP_HASH_SIZE 0x1000
 
+struct Equiv {
+  char *nick;
+  char *target;
+  struct Equiv *next;
+};
+
+static struct Equiv *equivs = NULL;
+static struct Equiv *userparms = NULL;
+
+struct DCCForb {
+  char *fileext;
+  struct DCCForb *next;
+};
+
 struct ip_entry
 {
 #ifndef IPV6
@@ -119,6 +132,10 @@
 /* conf xline link list root */
 struct ConfItem        *x_conf = ((struct ConfItem *)NULL);
 
+static struct DCCForb *dccforb = NULL;
+
+static struct DCCForb *quitcheck = NULL;
+
 /* conf uline link list root */
 struct ConfItem        *u_conf = ((struct ConfItem *)NULL);
 
@@ -517,7 +534,6 @@
 verify_access(struct Client* client_p, const char* username)
 {
   struct ConfItem* aconf;
-  struct ConfItem* gkill_conf;
   char non_ident[USERLEN + 1];
 
   if (IsGotId(client_p))
@@ -545,26 +561,6 @@
 			 aconf->name ? aconf->name : "", aconf->port);
 	      return(NOT_AUTHORIZED);
 	    }
-	  if (ConfigFileEntry.glines)
-	    {
-	      if (!IsConfExemptKline(aconf) && !IsConfExemptGline(aconf))
-		{
-		  if (IsGotId(client_p))
-		    gkill_conf = find_gkill(client_p, client_p->username);
-		  else
-		    gkill_conf = find_gkill(client_p, non_ident);
-
-		  if (gkill_conf)
-		    {
-		      sendto_one(client_p, ":%s NOTICE %s :*** G-lined", me.name,
-				 client_p->name);
-		      sendto_one(client_p, ":%s NOTICE %s :*** Banned %s",
-				 me.name, client_p->name, 
-				 gkill_conf->passwd);
-		      return(BANNED_CLIENT);
-		    }
-		}
-	    }
 	  if (IsConfDoIdentd(aconf))
 	    SetNeedId(client_p);
 	  if (IsConfRestricted(aconf))
@@ -572,6 +568,7 @@
 	  /* Thanks for spoof idea amm */
 	  if (IsConfDoSpoofIp(aconf))
 	    {
+          char *p = strchr(aconf->name, '@');
 #ifndef HIDE_SPOOF_IPS
 	      if (IsConfSpoofNotice(aconf))
 		{
@@ -580,9 +577,25 @@
 				       client_p->host, aconf->name);
 		}
 #endif
-	      strlcpy(client_p->host, aconf->name, sizeof(client_p->host));
-	      SetIPSpoof(client_p);
-	    }
+          if (p)
+        {
+          int len = p - aconf->name;
+          if (len > USERLEN)
+            len = USERLEN;
+
+          strcpy(client_p->realhost, client_p->username);
+          strcat(client_p->realhost, "@");
+          strncat(client_p->realhost, client_p->host, HOSTLEN - strlen(client_p->username) - 1);
+          strncpy(client_p->username, aconf->name, len);
+          if (len)
+            client_p->username[len] = '\0';
+        }
+          else
+        strcpy(client_p->realhost, client_p->host);
+          strncpy(client_p->host, p? p+1 : aconf->name, HOSTLEN);
+
+          SetIPSpoof(client_p);
+        }
 	  return(attach_iline(client_p, aconf));
 	}
       else if (aconf->status & CONF_KILL)
@@ -1392,11 +1405,12 @@
   ConfigFileEntry.true_no_oper_flood = NO;
   ConfigFileEntry.fname_userlog[0] = '\0';
   ConfigFileEntry.fname_foperlog[0] = '\0';
+  ConfigFileEntry.services_host = NULL;
+  ConfigFileEntry.services_qline = NULL;
+  ConfigFileEntry.network_server_site = NULL;
   ConfigFileEntry.fname_operlog[0] = '\0';
-  ConfigFileEntry.glines = NO;
   ConfigFileEntry.use_egd = NO;
   /* don't reset msglocale setting -- we'd overwrite then env string */
-  ConfigFileEntry.gline_time = 12 * 3600;
   ConfigFileEntry.idletime = 0;
   ConfigFileEntry.dots_in_ident = 0;
   ConfigFileEntry.maximum_links = MAXIMUM_LINKS_DEFAULT;
@@ -1422,6 +1436,8 @@
     FLAGS_OPERWALL | FLAGS_WALLOP;
   ConfigFileEntry.oper_only_umodes = FLAGS_DEBUG;
   ConfigFileEntry.throttle_time = 10;
+  ConfigFileEntry.how_old = (5 * 7 * 24 * 60 * 60);
+  ConfigFileEntry.drone_reason[0] = '\0';
 
   ConfigChannel.vchans_oper_only = NO;
 
@@ -1444,6 +1460,14 @@
   ConfigServerHide.hide_servers = 0;
   ConfigServerHide.disable_remote = 0;
   ConfigServerHide.links_delay = 300;
+  ConfigFileEntry.grace_time = 10;
+  ConfigFileEntry.drone_rate_max = 3;
+  ConfigFileEntry.repeat_grace = 20;
+  ConfigFileEntry.drone_rate_period = 20;
+  ConfigFileEntry.drone_kline_time = 300*60;
+  ConfigFileEntry.drone_batch = YES;
+  ConfigFileEntry.drone_kline = YES;
+
   ConfigServerHide.hidden = 0;
   ConfigServerHide.disable_hidden = 0;
 
@@ -1455,6 +1479,8 @@
   ConfigFileEntry.fallback_to_ip6_int = 1;
 #endif
 
+  ConfigFileEntry.silence_default = 0;
+  ConfigFileEntry.no_colors_quit_msg = 1;
 #ifdef EFNET
   ConfigFileEntry.use_help = 0;
 #else
@@ -1745,15 +1771,6 @@
   privs_ptr = privs_out;
   *privs_ptr = '\0';
 
-  if (port & CONF_OPER_GLINE)
-    {
-      if(client_p)
-        SetOperGline(client_p);
-      *privs_ptr++ = 'G';
-    }
-  else
-    *privs_ptr++ = 'g';
-
   if(port & CONF_OPER_K)
     {
       if(client_p)
@@ -1790,6 +1807,12 @@
   else
     *privs_ptr++ = 'r';
   
+  if(port & CONF_OPER_OPERWALL)
+    {
+     if (client_p)
+      SetOperOperwall(client_p);
+    }
+  
   if(port & CONF_OPER_UNKLINE)
     {
       if(client_p)
@@ -1881,6 +1904,14 @@
     *flags_ptr++ = 'l';
   if(flags & FLAGS_CALLERID)
     *flags_ptr++ = 'g';
+  if(flags & FLAGS_SILENCE)
+    *flags_ptr++ = 'S';
+  if(flags & FLAGS_NOLIST)
+    *flags_ptr++ = 'X';
+  if(flags & FLAGS_NODCC)
+    *flags_ptr++ = 'D';
+  if(flags & FLAGS_AVFH)
+    *flags_ptr++ = 'h';
   *flags_ptr = '\0';
 
   return(flags_out);
@@ -2062,6 +2093,7 @@
   struct ConfItem **tmp = &ConfigItemList;
   struct ConfItem *tmp2;
   struct Class    *cltmp;
+  struct DCCForb *fileextf;
 
   /*
    * We only need to free anything allocated by yyparse() here.
@@ -2119,6 +2151,46 @@
   MyFree(ServerInfo.network_desc);
   ServerInfo.network_desc = NULL;
 #ifdef HAVE_LIBCRYPTO
+
+    {
+      struct Equiv *eitem;
+
+      if (equivs) do {
+    eitem = equivs;
+    equivs = equivs->next;
+
+    MyFree(eitem->nick);
+    MyFree(eitem->target);
+    MyFree(eitem);
+
+      } while (equivs);
+
+  if (userparms)
+	do {
+	  eitem = userparms;
+	  userparms = userparms->next;
+
+      MyFree(eitem->nick);
+	  MyFree(eitem->target);
+  	  MyFree(eitem);
+  } while (userparms);
+
+  if (dccforb)
+	do {
+	  fileextf = dccforb;
+	  dccforb = dccforb->next;
+      MyFree(fileextf->fileext);
+  	  MyFree(fileextf);
+  } while (dccforb);
+
+  if (quitcheck)
+	do {
+	  fileextf = quitcheck;
+	  quitcheck = quitcheck->next;
+      MyFree(fileextf->fileext);
+  	  MyFree(fileextf);
+  } while (quitcheck);
+
   if (ServerInfo.rsa_private_key != NULL)
   {
     RSA_free(ServerInfo.rsa_private_key);
@@ -2129,6 +2201,7 @@
     MyFree(ServerInfo.rsa_private_key_file);
     ServerInfo.rsa_private_key_file = NULL;
   }
+}
 #endif
 
   /* clean out old resvs from the conf */
@@ -2517,3 +2590,162 @@
 {
   return(0);
 }
+
+/* USER constant parameter handling
+ *                        -demond
+ */
+
+void add_userpar_param(char *param)
+{
+  char *p, *q, *buf;
+  struct Equiv *eitem;
+  if (!param[0]) return;
+
+  DupString(buf, param);
+  p = strchr(buf, '/');
+
+  eitem = (struct Equiv*) MyMalloc(sizeof(struct Equiv));
+
+  if (p) {
+
+    *p = 0; ++p;
+    DupString(q, buf);
+	eitem->nick = q;
+
+    if (*p) {
+
+      DupString(q, p); eitem->target = q;
+    }
+
+  } else {
+
+    DupString(q, buf); eitem->nick = q;
+  }
+  eitem->next = userparms;
+  userparms = eitem;
+
+  MyFree(buf);
+}
+
+int IsUserPar(char *host, char *server)
+{
+  struct Equiv *eitem;
+
+  for (eitem = userparms; eitem; eitem = eitem->next)
+    if (strcmp(host, eitem->nick) == 0)
+	{
+	  if (eitem->target) {
+	    if (strcmp(server, eitem->target) == 0)
+		{
+		  return 1;
+		}
+  	  } else {
+		return 1;
+	  }
+	}
+
+  return 0;
+}
+
+/* DCC Sending arbitration */
+
+void add_dccforb_fileext(char *param)
+{
+  struct DCCForb *fileextf;
+
+  if (!param[0]) return;
+
+  fileextf = (struct DCCForb*) MyMalloc(sizeof(struct DCCForb));
+  DupString(fileextf->fileext, param);
+  fileextf->next = dccforb;
+  dccforb = fileextf;
+}
+
+int IsDCCForb(char *file)
+{
+  struct DCCForb *fileextf;
+
+  for (fileextf = dccforb; fileextf; fileextf = fileextf->next)
+    if (match(fileextf->fileext, file))
+	  return 1;
+
+  return 0;
+}
+
+void add_adv_text(char *param)
+{
+  struct DCCForb *fileextf;
+
+  if (!param[0]) return;
+
+  fileextf = (struct DCCForb*) MyMalloc(sizeof(struct DCCForb));
+  DupString(fileextf->fileext, param);
+  fileextf->next = quitcheck;
+  quitcheck = fileextf;
+}
+
+int IsAdvQuit(char *file)
+{
+  struct DCCForb *fileextf;
+
+  for (fileextf = quitcheck; fileextf; fileextf = fileextf->next)
+    if (match(fileextf->fileext, file))
+	  return 1;
+
+  return 0;
+}
+
+/* these deal with the equivalent nicks stuff
+ *                                  -demond
+ */
+
+void report_equivs(struct Client* source_p)
+{
+  struct Equiv *eitem;
+
+  for (eitem = equivs; eitem; eitem = eitem->next)
+    sendto_one(source_p, form_str(RPL_EQUIVALENTS),
+           me.name, source_p->name,
+           eitem->nick, eitem->target);
+}
+
+void add_equiv_nicks(char *nicks)
+{
+  char *p, *q, *buf;
+  struct Equiv *eitem;
+
+  DupString(buf, nicks);
+  p = strchr(buf, '/');
+
+  if (p) {
+    *p = 0; ++p;
+
+    if (*p) {
+
+      eitem = (struct Equiv*) MyMalloc(sizeof(struct Equiv));
+
+      DupString(q, buf); eitem->nick = q;
+      DupString(q, p); eitem->target = q;
+
+      eitem->next = equivs;
+      equivs = eitem;
+    }
+  }
+
+  MyFree(buf);
+}
+
+char *get_equiv_nick(char *nick, char *target)
+{
+  struct Equiv *eitem;
+
+  for (eitem = equivs; eitem; eitem = eitem->next)
+    if (irccmp(nick, eitem->nick) == 0) {
+
+      strncpy(target, eitem->target, NICKLEN);
+      return target;
+    }
+
+  return NULL;
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_gline.c ircd-hybrid-fuis/src/s_gline.c
--- ircd-hybrid-7.0rc9/src/s_gline.c	Wed Sep  4 22:48:42 2002
+++ ircd-hybrid-fuis/src/s_gline.c	Wed Dec 31 19:00:00 1969
@@ -1,217 +0,0 @@
-/*
- *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- *  s_gline.c: GLine global ban functions.
- *
- *  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: s_gline.c,v 1.23 2002/09/05 02:48:42 db Exp $
- */
-
-#include "stdinc.h"
-#include "tools.h"
-#include "handlers.h"
-#include "channel.h"
-#include "client.h"
-#include "common.h"
-#include "config.h"
-#include "irc_string.h"
-#include "ircd.h"
-#include "m_kline.h"
-#include "hostmask.h"
-#include "numeric.h"
-#include "fdlist.h"
-#include "s_bsd.h"
-#include "s_conf.h"
-#include "s_misc.h"
-#include "scache.h"
-#include "send.h"
-#include "msg.h"
-#include "fileio.h"
-#include "s_serv.h"
-#include "s_gline.h"
-#include "hash.h"
-#include "event.h"
-#include "list.h"
-#include "memory.h"
-
-
-dlink_list glines;
-
-static void expire_glines(void);
-static void expire_pending_glines(void);
-
-/* add_gline
- *
- * inputs       - pointer to struct ConfItem
- * output       - none
- * Side effects - links in given struct ConfItem into gline link list
- */
-void
-add_gline(struct ConfItem *aconf)
-{
-  dlink_node *gline_node;
-  gline_node = make_dlink_node();
-  dlinkAdd(aconf, gline_node, &glines);
-}
-
-/* find_gkill
- *
- * inputs       - struct Client pointer to a Client struct
- * output       - struct ConfItem pointer if a gline was found for this client
- * side effects - none
- */
-struct ConfItem*
-find_gkill(struct Client* client_p, char* username)
-{
-  assert(NULL != client_p);
-  if(client_p == NULL)
-    return NULL;
-  return (IsExemptKline(client_p)) ? 0 : find_is_glined(client_p->host, username);
-}
-
-/*
- * find_is_glined
- * inputs       - hostname
- *              - username
- * output       - pointer to struct ConfItem if user@host glined
- * side effects -
- */
-struct ConfItem*
-find_is_glined(const char* host, const char* name)
-{
-  dlink_node *gline_node;
-  struct ConfItem *kill_ptr; 
-
-  DLINK_FOREACH(gline_node, glines.head)
-  {
-    kill_ptr = gline_node->data;
-    if( (kill_ptr->name && (!name || match(kill_ptr->name,name)))
-	&&
-	(kill_ptr->host && (!host || match(kill_ptr->host,host))))
-    {
-      return(kill_ptr);
-    }
-  }
-
-  return((struct ConfItem *)NULL);
-}
-
-/*
- * remove_gline_match
- *
- * inputs       - user@host
- * output       - 1 if successfully removed, otherwise 0
- * side effects -
- */
-int
-remove_gline_match(const char* user, const char* host)
-{
-  dlink_node *gline_node;
-  struct ConfItem *kill_ptr;
-
-  DLINK_FOREACH(gline_node, glines.head)
-  {
-    kill_ptr = gline_node->data;
-    if(!irccmp(kill_ptr->host,host) && !irccmp(kill_ptr->name,user))
-    {
-      free_conf(kill_ptr);
-      dlinkDelete(gline_node, &glines);
-      free_dlink_node(gline_node);
-      return (1);
-    }
-  }
-  return (0);
-}
-
-/*
- * cleanup_glines
- *
- * inputs	- NONE
- * output	- NONE
- * side effects - expire gline lists
- *                This is an event started off in ircd.c
- */
-void
-cleanup_glines()
-{
-  expire_glines();
-  expire_pending_glines();
-}
-
-/*
- * expire_glines
- * 
- * inputs       - NONE
- * output       - NONE
- * side effects -
- *
- * Go through the gline list, expire any needed.
- */
-static void
-expire_glines()
-{
-  dlink_node *gline_node;
-  dlink_node *next_node;
-  struct ConfItem *kill_ptr;
-
-  DLINK_FOREACH_SAFE(gline_node, next_node, glines.head)
-  {
-    kill_ptr = gline_node->data;
-
-    if(kill_ptr->hold <= CurrentTime)
-    {
-      free_conf(kill_ptr);
-      dlinkDelete(gline_node, &glines);
-      free_dlink_node(gline_node);
-    }
-  }
-}
-
-/*
- * expire_pending_glines
- * 
- * inputs       - NONE
- * output       - NONE
- * side effects -
- *
- * Go through the pending gline list, expire any that haven't had
- * enough "votes" in the time period allowed
- */
-static void
-expire_pending_glines()
-{
-  dlink_node *pending_node;
-  dlink_node *next_node;
-  struct gline_pending *glp_ptr;
-
-  DLINK_FOREACH_SAFE(pending_node, next_node, pending_glines.head)
-  {
-    glp_ptr = pending_node->data;
-
-    if(((glp_ptr->last_gline_time + GLINE_PENDING_EXPIRE) <= CurrentTime)
-       || find_is_glined(glp_ptr->host, glp_ptr->user))
-      
-    {
-      MyFree(glp_ptr->reason1);
-      MyFree(glp_ptr->reason2);
-      MyFree(glp_ptr);
-      dlinkDelete(pending_node, &pending_glines);
-      free_dlink_node(pending_node);
-    }
-  }
-}
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_log.c ircd-hybrid-fuis/src/s_log.c
--- ircd-hybrid-7.0rc9/src/s_log.c	Sat Feb 15 11:32:46 2003
+++ ircd-hybrid-fuis/src/s_log.c	Sun Apr 13 12:18:57 2003
@@ -216,7 +216,8 @@
 	  (signed long) on_for / 3600,
 	  (signed long) (on_for % 3600)/60,
 	  (signed long) on_for % 60,
-	  source_p->name, source_p->username, source_p->host,
+	  source_p->name, source_p->username,
+      source_p->realhost[0]? strcmp(source_p->realhost, "<no_realhost_info>") source_p->realhost : source_p->host : source_p->host,
 	  source_p->localClient->sendK,
 	  source_p->localClient->receiveK);
     }
@@ -250,7 +251,8 @@
 		   (signed long) on_for / 3600,
 		   (signed long) (on_for % 3600)/60,
 		   (signed long) on_for % 60,
-		   source_p->name, source_p->username, source_p->host,
+		   source_p->name, source_p->username,
+	       source_p->realhost[0]? strcmp(source_p->realhost, "<no_realhost_info>") ? source_p->realhost : source_p->host : source_p->host,
 		   source_p->localClient->sendK,
 		   source_p->localClient->receiveK);
 	
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_misc.c ircd-hybrid-fuis/src/s_misc.c
--- ircd-hybrid-7.0rc9/src/s_misc.c	Fri May 24 19:34:51 2002
+++ ircd-hybrid-fuis/src/s_misc.c	Sat Mar 22 18:55:33 2003
@@ -27,17 +27,23 @@
 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
+#include "list.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "res.h"
+#include "event.h"
 #include "fdlist.h"
 #include "s_bsd.h"
 #include "s_conf.h"
 #include "s_serv.h"
 #include "send.h"
 #include "memory.h"
+#include "s_log.h"
+#include "s_conf.h"
 
-
+static char *drones[DRONEMAX];
+static int droneidx = 0;
+static void drone_kline(char *ip);
 
 static char* months[] = {
   "January",   "February", "March",   "April",
@@ -120,5 +126,105 @@
   tmptr = localtime(&lclock);
   strftime(timebuffer, MAX_DATE_STRING, "%Y%m%d", tmptr);
   return timebuffer;
+}
+
+/*
+ * possible drones warning/kline, which havent set user->known flag
+ *                                               -demond
+ */
+void check_warn_drone(void *blah)
+{
+  struct Client *cptr;
+
+  for (cptr = GlobalClientList; cptr; cptr = cptr->next)
+    if (MyClient(cptr) && IsPerson(cptr))
+      if (cptr->user && !cptr->user->known)
+	    if (cptr->tsinfo + ConfigFileEntry.grace_time < CurrentTime) {
+          cptr->user->known = 1;
+          if (ConfigFileEntry.drone_kline) {
+            if (ConfigFileEntry.drone_batch) {
+              if (droneidx < DRONEMAX)
+                DupString(drones[droneidx++], cptr->localClient->sockhost);
+            } else
+              drone_kline(cptr->localClient->sockhost);
+          } else
+		    sendto_realops_flags(FLAGS_ALL, L_ALL, "\002WARNING!\002 -- %s (%s@%s) is a possible trojan drone",
+            					   cptr->name, cptr->username, cptr->host);
+	  }
+  eventAdd("check_warn_drone", check_warn_drone, NULL, CHECK_DRONE_TIME);
+}
+
+void check_drone_queue(void *blah)
+{
+    int i;
+
+    if (droneidx > ConfigFileEntry.drone_rate_max)
+        for (i=0; i < droneidx; i++)
+            drone_kline(drones[i]);
+
+    for (i=0; i < droneidx; i++)
+        MyFree(drones[i]);
+    droneidx = 0;
+
+    eventAdd("check_drone_queue", check_drone_queue, NULL, ConfigFileEntry.drone_rate_period);
+}
+
+static
+void drone_kline(char *ip)
+{
+  char buf[0x200];
+  struct ConfItem *aconf;
+
+  if (find_conf_name(&temporary_klines, ip, CONF_KILL))
+      return;
+
+  aconf = make_conf();
+  aconf->status = CONF_KILL;
+  DupString(aconf->host, ip);
+  DupString(aconf->user, "*");
+  aconf->port = 0;
+
+  ircsprintf(buf, "Temporary K-line %d min. - %s (%s)",
+      ConfigFileEntry.drone_kline_time/60,
+      ConfigFileEntry.drone_reason[0]?
+      ConfigFileEntry.drone_reason : "possible trojan drone",
+      smalldate(0));
+  DupString(aconf->passwd, buf);
+
+  aconf->hold = CurrentTime + ConfigFileEntry.drone_kline_time;
+
+  add_temp_kline(aconf);
+
+  sendto_realops_flags(FLAGS_ALL, L_ALL,
+     "<ircd> added temporary %d min. K-Line for [%s@%s] [%s]",
+     ConfigFileEntry.drone_kline_time/60,
+     aconf->user, aconf->host, "possible trojan drone");
+
+  ilog(L_TRACE, "<ircd> added temporary %d min. K-Line for [%s@%s] [%s]",
+     ConfigFileEntry.drone_kline_time/60,
+     aconf->user, aconf->host, "possible trojan drone");
+
+  check_klines();
+}
+
+void purge_repeats(void *blah)
+{
+  dlink_node *ptr, *rep, *next_ptr;
+
+  for (ptr = lclient_list.head; ptr; ptr = ptr->next) {
+    struct Client *cptr = ptr->data;
+
+    for (rep = cptr->user->repeat.head; rep; rep = next_ptr) {
+      struct Repeat *repeatptr = rep->data;
+      next_ptr = rep->next;
+      if (repeatptr->lastphrase + ConfigFileEntry.repeat_grace < CurrentTime) {
+        MyFree(repeatptr->text); MyFree(repeatptr);
+        dlinkDelete(rep, &cptr->user->repeat);
+        free_dlink_node(rep);
+      }
+    }
+  }
+
+  eventAdd("purge_repeats", purge_repeats, NULL, ConfigFileEntry.repeat_grace);
 }
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_serv.c ircd-hybrid-fuis/src/s_serv.c
--- ircd-hybrid-7.0rc9/src/s_serv.c	Sat Feb 15 11:32:46 2003
+++ ircd-hybrid-fuis/src/s_serv.c	Sun Apr 13 12:18:57 2003
@@ -72,6 +72,8 @@
 
 int MaxConnectionCount = 1;
 int MaxClientCount     = 1;
+int MaxIdentUsers      = 0;
+int CurrentIdentUsers  = 0;
 int refresh_user_links = 0;
 
 struct Client *uplink=NULL;
@@ -97,13 +99,13 @@
   { "IE",    CAP_IE },
   { "EOB",   CAP_EOB },
   { "KLN",   CAP_KLN },
-  { "GLN",   CAP_GLN },
   { "KNOCK", CAP_KNOCK },
   { "HOPS",  CAP_HOPS },
   { "HUB",   CAP_HUB },
   { "AOPS",  CAP_AOPS },
   { "UID",   CAP_UID },
   { "ZIP",   CAP_ZIP },
+  { "MASK",  CAP_HOSTMASK },
   { "TBURST", CAP_TBURST },
   { "PARA",  CAP_PARA },
   { 0,           0 }
@@ -818,21 +820,34 @@
   }
  
   if (HasID(target_p) && IsCapable(client_p, CAP_UID))
-	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 				 target_p->name,
 				 target_p->hopcount + 1,
 				 (unsigned long) target_p->tsinfo,
 				 ubuf,
 				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->user->id, target_p->info);
+				 target_p->user->server, target_p->user->id, 
+				 IsCapable(client_p, CAP_HOSTMASK)?
+				 target_p->realhost[0] ? target_p->realhost : "" : "",
+				 target_p->info);
   else
-	  sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
+	  sendto_one(client_p, "NICK %s %d %lu %s %s %s %s %s :%s",
 				 target_p->name, 
 				 target_p->hopcount + 1,
 				 (unsigned long) target_p->tsinfo,
 				 ubuf,
 				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->info);
+				 target_p->user->server,
+				 IsCapable(client_p, CAP_HOSTMASK) ?
+                 target_p->realhost[0] ? target_p->realhost : "" : "",
+                 target_p->info);
+
+  if (IsNSId(target_p))
+    sendto_one(client_p, "SERVID %s NS 1 %ld", target_p->name, target_p->ns_reg ? target_p->ns_reg : time(NULL));
+  if (IsOSId(target_p))
+    sendto_one(client_p, "SERVID %s OS 1", target_p->name);
+  if (IsNetKeeper(target_p))
+   sendto_one(client_p, "SERVID %s NK 1", target_p->name);
 }
 
 /*
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/src/s_user.c ircd-hybrid-fuis/src/s_user.c
--- ircd-hybrid-7.0rc9/src/s_user.c	Sun Feb 16 17:54:37 2003
+++ ircd-hybrid-fuis/src/s_user.c	Sun Apr 13 12:18:57 2003
@@ -55,7 +55,7 @@
 
 static int valid_hostname(const char* hostname);
 static int valid_username(const char* username);
-static void report_and_set_user_flags( struct Client *, struct ConfItem * );
+static void report_and_set_user_flags( struct Client *, struct ConfItem *, int );
 static int check_X_line(struct Client *client_p, struct Client *source_p);
 void user_welcome(struct Client *source_p);
 static int introduce_client(struct Client *client_p, struct Client *source_p,
@@ -86,11 +86,18 @@
   {FLAGS_OPER, 'o'},
   {FLAGS_REJ, 'r'},
   {FLAGS_SERVNOTICE, 's'},
+  {FLAGS_SILENCE, 'S'},
+  {FLAGS_NOLIST, 'X'},
+  {FLAGS_AVFH, 'h'},
   {FLAGS_UNAUTH, 'u'},
   {FLAGS_WALLOP, 'w'},
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
   {FLAGS_OPERWALL, 'z'},
+  {FLAGS_TRANSWIN, 'T'},
+  {FLAGS_TRANSISO, 'Y'},
+  {FLAGS_NODCC, 'D'},
+  {FLAGS_NOIDLE, 'I'},
   {0, 0}
 };
 
@@ -106,12 +113,12 @@
   0,            /* A */
   0,            /* B */
   0,            /* C */
-  0,            /* D */
+  FLAGS_NODCC,  /* D */
   0,            /* E */
   0,            /* F */
   0,            /* G */
   0,            /* H */
-  0,            /* I */
+  FLAGS_NOIDLE, /* I */
   0,            /* J */
   0,            /* K */
   0,            /* L */
@@ -121,13 +128,13 @@
   0,            /* P */
   0,            /* Q */
   0,            /* R */
-  0,            /* S */
-  0,            /* T */
+  FLAGS_SILENCE,/* S */
+  FLAGS_TRANSWIN,/* T */
   0,            /* U */
   0,            /* V */
   0,            /* W */
-  0,            /* X */
-  0,            /* Y */
+  FLAGS_NOLIST,/* X */
+  FLAGS_TRANSISO, /* Y */
   0,            /* Z 0x5A */
   0, 0, 0, 0, 0, /* 0x5F */ 
   /* 0x60 */       0,
@@ -138,7 +145,7 @@
   0,            /* e */
   FLAGS_FULL,   /* f */
   FLAGS_CALLERID,  /* g */
-  0,            /* h */
+  FLAGS_AVFH,   /* h */
   FLAGS_INVISIBLE, /* i */
   0,            /* j */
   FLAGS_SKILL,  /* k */
@@ -215,6 +222,9 @@
   sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, source_p->name,
              Count.total, Count.max_tot);
 
+  sendto_one(source_p, form_str(RPL_IDENTUSERS), me.name, source_p->name,
+             CurrentIdentUsers, MaxIdentUsers);
+
   if(!ConfigServerHide.hide_servers || IsOper(source_p))
     sendto_one(source_p, form_str(RPL_STATSCONN), me.name, source_p->name,
                MaxConnectionCount, MaxClientCount, Count.totalrestartcount);
@@ -284,7 +294,7 @@
   struct User*     user = source_p->user;
   char        tmpstr2[IRCD_BUFSIZE];
   char	      ipaddr[HOSTIPLEN];
-  int  status;
+  int  status, badpass = 0;
   dlink_node *ptr;
   dlink_node *m;
   char *id;
@@ -300,27 +310,26 @@
 
   if(ConfigFileEntry.ping_cookie)
   {
-    if(!IsPingSent(source_p) &&
-       source_p->localClient->random_ping == 0)
-    {
+  	if(!IsPingSent(source_p) &&
+	   source_p->localClient->random_ping == 0)
+  	{
       source_p->localClient->random_ping = (unsigned long)rand();
       sendto_one(source_p,
-		 "PING :%lu",
-		 (unsigned long)source_p->localClient->random_ping);
+	   "PING :%lu",
+	   (unsigned long)source_p->localClient->random_ping);
       SetPingSent(source_p);
-      return -1;
-    } 
-    if(!(source_p->flags2 & FLAGS2_PING_COOKIE))
-    {
-      return -1;
-    }
+  	  return -1;
+  	} 
+  	if(!(source_p->flags2 & FLAGS2_PING_COOKIE))
+  	{
+  	   return -1;
+  	}
   }
  
   user->last = CurrentTime;
   /* Straight up the maximum rate of flooding... */
   source_p->localClient->allow_read = MAX_FLOOD_BURST;
 
-
   if( ( status = check_client(client_p, source_p, username )) < 0 )
     return(CLIENT_EXITED);
 
@@ -340,6 +349,9 @@
     return(CLIENT_EXITED);
   }
 
+  if (IsConfWebChat(aconf))
+	strlcpy(source_p->host, source_p->realhost, sizeof(source_p->host));
+
   if (!IsGotId(source_p))
     {
       char *p;
@@ -373,17 +385,25 @@
   /* password check */
   if (!BadPtr(aconf->passwd) &&
       strcmp(source_p->localClient->passwd, aconf->passwd))
-  {
-    ServerStats->is_ref++;
-    sendto_one(source_p, form_str(ERR_PASSWDMISMATCH),
-               me.name, source_p->name);
-    exit_client(client_p, source_p, &me, "Bad Password");
-    return(CLIENT_EXITED);
-  }
+    {
+	  if (IsConfSkipOnPassFail(aconf)) {
+		if (IsConfDoSpoofIp(aconf))
+		  strcpy(source_p->host, source_p->realhost);
+		sendto_one(source_p, ":%s NOTICE %s :You've given a bad password, but I'll bypass you with your normal host.",
+				   me.name, source_p->name);
+		badpass = 1;
+	  } else {
+  	    ServerStats->is_ref++;
+  	    sendto_one(source_p, form_str(ERR_PASSWDMISMATCH),
+		   me.name, source_p->name);
+    	exit_client(client_p, source_p, &me, "Bad Password");
+    	return(CLIENT_EXITED);
+	  }
+    }
   memset(source_p->localClient->passwd,0, sizeof(source_p->localClient->passwd));
 
   /* report if user has &^>= etc. and set flags as needed in source_p */
-  report_and_set_user_flags(source_p, aconf);
+  report_and_set_user_flags(source_p, aconf, badpass);
   
   /* Limit clients */
   /*
@@ -495,6 +515,53 @@
     exit_client(client_p, source_p, &me, "Client exited");
     return CLIENT_EXITED;
   }
+
+  if (!IsConfDoSpoofIp(aconf))
+    strcpy(source_p->realhost, source_p->host);
+
+  /* mask the appropriate client host portion:
+   * - leftmost part if resolving host
+   *   (but not if just one dot in the host)
+   * - rightmost part if numeric IP
+   *                                   -demond
+   */
+  if (IsConfMaskHost(aconf) && ((badpass == 1 && IsConfDoSpoofIp(aconf)) || !IsConfDoSpoofIp(aconf)))
+    {
+      int alpha = 0, dots = 0;
+      char buf[HOSTLEN + 1];
+      char *p = source_p->host;
+      static char *get_mask(char *, int);
+
+      while (*p)
+	  {
+    	if (isalpha(*p)) alpha = 1;
+    	if (*p++ == '.') ++dots;
+  	  }
+
+      strcpy(buf, source_p->host);
+
+      if (alpha && (dots > 1))
+	  {
+    	p = strchr(buf, '.'); *p++ = 0;
+
+    	if (strlen(p) + MAXNETID + 6 <= HOSTLEN)
+        {
+          strcpy(source_p->host, get_mask(buf, 0));
+          strcat(source_p->host, p);
+        }
+  	  }
+      else if (!alpha)
+  	  {
+    	p = strrchr(buf, '.'); *p++ = 0;
+
+    	if (strlen(buf) + 7 <= HOSTLEN)
+        {
+          strcpy(source_p->host, buf);
+          strcat(source_p->host, get_mask(NULL, atoi(p)));
+        }
+  	  }
+    }
+
   user_welcome(source_p);
 
   return (introduce_client(client_p, source_p, user, nick));
@@ -634,22 +701,26 @@
     {
       if (IsCapable(uplink, CAP_UID) && HasID(source_p))
 	{
-	  sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	  sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 		     nick,
 		     source_p->hopcount+1,
 		     (unsigned long) source_p->tsinfo,
 		     ubuf,
-		     source_p->username, source_p->host, user->server,
-		     user->id, source_p->info);
+		     source_p->username, source_p->host, user->server, user->id,
+			 IsCapable(uplink, CAP_HOSTMASK)?
+			 source_p->realhost[0] ? source_p->realhost : "" : "",
+			 source_p->info);
 	}
       else
 	{
-	  sendto_one(uplink, "NICK %s %d %lu %s %s %s %s :%s",
+	  sendto_one(uplink, "NICK %s %d %lu %s %s %s %s %s :%s",
 		     nick,
 		     source_p->hopcount+1,
 		     (unsigned long) source_p->tsinfo,
 		     ubuf,
 		     source_p->username, source_p->host, user->server,
+			 IsCapable(uplink, CAP_HOSTMASK)?
+			 source_p->realhost[0] ? source_p->realhost : "" :"",
 		     source_p->info);
 	}
     }
@@ -661,22 +732,27 @@
 		  
 	  if (IsCapable(server, CAP_LL) || server == client_p)
 	    continue;
-		  
+  
 	  if (IsCapable(server, CAP_UID) && HasID(source_p))
-	    sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	    sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 		       nick,
 		       source_p->hopcount+1,
 		       (unsigned long) source_p->tsinfo,
 		       ubuf,
 		       source_p->username, source_p->host, user->server,
-		       user->id, source_p->info);
+		       user->id,
+	           IsCapable(server, CAP_HOSTMASK)?
+			   source_p->realhost[0] ? source_p->realhost : "" : "",
+	  		   source_p->info);
 	  else
-	    sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
+	    sendto_one(server, "NICK %s %d %lu %s %s %s %s %s :%s",
 		       nick,
 		       source_p->hopcount+1,
 		       (unsigned long) source_p->tsinfo,
 		       ubuf,
 		       source_p->username, source_p->host, user->server,
+	           IsCapable(server, CAP_HOSTMASK)?
+			   source_p->realhost[0] ? source_p->realhost : "":"",
 		       source_p->info);
 	}
     }
@@ -775,10 +851,10 @@
  */
 
 static void 
-report_and_set_user_flags(struct Client *source_p,struct ConfItem *aconf)
+report_and_set_user_flags(struct Client *source_p,struct ConfItem *aconf, int badpass)
 {
   /* If this user is being spoofed, tell them so */
-  if(IsConfDoSpoofIp(aconf))
+  if(IsConfDoSpoofIp(aconf) && badpass == 0)
     {
       sendto_one(source_p,
                  ":%s NOTICE %s :*** Spoofing your IP. congrats.",
@@ -790,17 +866,7 @@
     {
       SetExemptKline(source_p);
       sendto_one(source_p,
-         ":%s NOTICE %s :*** You are exempt from K/D/G lines. congrats.",
-                 me.name,source_p->name);
-    }
-  /* The else here is to make sure that G line exempt users
-   * do not get noticed twice.
-   */
-  else if (IsConfExemptGline(aconf))
-    {
-      SetExemptGline(source_p);
-      sendto_one(source_p,
-         ":%s NOTICE %s :*** You are exempt from G lines.",
+         ":%s NOTICE %s :*** You are exempt from K/D lines. congrats.",
                  me.name,source_p->name);
     }
 
@@ -843,6 +909,8 @@
 		  char* username, char *host, char *server, char *realname)
 {
   struct User* user;
+  char *hend = host + strlen(host) - 1;
+  char *send = server + strlen(server) - 1;
 
   assert(NULL != source_p);
   assert(source_p->username != username);
@@ -852,6 +920,12 @@
 
   user = make_user(source_p);
 
+  /* mIRC kludge here */
+  if (*host=='"' && *hend=='"' && *server=='"' && *send=='"')
+	user->known = 1;
+  else
+	user->known = IsUserPar(host, server);
+
   if (!IsUnknown(source_p))
     {
       sendto_one(source_p, form_str(ERR_ALREADYREGISTRED), me.name, nick);
@@ -874,8 +948,11 @@
       strlcpy(source_p->username, username, sizeof(source_p->username));
   }
 
+  /* fucking webchat _)_ */
+  strlcpy(source_p->realhost, host, sizeof(source_p->realhost));
+
   if (source_p->name[0])
-  { 
+  {
     /* NICK already received, now I have USER... */
     	return register_local_user(client_p, source_p, source_p->name, username);
   }
@@ -892,7 +969,7 @@
 int
 do_remote_user(char* nick, struct Client* client_p, struct Client* source_p,
 		   char* username, char *host, char *server, char *realname,
-		   char *id)
+		   char *realhost, char *id)
 {
   unsigned int oflags;
   struct User* user;
@@ -914,7 +991,11 @@
   strlcpy(source_p->info, realname, sizeof(source_p->info));
   if (id != NULL)
     strcpy(source_p->user->id, id);
-  
+  if (realhost)
+    strcpy(source_p->realhost, realhost);
+  else
+	strcpy(source_p->realhost, "<no_realhost_info>");
+
   return register_remote_user(client_p, source_p, source_p->name, username);
 }
 
@@ -1073,6 +1154,31 @@
           break;
         }
 
+  if (MyConnect(source_p) && !(setflags & FLAGS_SILENCE) && (HasSilence(source_p)))
+  {
+	sendto_one(source_p,":%s NOTICE %s :You have put Silence mode on your nickname (+S). You will NOT receive any private messages, ctcps, notices from unregistered (too recently registered) nicknames",
+			   me.name, parv[0]);
+  }
+
+  if (MyConnect(source_p) && (setflags & FLAGS_NODCC) && !(source_p->umodes & FLAGS_NODCC))
+  {
+	sendto_one(source_p,":%s NOTICE %s :You have removed your server protection flag. You can return it by typing /mode %s +D",
+			   me.name, parv[0], parv[0]);
+  }
+
+  if ((source_p->umodes & FLAGS_AVFH) && !IsOper(source_p))
+    {
+	  sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
+      source_p->umodes &= ~FLAGS_AVFH;
+    }
+
+  if (((source_p->umodes & FLAGS_WALLOP) || (source_p->umodes & FLAGS_OPERWALL))  && !IsOperOperwall(source_p))
+    {
+     sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
+      source_p->umodes &= ~FLAGS_WALLOP;
+      source_p->umodes &= ~FLAGS_OPERWALL;
+    }
+
   if(badflag)
     sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
 
@@ -1210,22 +1316,28 @@
   /* This is a duplicate of the NOTICE but see below...*/
   sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,
 	     get_listener_name(source_p->localClient->listener), ircd_version);
-  
-#if 0
+
+/*#if 0 by the way.. - FUIS*/
   /*
   ** Don't mess with this one - IRCII needs it! -Avalon
   */
-  /* No one has needed this in years, but I remember when IRCII did!
-   * It sure confused me why my IRCII client hung at start up
-   * when I was writing my first ircd from scratch. ;-)
-   * - Dianora
-   */
   sendto_one(source_p,
 	     "NOTICE %s :*** Your host is %s, running version %s",
 	     source_p->name, get_listener_name(source_p->localClient->listener),
 	     ircd_version);
-#endif
+/* #endif */
+
+  if (!irccmp(me.name, source_p->user->server) && ConfigFileEntry.silence_default)
+  {
+	SetSilence(source_p);
+	sendto_one(source_p,"NOTICE %s :%s (me) have put Silence mode on your nickname (+S), this is by default. You will NOT receive any private messages, ctcps, notices from unregistered (too recently registered) nicknames",
+			   source_p->name, me.name);
+  }
   
+  if (!ServicesOn)
+   sendto_one(source_p,
+     "NOTICE %s :*** Services are temporary down. Please be patient!", source_p->name);
+
   sendto_one(source_p, form_str(RPL_CREATED),me.name,source_p->name,creation);
   sendto_one(source_p, form_str(RPL_MYINFO), me.name, source_p->name,
 	     me.name, ircd_version);
@@ -1243,7 +1355,7 @@
       sendto_one(source_p,
 		 "NOTICE %s :*** Notice -- Please read the motd if you haven't read it",
 		 source_p->name);
-    
+
       sendto_one(source_p, form_str(RPL_MOTDSTART),
 		 me.name, source_p->name, me.name);
     
@@ -1331,7 +1443,7 @@
   int old = (source_p->umodes & ALL_UMODES);
   char *operprivs=NULL;
   dlink_node *ptr;
-  struct ConfItem *found_aconf;
+  struct ConfItem *found_aconf = NULL;
   dlink_node *m;
 
   SetOper(source_p);
@@ -1355,7 +1467,7 @@
           source_p->umodes |= (FLAGS_SERVNOTICE|FLAGS_OPERWALL|FLAGS_WALLOP|FLAGS_LOCOPS) & ALL_UMODES;
         }
     }
-	
+
   Count.oper++;
 
   SetExemptKline(source_p);
@@ -1380,8 +1492,9 @@
     source_p->umodes |= FLAGS_ADMIN;
 
   sendto_realops_flags(FLAGS_ALL, L_ALL,
-		       "%s (%s@%s) is now an operator", source_p->name,
-		       source_p->username, source_p->host);
+		       "%s (%s@%s) is now an operator. Using %s (%s@%s) O: line.",
+			   source_p->name, source_p->username, source_p->host, found_aconf ? found_aconf->name : "Unknown", found_aconf ? found_aconf->user : "Unknown", found_aconf ? found_aconf->host : "Unknown");
+
   send_umode_out(source_p, source_p, old);
   sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
   sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s", me.name,
@@ -1390,3 +1503,40 @@
   
   return(1);
 }
+
+static char *get_mask(char *s, int n)
+{
+  static char buf[MAXNETID + 6];
+  char *p = buf;
+  char *netid = ConfigFileEntry.netid[0]? ConfigFileEntry.netid : "FUIS";
+
+  if (s)
+  {
+    unsigned int h = 0;
+
+    while (*s)
+    {
+      h = (h << 4) - (h + (unsigned char)ToLower(*s++));
+    }
+
+    n = h & (U_MAX - 1);
+
+    strcpy(buf, netid);
+    p = buf + strlen(netid);
+  }
+  else
+    *p++ = '.';
+
+  srandom(n);
+
+  for (n = 0; n < 6; n++)
+    *p++ = '0' + random() % 10;
+
+  if (s)
+    *p++ = '.';
+
+  *p = 0;
+
+  return buf;
+}
+
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/tools/.cvsignore ircd-hybrid-fuis/tools/.cvsignore
--- ircd-hybrid-7.0rc9/tools/.cvsignore	Wed Apr 10 16:17:38 2002
+++ ircd-hybrid-fuis/tools/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,8 +0,0 @@
-Makefile
-mkpasswd
-viconf
-convertconf
-fixklines
-convertklines
-encspeed
-convertilines
\ No newline at end of file
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/tools/convertconf.c ircd-hybrid-fuis/tools/convertconf.c
--- ircd-hybrid-7.0rc9/tools/convertconf.c	Thu Jul 18 11:28:28 2002
+++ ircd-hybrid-fuis/tools/convertconf.c	Sun Feb 16 21:09:38 2003
@@ -797,14 +797,6 @@
 	{
 	  fprintf(out,"\tkline=no;\n");
 	}
-      else if(*privs == 'G')                /* allow gline */
-	{
-	  fprintf(out,"\tgline=yes;\n");
-	}
-      else if(*privs == 'g')                /* disallow gline */
-	{
-	  fprintf(out,"\tgline=no;\n");
-	}
       else if(*privs == 'H')                /* allow rehash */
 	{
 	  fprintf(out,"\trehash=yes;\n");
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/tools/convertilines.c ircd-hybrid-fuis/tools/convertilines.c
--- ircd-hybrid-7.0rc9/tools/convertilines.c	Tue Jul 16 18:30:21 2002
+++ ircd-hybrid-fuis/tools/convertilines.c	Sun Feb 16 21:09:38 2003
@@ -49,7 +49,6 @@
     int restricted;
     int exceed_limit;
     int kline_exempt;
-    int gline_exempt;
     int require_ident;
     int no_tilde;
 
@@ -419,9 +418,6 @@
     if(ptr->kline_exempt)
 	fprintf(out, "\tkline_exempt = yes;\n");
 
-    if(ptr->gline_exempt)
-	fprintf(out, "\tgline_exempt = yes;\n");
-
     if(ptr->no_tilde)
 	fprintf(out, "\tno_tilde = yes;\n");
 
@@ -507,7 +503,6 @@
        (ptr->require_ident == acptr->require_ident) &&
        (ptr->exceed_limit == acptr->exceed_limit) &&
        (ptr->kline_exempt == acptr->kline_exempt) &&
-       (ptr->gline_exempt == acptr->gline_exempt) &&
        (ptr->no_tilde == acptr->no_tilde))
     {
 	char *p1, *p2;
@@ -576,11 +571,6 @@
 
 	  case '>':
 	      ptr->exceed_limit = 1;
-	      ptr->special = 1;
-	      break;
-
-	  case '_':
-	      ptr->gline_exempt = 1;
 	      ptr->special = 1;
 	      break;
 
diff -uNrd -x doc -x help ircd-hybrid-7.0rc9/tools/rsa_respond/.cvsignore ircd-hybrid-fuis/tools/rsa_respond/.cvsignore
--- ircd-hybrid-7.0rc9/tools/rsa_respond/.cvsignore	Tue Jul  3 00:53:15 2001
+++ ircd-hybrid-fuis/tools/rsa_respond/.cvsignore	Wed Dec 31 19:00:00 1969
@@ -1,2 +0,0 @@
-genkey
-respond
