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	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/include/channel.h	Thu May 31 17:15:50 2001
@@ -141,35 +141,36 @@
 
 /* Channel related flags */
 
-#define CHFL_CHANOP     0x0001 /* Channel operator */
-#define CHFL_VOICE      0x0002 /* the power to speak */
-#define CHFL_DEOPPED    0x0004 /* deopped by us, modes need to be bounced */
-#define CHFL_BAN        0x0008 /* ban channel flag */
-#define CHFL_EXCEPTION  0x0010 /* exception to ban channel flag */
-#define CHFL_DENY       0x0020 /* regular expression deny flag */
-#define CHFL_INVEX      0x0040 /* invex channel flag */
+#define CHFL_CHANOP     0x00000001 /* Channel operator */
+#define CHFL_VOICE      0x00000002 /* the power to speak */
+#define CHFL_DEOPPED    0x00000004 /* deopped by us, modes need to be bounced */
+#define CHFL_BAN        0x00000008 /* ban channel flag */
+#define CHFL_EXCEPTION  0x00000010 /* exception to ban channel flag */
+#define CHFL_DENY       0x00000020 /* regular expression deny flag */
+#define CHFL_INVEX      0x00000040 /* invex channel flag */
 
 /* Channel Visibility macros */
 
 #define MODE_CHANOP     CHFL_CHANOP
 #define MODE_VOICE      CHFL_VOICE
 #define MODE_DEOPPED    CHFL_DEOPPED
-#define MODE_SECRET     0x0010
-#define MODE_MODERATED  0x0020
-#define MODE_TOPICLIMIT 0x0040
-#define MODE_INVITEONLY 0x0080
-#define MODE_NOPRIVMSGS 0x0100
-#define MODE_KEY        0x0200
-#define MODE_BAN        0x0400
-#define MODE_EXCEPTION  0x0800
-#define MODE_DENY       0x1000
-#define MODE_INVEX      0x2000
+#define MODE_SECRET     0x00000010
+#define MODE_MODERATED  0x00000020
+#define MODE_TOPICLIMIT 0x00000040
+#define MODE_INVITEONLY 0x00000080
+#define MODE_NOPRIVMSGS 0x00000100
+#define MODE_KEY        0x00000200
+#define MODE_BAN        0x00000400
+#define MODE_EXCEPTION  0x00000800
+#define MODE_DENY       0x00001000
+#define MODE_INVEX      0x00002000
 
-#define MODE_LIMIT      0x4000  /* was 0x1000 */
+#define MODE_LIMIT      0x00004000  /* was 0x1000 */
 #ifdef INVITE_CHANNEL_FORWARDING
-#define MODE_FORWARD    0x8000  /* -goober */
+#define MODE_FORWARD    0x00008000  /* -goober */
 #endif
-#define MODE_FLAGS      0x4fff  /* was 0x1fff */
+#define MODE_NOCOLOR    0x00010000  /* AGB */
+#define MODE_FLAGS      0x00004fff  /* was 0x1fff */
 
 #ifdef NEED_SPLITCODE
 
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	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/include/config.h	Thu May 31 17:19:39 2001
@@ -806,6 +806,11 @@
  */ 
 #undef USE_MAJORITY_GLINE
    
+/*
+ * Allow +c channel mode to block messages containing colour codes
+ */
+#define NOCOLOUR_MODE
+   
 /*   STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP  */
 
 /* You shouldn't change anything below this line, unless absolutely needed. */
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	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/include/numeric.h	Thu May 31 17:15:50 2001
@@ -302,6 +302,7 @@
 #define ERR_TOOMANYCHANNELS  405
 #define ERR_WASNOSUCHNICK    406
 #define ERR_TOOMANYTARGETS   407
+#define ERR_NOCOLORSTOCHAN   408
 #define ERR_NOORIGIN         409
 
 #define ERR_NORECIPIENT      411
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	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/src/channel.c	Thu May 31 17:25:02 2001
@@ -663,6 +663,10 @@
     *mbuf++ = 'i';
   if (chptr->mode.mode & MODE_NOPRIVMSGS)
     *mbuf++ = 'n';
+#ifdef NOCOLOUR_MODE
+  if (chptr->mode.mode & MODE_NOCOLOR)
+    *mbuf++ = 'c';
+#endif
 #ifdef JUPE_CHANNEL
   if (chptr->mode.mode & MODE_JUPED)
     *mbuf++ = 'j';
@@ -2295,6 +2299,34 @@
           break;
 #endif
 
