diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/channel.h ircd-hybrid-6.0/include/channel.h
--- ircd-hybrid-6.0.orig/include/channel.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/channel.h	Sat Jun 30 01:50:38 2001
@@ -172,6 +172,7 @@
 #endif
 #define MODE_NOCOLOR    0x00010000  /* AGB */
 #define MODE_PERM       0x00020000
+#define MODE_ALLOWFORWARD 0x00040000
 #define MODE_FLAGS      0x0001ffff  /* was 0x1fff */
 
 #ifdef NEED_SPLITCODE
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/client.h ircd-hybrid-6.0/include/client.h
--- ircd-hybrid-6.0.orig/include/client.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/client.h	Sat Jun 30 01:50:38 2001
@@ -291,6 +291,8 @@
    */
   char              passwd[PASSWDLEN + 1];
   int               caps;       /* capabilities bit-field */
+  time_t            ping_send_time; /* When I last sent a ping */
+  time_t            ping_time;      /* ping RTT */
 };
 
 /*
@@ -415,6 +417,7 @@
 #define UMODE_SENDOPERWALL   46
 #define UMODE_SEEOPERPRIVS   47
 #define UMODE_SEEROUTING     48
+#define UMODE_EXPERIMENTAL   49
 
 /* *sigh* overflow flags */
 #define FLAGS2_RESTRICTED   0x0001      /* restricted client */
@@ -543,6 +546,7 @@
 #define CanGrantModes(x)        (TestBit((x)->umodes,UMODE_GRANT))
 #define CanSeeRouting(x)        (TestBit((x)->umodes,UMODE_SEEROUTING))
 #define CanKill(x)              (TestBit((x)->umodes,UMODE_KILL))
+#define CanDoExperimental(x)    (TestBit((x)->umodes,UMODE_EXPERIMENTAL))
 
 #define SeesAllConnections(x)	(TestBit((x)->umodes,UMODE_AUSPEX))
 #define IsIdentifiedNick(x)     (TestBit((x)->umodes,UMODE_IDENTIFIED))
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/config.h ircd-hybrid-6.0/include/config.h
--- ircd-hybrid-6.0.orig/include/config.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/config.h	Sat Jun 30 01:50:38 2001
@@ -499,18 +499,6 @@
  */
 #define ZIP_LEVEL       4
 
-/*
- * OPER_UMODES LOCOP_UMODES - set these to be the initial umodes when OPER'ing
- * These can be over-ridden in ircd.conf file, with flags in last O field
- */
-#define OPER_UMODES   (FLAGS_OPER|FLAGS_WALLOP|FLAGS_SERVNOTICE|FLAGS_OPERWALL|FLAGS_SKILL|FLAGS_BOTS)
-#define LOCOP_UMODES   (FLAGS_LOCOP|FLAGS_WALLOP|FLAGS_SERVNOTICE|FLAGS_OPERWALL|FLAGS_REJ|FLAGS_SKILL|FLAGS_BOTS|FLAGS_SPY)
-
-/* USE_USER_UMODES
- * This prevents non-opers from ever gaining any umodes not set in USER_UMODES
- */
-#define USE_USER_UMODES
-
 /* MAXIMUM LINKS - max links for class 0 if no Y: line configured
  *
  * This define is useful for leaf nodes and gateways. It keeps you from
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/irc_string.h ircd-hybrid-6.0/include/irc_string.h
--- ircd-hybrid-6.0.orig/include/irc_string.h	Sat Sep  2 04:42:08 2000
+++ ircd-hybrid-6.0/include/irc_string.h	Sat Jun 30 01:50:38 2001
@@ -76,6 +76,9 @@
 extern char*       strtoken(char** save, char* str, char* fs);
 extern void*       MyMalloc(size_t size);
 extern void*       MyRealloc(void* p, size_t size);
+
+extern char*       strip_colour(char*);
+
 /* MyFree is defined as a macro in ircd_defs.h */
 /* extern void MyFree(void* p); */
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/numeric.h ircd-hybrid-6.0/include/numeric.h
--- ircd-hybrid-6.0.orig/include/numeric.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/numeric.h	Sat Jun 30 01:50:38 2001
@@ -379,8 +379,11 @@
 #define ERR_MAXMAPNODES      512
 
 #define ERR_MAXFORWARDING    513
