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	Mon Jun 18 19:03:40 2001
+++ ircd-hybrid-6.0/include/config.h	Mon Jun 18 19:01:32 2001
@@ -294,6 +294,26 @@
  */
 #define WARN_NO_NLINE
 
+/* TIDY_PART
+ * This prefixes "Reason: " onto all part messages, and strips all colours
+ */
+#define TIDY_PART
+
+/* MAX_PART_LENGTH
+ * This is the maximum length of a PART reason
+ */
+#define MAX_PART_LENGTH 64
+
+/* TIDY_QUIT
+ * This prefixes "Reason: " onto all quit messages, and strips all colours
+ */
+#define TIDY_QUIT
+
+/* MAX_QUIT_LENGTH
+ * This is the maximum length of a QUIT reason
+ */
+#define MAX_QUIT_LENGTH MAX_PART_LENGTH
+
 /* CUSTOM_ERR - colorful notice/error/messages
  * Defining this will use custom notice/error/messages from
  * src/messages.tab instead of stock ones in src/messages_cust.tab
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	Mon Jun 18 19:03:41 2001
+++ ircd-hybrid-6.0/src/channel.c	Mon Jun 18 19:01:32 2001
@@ -46,6 +46,7 @@
 #include "numeric.h"
 #include "s_serv.h"       /* captab */
 #include "s_user.h"
+#include "s_log.h"
 #include "send.h"
 #include "struct.h"
 #include "whowas.h"
@@ -53,6 +54,7 @@
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
+#include <ctype.h>
 
 #ifdef NEED_SPLITCODE
 
@@ -3598,6 +3600,10 @@
 {
   struct Channel *chptr;
   char  *p, *name;
+#ifdef TIDY_PART
+  char *reason = buf;
+  int i;
+#endif
 
   if (parc < 2 || parv[1][0] == '\0')
     {
@@ -3670,10 +3676,45 @@
       /*
       **  Remove user from the old channel (if any)
       */
+
+      /* construct the reason string, if any */
+#ifdef TIDY_PART
+      buf[0] = '\0';
+      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';
+	}
+
+      sendto_match_servs(chptr, cptr, PartFmt, parv[0], name, buf);
             
+      sendto_channel_butserv(chptr, sptr, PartFmt, parv[0], name, buf);
+#else
       sendto_match_servs(chptr, cptr, PartFmt, parv[0], name, (parc == 3) ? parv[2] : "");
             
       sendto_channel_butserv(chptr, sptr, PartFmt, parv[0], name, (parc == 3) ? parv[2] : "");
+#endif
       remove_user_from_channel(sptr, chptr, 0);
       name = strtoken(&p, (char *)NULL, ",");
     }
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	Mon Jun 18 19:03:40 2001
+++ ircd-hybrid-6.0/src/m_quit.c	Mon Jun 18 19:01:32 2001
@@ -87,6 +87,8 @@
  *                      non-NULL pointers.
  */
 
+static char buf[BUFSIZE];
+
 /*
 ** m_quit
 **      parv[0] = sender prefix
@@ -96,6 +98,48 @@
                struct Client *sptr,
                int parc,
                char *parv[])
+#ifdef TIDY_QUIT
+{
+  char *reason;
+  int i;
+
+  buf[0] = '\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';
+    }
+  sptr->flags |= FLAGS_NORMALEX;
+
+#ifdef ANTI_SPAM_EXIT_MESSAGE
+  if( !IsServer(sptr) && MyConnect(sptr) &&
+     (sptr->firsttime + ANTI_SPAM_EXIT_MESSAGE_TIME) > CurrentTime)
+    strcpy(buf, "Client Quit");
+#endif
+  return IsServer(sptr) ? 0 : exit_client(cptr, sptr, sptr, buf);
+}
+#else /* TIDY_QUIT */
 {
   char *comment = (parc > 1 && parv[1]) ? parv[1] : cptr->name;
 
@@ -110,3 +154,4 @@
 #endif
   return IsServer(sptr) ? 0 : exit_client(cptr, sptr, sptr, comment);
 }
+#endif /* TIDY_QUIT */
