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 Jun 28 01:16:03 2001
+++ ircd-hybrid-6.0/include/channel.h	Wed Jun 27 23:47:47 2001
@@ -171,8 +171,8 @@
 #define MODE_FORWARD    0x00008000  /* -goober */
 #endif
 #define MODE_NOCOLOR    0x00010000  /* AGB */
-#define MODE_QUIET      0x00020000
-#define MODE_FLAGS      0x00004fff  /* was 0x1fff */
+#define MODE_PERM       0x00020000
+#define MODE_FLAGS      0x0001ffff  /* was 0x1fff */
 
 #ifdef NEED_SPLITCODE
 
@@ -191,7 +191,7 @@
 #endif /* NEED_SPLITCODE */
 
 #ifdef JUPE_CHANNEL
-#define MODE_JUPED      0x4000
+#define MODE_JUPED      0x40000
 #endif
 
 /*
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 Jun 28 01:16:05 2001
+++ ircd-hybrid-6.0/include/config.h	Thu Jun 28 01:14:12 2001
@@ -1013,7 +1013,7 @@
 /* JUPE_CHANNEL - jupes a channel from being joined on this server only
  * if added to Q lines e.g. Q:\#packet_channel:Tired of packets
  */
-#define JUPE_CHANNEL
+#undef JUPE_CHANNEL
 
 /* 
  * ANTI_SPAMBOT
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/ircd_defs.h ircd-hybrid-6.0/include/ircd_defs.h
--- ircd-hybrid-6.0.orig/include/ircd_defs.h	Thu Jun 28 01:16:05 2001
+++ ircd-hybrid-6.0/include/ircd_defs.h	Wed Jun 27 23:59:27 2001
@@ -48,7 +48,8 @@
 #define KEYLEN          23
 #define BUFSIZE         512     /* WARNING: *DONT* CHANGE THIS!!!! */
 #define MAXRECIPIENTS   20
-#define MAXBANS         300     /* bans + exceptions together */
+#define MAXBANS         50      /* bans + exceptions together */
+#define MAXBANS_PERM    500     /* bans + exceptions together */
 #define MAXBANLENGTH    1024
 #define MAXSILES        50
 #define MAXSILELENGTH   128
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 Jun 28 01:16:04 2001
+++ ircd-hybrid-6.0/src/channel.c	Thu Jun 28 01:12:02 2001
@@ -192,7 +192,7 @@
 #endif
 
   /* dont let local clients overflow the banlist */
-  if ((!IsServer(cptr)) && (chptr->num_bed >= MAXBANS))
+  if ((!IsServer(cptr)) && (chptr->num_bed >= ((chptr->mode.mode & MODE_PERM) ? MAXBANS_PERM : MAXBANS)))
           if (MyClient(cptr))
             {
               sendto_one(cptr, form_str(ERR_BANLISTFULL),
@@ -706,6 +706,8 @@
   if (chptr->mode.mode & MODE_NOCOLOR)
     *mbuf++ = 'c';
 #endif
+  if (chptr->mode.mode & MODE_PERM)
+    *mbuf++ = 'P';
 #ifdef JUPE_CHANNEL
   if (chptr->mode.mode & MODE_JUPED)
     *mbuf++ = 'j';
@@ -2471,6 +2473,33 @@
 	    }
           break;
 #endif
+
+	case 'P':
+	  if(whatt == MODE_QUERY)
+	    break;
+
+	  if(!IsSetOperGod(sptr))
+	    {
+	      if(MyClient(sptr))
+		sendto_one(sptr, form_str(ERR_NOPRIVILEGES),
+			   me.name, sptr->name);
+	      return;
+	    }
+	  
+	  if(whatt == MODE_ADD)
+	    {
+	      chptr->mode.mode |= MODE_PERM;
+	      *mbufw++ = '+';
+	      *mbufw++ = 'P';
+	    }
+	  else
+	    {
+	      chptr->mode.mode &= ~MODE_PERM;
+	      *mbufw++ = '-';
+	      *mbufw++ = 'P';
+	    }
+          break;
+
         default:
           if (whatt == MODE_QUERY)
             break;
@@ -2713,6 +2742,10 @@
                          * It should never happen but...
                          */
 
+      if (chptr->mode.mode & MODE_PERM)
+	/* This is a permanent channel. Do not delete it. */
+	return;
+
 #if defined(PRESERVE_CHANNEL_ON_SPLIT) || defined(NO_JOIN_ON_SPLIT)
       if(server_was_split)
         {
@@ -4668,6 +4701,9 @@
 	mode.mode |= MODE_NOCOLOR;
 	break;
 #endif
+      case 'P':
+	mode.mode |= MODE_PERM;
+	break;
       case 'k':
         strncpy_irc(mode.key, parv[4 + args], KEYLEN);
         args++;
@@ -4889,6 +4925,15 @@
       *mbuf++ = 'c';
     }
 #endif
+  if((MODE_PERM & mode.mode) && !(MODE_PERM & oldmode->mode))
+    {
+      if (what != 1)
+        {
+          *mbuf++ = '+';
+          what = 1;
+        }
+      *mbuf++ = 'P';
+    }
   if((MODE_INVITEONLY & mode.mode) && !(MODE_INVITEONLY & oldmode->mode))
     {
       if (what != 1)
@@ -4971,6 +5016,15 @@
       *mbuf++ = 'c';
     }
 #endif
+  if((MODE_PERM & oldmode->mode) && !(MODE_PERM & mode.mode))
+    {
+      if (what != -1)
+        {
+          *mbuf++ = '-';
+          what = -1;
+        }
+      *mbuf++ = 'P';
+    }
   if((MODE_INVITEONLY & oldmode->mode) && !(MODE_INVITEONLY & mode.mode))
     {
       if (what != -1)