+#define ERR_NOFORWARDING     514
 
 #define ERR_BLOCKING_NOTID   505
+
+/* Strings */
 
 #define STR_BUGREPORT        001
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/patchlevel.h ircd-hybrid-6.0/include/patchlevel.h
--- ircd-hybrid-6.0.orig/include/patchlevel.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/patchlevel.h	Sat Jun 30 02:13:17 2001
@@ -17,5 +17,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL    "dancer-ircd-0.9.3.1"
+#define PATCHLEVEL    "dancer-ircd-0.9.3.2"
 #endif
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/serno.h ircd-hybrid-6.0/include/serno.h
--- ircd-hybrid-6.0.orig/include/serno.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/serno.h	Sat Jun 30 02:13:48 2001
@@ -1 +1 @@
-#define SERIALNUM "20010625_3"
+#define SERIALNUM "20010630_1"
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/umodes.h ircd-hybrid-6.0/include/umodes.h
--- ircd-hybrid-6.0.orig/include/umodes.h	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/include/umodes.h	Sat Jun 30 01:50:38 2001
@@ -76,6 +76,7 @@
   {UMODE_WALLOP, 'w'},
   {UMODE_SENDWALLOPS, 'W'},
   {UMODE_EXTERNAL, 'x'},
+  {UMODE_EXPERIMENTAL, 'X'},
   {UMODE_SPY, 'y'},
   {UMODE_OPERWALL, 'z'},
   {UMODE_SENDOPERWALL, 'Z'},
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/channel.c ircd-hybrid-6.0/src/channel.c
--- ircd-hybrid-6.0.orig/src/channel.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/channel.c	Sat Jun 30 01:50:38 2001
@@ -708,6 +708,8 @@
 #endif
   if (chptr->mode.mode & MODE_PERM)
     *mbuf++ = 'P';
+  if (chptr->mode.mode & MODE_ALLOWFORWARD)
+    *mbuf++ = 'F';
 #ifdef JUPE_CHANNEL
   if (chptr->mode.mode & MODE_JUPED)
     *mbuf++ = 'j';
@@ -718,6 +720,12 @@
       if (IsMember(cptr, chptr) || IsServer(cptr))
         ircsprintf(pbuf, "%d ", chptr->mode.limit);
     }
+  if (*chptr->mode.key)
+    {
+      *mbuf++ = 'k';
+      if (IsMember(cptr, chptr) || IsServer(cptr))
+        (void)strcat(pbuf, chptr->mode.key);
+    }
 #ifdef INVITE_CHANNEL_FORWARDING
   if (chptr->mode.mode & MODE_FORWARD) /* -goober */
     {
@@ -729,12 +737,6 @@
 	}
     }
 #endif
-  if (*chptr->mode.key)
-    {
-      *mbuf++ = 'k';
-      if (IsMember(cptr, chptr) || IsServer(cptr))
-        (void)strcat(pbuf, chptr->mode.key);
-    }
   *mbuf++ = '\0';
   return;
 }
@@ -1894,13 +1896,24 @@
 	  if ((fchname=banstr_get_channel(arg))) 
 	    {
 	      arg=banstr_remove_channel(arg);
-	      if (!ChannelExists(fchname))
+	      if (c == 'b')
 		{
-		  sendto_one(sptr, form_str(ERR_NOSUCHCHANNEL),
-			     me.name, sptr->name, "MODE +b redirection channel:");
-		  break;
+		  if (!(chptr->mode.mode & MODE_ALLOWFORWARD))
+		    {
+		      sendto_one(sptr, form_str(ERR_NOFORWARDING), me.name, sptr->name);
+		      break;
+		    }
+		  if (!ChannelExists(fchname))
+		    {
+		      sendto_one(sptr, form_str(ERR_NOSUCHCHANNEL),
+				 me.name, sptr->name, "MODE +b redirection channel:");
+		      break;
+		    }
+		  /* add test for CHANOPRIVSNEEDED in fchname here if needed */
 		}
-	      /* add test for CHANOPRIVSNEEDED in fchname here if needed */
+	      else
+		/* It's a quiet, not a ban */
+		fchname = NULL;
 	    }
 	  
 #endif