+#ifdef NOCOLOUR_MODE
+	case 'c':  /* AGB */
+	  if(whatt == MODE_QUERY)
+	    break;
+	  
+	  if(!isok)
+	    {
+	      if(MyClient(sptr))
+		sendto_one(sptr, form_str(ERR_CHANOPRIVSNEEDED),
+			   me.name, sptr->name, chptr->chname);
+	      return;
+	    }
+	  
+	  if(whatt == MODE_ADD)
+	    {
+	      /* Trying to add c mode. */
+	      chptr->mode.mode |= MODE_NOCOLOR;
+	      *mbufw++ = '+';
+	      *mbufw++ = 'c';
+	    }
+	  else
+	    {
+	      chptr->mode.mode &= ~MODE_NOCOLOR;
+	      *mbufw++ = '-';
+	      *mbufw++ = 'c';
+	    }
+          break;
+#endif
         default:
           if (whatt == MODE_QUERY)
             break;
@@ -4433,6 +4465,11 @@
       case 't':
         mode.mode |= MODE_TOPICLIMIT;
         break;
+#ifdef NOCOLOUR_MODE
+      case 'c':
+	mode.mode |= MODE_NOCOLOR;
+	break;
+#endif
       case 'k':
         strncpy_irc(mode.key, parv[4 + args], KEYLEN);
         args++;
@@ -4643,6 +4680,17 @@
         }
       *mbuf++ = 't';
     }
+#ifdef NOCOLOUR_MODE
+  if((MODE_NOCOLOR & mode.mode) && !(MODE_NOCOLOR & oldmode->mode))
+    {
+      if (what != 1)
+        {
+          *mbuf++ = '+';
+          what = 1;
+        }
+      *mbuf++ = 'c';
+    }
+#endif
   if((MODE_INVITEONLY & mode.mode) && !(MODE_INVITEONLY & oldmode->mode))
     {
       if (what != 1)
@@ -4714,6 +4762,17 @@
         }
       *mbuf++ = 't';
     }
+#ifdef NOCOLOUR_MODE
+  if((MODE_NOCOLOR & oldmode->mode) && !(MODE_NOCOLOR & mode.mode))
+    {
+      if (what != -1)
+        {
+          *mbuf++ = '-';
+          what = -1;
+        }
+      *mbuf++ = 'c';
+    }
+#endif
   if((MODE_INVITEONLY & oldmode->mode) && !(MODE_INVITEONLY & mode.mode))
     {
       if (what != -1)
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	Thu May 31 17:25:26 2001
+++ ircd-hybrid-6.0/src/m_message.c	Thu May 31 17:24:01 2001
@@ -200,6 +200,20 @@
 #endif /* DEATHFLUD */
 #endif /* FLUD */
 
+#ifndef NOCOLOUR_MODE
+      /* 
+       * Channel color blocking. Usually set with the +c chanmode.
+       * - Andre Guibert de Bruet <webdev@cheetah.properkernel.com>
+       */
+      if(chptr->mode.mode & MODE_NOCOLOR)
+        if(strchr(parv[2], 3) && !IsAnOper(sptr))
+          { 
+            sendto_one(sptr, form_str(ERR_NOCOLORSTOCHAN),
+                       me.name, parv[0], nick);
+            return 0;
+          }
+#endif /* NOCOLOUR_MODE */
+
       if (can_send(sptr, chptr) == 0)
         sendto_channel_butone(cptr, sptr, chptr,
                               ":%s %s %s :%s",
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/messages.tab ircd-hybrid-6.0/src/messages.tab
--- ircd-hybrid-6.0.orig/src/messages.tab	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/src/messages.tab	Thu May 31 17:15:50 2001
@@ -448,7 +448,7 @@
 /* 406 ERR_WASNOSUCHNICK, */    ":%s 406 %s %s :There was no such nickname",
 /* 407 ERR_TOOMANYTARGETS, */
                 ":%s 407 %s %s :Too many recipients. Only %d processed",
-/* 408 */       (char *)NULL,
+/* 408 ERR_NOCOLORSTOCHAN, */   ":%s 408 %s %s :Cannot send colors to channel",
 /* 409 ERR_NOORIGIN, */         ":%s 409 %s :No origin specified",
 /* 410 */       (char *)NULL,
 /* 411 ERR_NORECIPIENT, */      ":%s 411 %s :No recipient given (%s)",
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	Thu May 31 17:25:27 2001
+++ ircd-hybrid-6.0/src/messages_cust.tab	Thu May 31 17:15:50 2001
@@ -449,7 +449,7 @@
 /* 406 ERR_WASNOSUCHNICK, */    ":%s 406 %s %s :There was no such nickname",
 /* 407 ERR_TOOMANYTARGETS, */
                 ":%s 407 %s %s :Too many recipients. Only %d processed",
-/* 408 */       (char *)NULL,
+/* 408 ERR_NOCOLORSTOCHAN, */   ":%s 408 %s %s :Cannot send colors to channel",
 /* 409 ERR_NOORIGIN, */         ":%s 409 %s :No origin specified",
 /* 410 */       (char *)NULL,
 /* 411 ERR_NORECIPIENT, */      ":%s 411 %s :No recipient given (%s)",