@@ -2408,6 +2421,13 @@
                 }
 
 	      arg = check_string(*parv++);
+
+	      if (!(chptr->mode.mode & MODE_ALLOWFORWARD))
+		{
+		  sendto_one(sptr, form_str(ERR_NOFORWARDING), me.name, sptr->name);
+		  break;
+		}
+
 	      tmp = strlen(arg);
 	      
 	      if (!ChannelExists(arg))
@@ -2478,7 +2498,7 @@
 	  if(whatt == MODE_QUERY)
 	    break;
 
-	  if(!IsSetOperGod(sptr))
+	  if(!CanDoExperimental(sptr))
 	    {
 	      if(MyClient(sptr))
 		sendto_one(sptr, form_str(ERR_NOPRIVILEGES),
@@ -2500,6 +2520,32 @@
 	    }
           break;
 
+	case 'F':
+	  if(whatt == MODE_QUERY)
+	    break;
+
+	  if(!CanDoExperimental(sptr))
+	    {
+	      if(MyClient(sptr))
+		sendto_one(sptr, form_str(ERR_NOPRIVILEGES),
+			   me.name, sptr->name);
+	      return;
+	    }
+	  
+	  if(whatt == MODE_ADD)
+	    {
+	      chptr->mode.mode |= MODE_ALLOWFORWARD;
+	      *mbufw++ = '+';
+	      *mbufw++ = 'F';
+	    }
+	  else
+	    {
+	      chptr->mode.mode &= ~MODE_ALLOWFORWARD;
+	      *mbufw++ = '-';
+	      *mbufw++ = 'F';
+	    }
+          break;
+
         default:
           if (whatt == MODE_QUERY)
             break;
@@ -3497,7 +3543,7 @@
       if (MyConnect(sptr) && (i = can_join(sptr, chptr, key, &flags)))
         {
 #ifdef INVITE_CHANNEL_FORWARDING
-	  if ((i==ERR_INVITEONLYCHAN) && (chptr->mode.mode & MODE_FORWARD))
+	  if ((i==ERR_INVITEONLYCHAN) && (chptr->mode.mode & MODE_FORWARD) && (chptr->mode.mode & MODE_ALLOWFORWARD))
 	    {
 	      attempt_channel_redirection(cptr,sptr,parc,parv,i,name,chptr,INVITE_FORWARD);
 	      continue;
@@ -3505,7 +3551,7 @@
 	  else
 #endif
 #ifdef BAN_CHANNEL_FORWARDING
-	    if (i==ERR_BANNEDFROMCHAN)
+	    if (i==ERR_BANNEDFROMCHAN && (chptr->mode.mode & MODE_ALLOWFORWARD))
 	    {
 	      attempt_channel_redirection(cptr,sptr,parc,parv,i,name,chptr,BAN_FORWARD);
 	      continue;
@@ -3712,28 +3758,10 @@
       if ((parc == 3) && parv[2])
 	{
 	  strcpy(buf, "\"");
-	  reason = buf + 1;
-	  for(i = 0; i < MAX_PART_LENGTH; i++)
-	    switch (parv[2][i])
-	      {
-	      case 3:
-		i++; /* skip the next character, since it's known junk */
-		if (isdigit(parv[2][i+1])) /* if the one after is a number, it's junk too */
-		  i++;
-		break;
-	      case 2: /* bold... */
-	      case 18: /* ...reverse video... */
-	      case 21: /* ...and underline */
-		break;
-	      case 0:
-		i = MAX_PART_LENGTH;
-		break;
-	      default:
-		*reason++ = parv[2][i];
-		break;
-	      }
-	  *reason++ = '"';
-	  *reason = '\0';
+	  if (strlen(parv[2]) > MAX_PART_LENGTH)
+	    parv[2][MAX_PART_LENGTH] = '\0';
+	  strcat(buf, strip_colour(parv[2]));
+	  strcat(buf, "\"");
 	}
 
       sendto_match_servs(chptr, cptr, PartFmt, parv[0], name, buf);
@@ -4704,6 +4732,9 @@
       case 'P':
 	mode.mode |= MODE_PERM;
 	break;
+      case 'F':
+	mode.mode |= MODE_ALLOWFORWARD;
+	break;
       case 'k':
         strncpy_irc(mode.key, parv[4 + args], KEYLEN);
         args++;
@@ -4934,6 +4965,15 @@
         }
       *mbuf++ = 'P';
     }
+  if((MODE_ALLOWFORWARD & mode.mode) && !(MODE_ALLOWFORWARD & oldmode->mode))
+    {
+      if (what != 1)
+        {
+          *mbuf++ = '+';
+          what = 1;
+        }
+      *mbuf++ = 'F';
+    }
   if((MODE_INVITEONLY & mode.mode) && !(MODE_INVITEONLY & oldmode->mode))
     {
       if (what != 1)
@@ -5024,6 +5064,15 @@
           what = -1;
         }
       *mbuf++ = 'P';
+    }
+  if((MODE_ALLOWFORWARD & oldmode->mode) && !(MODE_ALLOWFORWARD & mode.mode))
+    {
+      if (what != -1)
+        {
+          *mbuf++ = '-';
+          what = -1;
+        }
+      *mbuf++ = 'F';
     }
   if((MODE_INVITEONLY & oldmode->mode) && !(MODE_INVITEONLY & mode.mode))
     {
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/client.c ircd-hybrid-6.0/src/client.c
--- ircd-hybrid-6.0.orig/src/client.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/client.c	Sat Jun 30 01:50:38 2001
@@ -504,7 +504,7 @@
        * *sigh* I think not -Dianora
        */
 
-      if (ping < (currenttime - cptr->lasttime))
+      if (ping < (currenttime - cptr->ping_send_time))
         {
 
           /*
@@ -553,6 +553,8 @@
               cptr->flags |= FLAGS_PINGSENT;
               /* not nice but does the job */
               cptr->lasttime = currenttime - ping;
+	      /* does the job better -- asuffield */
+	      cptr->ping_send_time = currenttime;
               sendto_one(cptr, "PING :%s", me.name);
             }
         }
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/irc_string.c ircd-hybrid-6.0/src/irc_string.c
--- ircd-hybrid-6.0.orig/src/irc_string.c	Wed Aug  9 23:50:25 2000
+++ ircd-hybrid-6.0/src/irc_string.c	Sat Jun 30 01:50:38 2001
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <time.h>
+#include <ctype.h>
 
 /*
  * myctime - This is like standard ctime()-function, but it zaps away
@@ -121,6 +122,37 @@
     }
   *d = '\0';
   return dest;
+}
+
+char* strip_colour(char* string)
+{
+  char *c = string;
+  char *c2 = string;
+  /* c is source, c2 is target */
+  for (; c && *c; c++)
+    switch(*c)
+      {
+      case 3:
+	if (isdigit(c[1]))
+	  {
+	    c++;
+	    if (isdigit(c[1]))
+	      c++;
+	    if (c[1] == ','&& isdigit(c[2]))
+	      {
+		c+=2;
+		if (isdigit(c[1]))
+		  c++;
+	      }
+	  }
+	break;
+      case 2: case 6: case 7: case 22: case 27: case 31:
+	break;
+      default:
+	*c2++ = *c;
+      }
+  *c2 = '\0';
+  return string;
 }
 
 #if !defined( HAVE_STRTOKEN )
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_away.c ircd-hybrid-6.0/src/m_away.c
--- ircd-hybrid-6.0.orig/src/m_away.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/m_away.c	Sat Jun 30 01:50:38 2001
@@ -153,31 +153,7 @@
   if (strlen(awy2) > (size_t) TOPICLEN)
     awy2[TOPICLEN] = '\0';
 
-  /* Strip colour and other junk from the string */
-  {
-    int i;
-    char* new_away = awy2;
-    for(i = 0; (i < TOPICLEN) && awy2[i]; i++)
-      switch (awy2[i])
-	{
-	case 3:
-	  i++; /* skip the next character, since it's known junk */
-	  if (isdigit(awy2[i+1])) /* if the one after is a number, it's junk too */
-	    i++;
-	  break;
-	case 2: /* bold... */
-	case 18: /* ...reverse video... */
-	case 21: /* ...and underline */
-	  break;
-	case 0:
-	  i = TOPICLEN;
-	  break;
-	default:
-	  *new_away++ = awy2[i];
-	  break;
-	}
-    *new_away = '\0';
-  }
+  strip_colour(awy2);
 
 /* some lamers scripts continually do a /away, hence making a lot of
    unnecessary traffic. *sigh* so... as comstud has done, I've
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_map.c ircd-hybrid-6.0/src/m_map.c
--- ircd-hybrid-6.0.orig/src/m_map.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/m_map.c	Sat Jun 30 01:50:38 2001
@@ -52,7 +52,7 @@
     return; /* this should never happen, but let's be safe... */
 
   /* header should be formatted for us already */
-  sendto_one(sptr, form_str(RPL_MAP), me.name, sender_prefix, header, current->name);
+  sendto_one(sptr, form_str(RPL_MAP), me.name, sender_prefix, header, current->name, current->ping_time);
 
   /* Now, iterate over it's children */
   if (current->serv->servers)
@@ -120,7 +120,7 @@
 	  if (strcmp(conf->name, me.name) == 0)
 	    continue;
 	  if (!find_server(conf->name))
-	    sendto_one(sptr, form_str(RPL_MAP), me.name, parv[0], "** ", conf->name);
+	    sendto_one(sptr, form_str(RPL_MAP), me.name, parv[0], "** ", conf->name, -1);
 	}
       sendto_one(sptr,form_str(RPL_ENDOFMAP),me.name,parv[0]);
     }
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_message.c ircd-hybrid-6.0/src/m_message.c
--- ircd-hybrid-6.0.orig/src/m_message.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/m_message.c	Sat Jun 30 01:50:38 2001
@@ -38,7 +38,6 @@
 #include "s_user.h"
 
 #include <string.h>
-#include <ctype.h>
 
 /*
  * m_functions execute protocol messages on this server:
@@ -206,34 +205,7 @@
        * - Andre Guibert de Bruet <webdev@cheetah.properkernel.com>
        */
       if(chptr->mode.mode & MODE_NOCOLOR)
-	{
-	  char *c = parv[2];
-	  char *c2 = parv[2];
-	  /* c is source, c2 is target */
-	  for (; c && *c; c++)
-	    switch(*c)
-	      {
-	      case 3:
-		if (isdigit(c[1]))
-		  {
-		    c++;
-		    if (isdigit(c[1]))
-		      c++;
-		    if (c[1] == ','&& isdigit(c[2]))
-		      {
-			c+=2;
-			if (isdigit(c[1]))
-			  c++;
-		      }
-		  }
-		break;
-	      case 2: case 22: case 31:
-		break;
-	      default:
-		*c2++ = *c;
-	      }
-	  *c2 = '\0';
-	}
+	strip_colour(parv[2]);
 #endif /* NOCOLOUR_MODE */
 
       if (can_send(sptr, chptr) == 0)
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_pong.c ircd-hybrid-6.0/src/m_pong.c
--- ircd-hybrid-6.0.orig/src/m_pong.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/m_pong.c	Sat Jun 30 01:50:38 2001
@@ -114,6 +114,7 @@
 
   origin = parv[1];
   destination = parv[2];
+  cptr->ping_time = CurrentTime - cptr->ping_send_time;
   cptr->flags &= ~FLAGS_PINGSENT;
   sptr->flags &= ~FLAGS_PINGSENT;
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_quit.c ircd-hybrid-6.0/src/m_quit.c
--- ircd-hybrid-6.0.orig/src/m_quit.c	Sat Jun 30 02:14:45 2001
+++ ircd-hybrid-6.0/src/m_quit.c	Sat Jun 30 01:50:38 2001
@@ -29,6 +29,7 @@
 #include "s_serv.h"
 #include "send.h"
 #include "ctype.h"
+#include "irc_string.h"
 
 #include <string.h>
 
@@ -106,31 +107,13 @@
   int i;
 
   buf[0] = '\0';
+  if (strlen(parv[1]) > MAX_QUIT_LENGTH)
+    parv[1][MAX_QUIT_LENGTH] = '\0';
   if ((parc > 1) && parv[1])
     {
       strcpy(buf, "\"");
-      reason = buf + 1;
-      for(i = 0; i < MAX_QUIT_LENGTH; i++)
-	switch (parv[1][i])
-	  {
-	  case 3:
-	    i++; /* skip the next character, since it's known junk */
-	    if (isdigit(parv[1][i+1])) /* if the one after is a number, it's junk too */
-	      i++;
-	    break;
-	  case 2: /* bold... */
-	  case 18: /* ...reverse video... */
-	  case 21: /* ...and underline */
-	    break;
-	  case 0:
-	    i = MAX_QUIT_LENGTH;
-	    break;
-	  default:
-	    *reason++ = parv[1][i];
-	    break;
-	  }
-      *reason++ = '"';
-      *reason = '\0';
+      strcat(buf, strip_colour(parv[1]));
+      strcat(buf, "\"");
     }
   sptr->flags |= FLAGS_NORMALEX;
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/messages_cust.tab ircd-hybrid-6.0/src/messages_cust.tab
--- ircd-hybrid-6.0.orig/src/messages_cust.tab	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/messages_cust.tab	Sat Jun 30 01:50:38 2001
@@ -28,7 +28,7 @@
 /* 001  RPL_WELCOME, */ ":%s 001 %s :Welcome to the Internet Relay Network %s",
 /* 002  RPL_YOURHOST,*/ ":%s 002 %s :Your host is %s, running version %s",
 /* 003  RPL_CREATED, */ ":%s 003 %s :This server was cobbled together %s",
-/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxbmal biklmnopstved",
+/* 004  RPL_MYINFO, */ ":%s 004 %s %s %s oiwszcrkfydnxbmal bcfFiklmnopPqstved",
 /* 005 */       (char *)NULL,
 /* 006 */       (char *)NULL,
 /* 007 */       (char *)NULL,
@@ -417,7 +417,7 @@
 /* 374 RPL_ENDOFINFO, */        ":%s 374 %s :End of /INFO list.",
 /* 375 RPL_MOTDSTART, */        ":%s 375 %s :- %s Message of the Day - ",
 /* 376 RPL_ENDOFMOTD, */        ":%s 376 %s :End of /MOTD command.",
-/* 377 RPL_MAP, */              ":%s 377 %s %s%s",
+/* 377 RPL_MAP, */              ":%s 377 %s %s%s (ping %ds)",
 /* 378 RPL_ENDOFMAP */          ":%s 378 %s :End of /MAP list.",
 /* 379 RPL_FORWARD */           ":%s 379 %s :Forwarding from %s to %s",
 /* 380 */       (char *)NULL,
@@ -557,7 +557,8 @@
 /* 510 */       (char *)NULL,
 /* 511 ERR_SILELISTFULL, */ ":%s 511 %s :Your silence list is full" ,
 /* 512 ERR_MAXMAPNODES */  ":%s 512 %s :Maximum nodes for /MAP" ,
-/* 513 ERR_MAXFORWARDING */ ":%s 513 %s :Maximum forwarding reached"
+/* 513 ERR_MAXFORWARDING */ ":%s 513 %s :Maximum forwarding reached",
+/* 514 ERR_NOFORWARDING */ ":%s 514 %s :Forwarding has not been enabled on this channel",
 
 };
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/s_conf.c ircd-hybrid-6.0/src/s_conf.c
--- ircd-hybrid-6.0.orig/src/s_conf.c	Sat Jun 30 02:14:46 2001
+++ ircd-hybrid-6.0/src/s_conf.c	Sat Jun 30 01:50:38 2001
@@ -297,7 +297,7 @@
             if(IsSetOperAuspex(sptr))
               sendto_one(sptr, form_str(p->rpl_stats), me.name,
                          sptr->name, c,
-#ifdef SERVERHIDE
+#if 0
                          "255.255.255.255",
 #else
                          host,
@@ -309,7 +309,7 @@
             else
               sendto_one(sptr, form_str(p->rpl_stats), me.name,
                          sptr->name, c,
-                         "*@255.255.255.255",
+                         "255.255.255.255",
                          name,
                          port,
                          get_conf_class(tmp));
@@ -2509,8 +2509,75 @@
 		 (aconf->passwd)?(aconf->passwd):"NULL",
                  (aconf->user)?(aconf->user):"NULL",
 		 aconf->port));
-          aconf->next = ConfigItemList;
-          ConfigItemList = aconf;
+ 	  {
+	    /* Sort config items by user as we add them
+	     * This is fiendishly complex. The principle is to add after any other C/N lines with the same server
+	     * name, but otherwise go alphabetically with the other lines of the same type. This necessitates
+	     * skipping over any stray lines in a group after I match alphabetically.
+	     *  -- asuffield
+	     */
+	    struct ConfItem* aconf2;
+	    struct ConfItem* prev_aconf;
+	    aconf2 = ConfigItemList;
+	    prev_aconf = NULL;
+	    if (aconf->status & (CONF_CONNECT_SERVER | CONF_NOCONNECT_SERVER))
+	      {
+		u_int32_t other = (aconf->status == CONF_CONNECT_SERVER) ? CONF_NOCONNECT_SERVER : CONF_CONNECT_SERVER;
+
+		/* OK, is the partner C/N line to this one already inserted? If so, don't bother sorting, just shove it in */
+		for(aconf2 = ConfigItemList; aconf2 && !((aconf2->status == other) && (strcmp(aconf2->name, aconf->name) == 0));
+		    aconf2 = aconf2->next);
+
+		if (aconf2)
+		  {
+		    /* I have a partner in the list. Add after it. */
+		    aconf->next = aconf2->next;
+		    aconf2->next = aconf;
+		  }
+		else
+		  {
+		    /* OK, no other line with this name in the list. Find where I want to add it alphabetically */
+		    aconf2 = ConfigItemList;
+		    while(aconf2)
+		      {
+			if (aconf2->status == aconf->status)
+			  {
+			    if (strcmp(aconf2->name, aconf->name) > 0)
+			      break; /* Found target */
+
+			    prev_aconf = aconf2;
+			  }
+			aconf2 = aconf2->next;
+		      }
+		    if (prev_aconf)
+		      {
+			/* prev_aconf is the config item which should be previous to me, were I not looking at the other set
+			 * of config items at the same time */
+			/* Now, skip over any other lines in that last group of C/N lines, or else I break them up horribly */
+			aconf2 = prev_aconf->next;
+			while(aconf2 && !strcmp(prev_aconf->name, aconf2->name))
+			  {
+			    prev_aconf = aconf2;
+			    aconf2 = aconf2->next;
+			  }
+			aconf->next = prev_aconf->next;
+			prev_aconf->next = aconf;
+		      }
+		    else
+		      {
+			/* Didn't find *any* interesting lines, or else I'm the first interesting line */
+			aconf->next = ConfigItemList;
+			ConfigItemList = aconf;
+		      }
+		  }
+	      }
+	    else
+	      {
+		/* That's not a C/N line, so just shove it in any old where */
+		aconf->next = ConfigItemList;
+		ConfigItemList = aconf;
+	      }
+	  }
         }
       aconf = NULL;
     }
