CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2003-06-22 13:42:50 UTC

Modified files:
     ChangeLog doc/example.conf include/ircd_features.h
     include/supported.h ircd/ircd_features.c ircd/m_join.c

Log message:

Author: beware
Log message: This adds FEAT_LOCAL_CHANNELS, which causes "CHANTYPES" isupport token to 
be "#&" or "#", and allows/disallows creation of &channels.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.381 ircu2.10/ChangeLog:1.382
--- ircu2.10/ChangeLog:1.381    Sun Jun 22 06:22:37 2003
+++ ircu2.10/ChangeLog  Sun Jun 22 06:42:39 2003
@@ -1,5 +1,11 @@
 2003-06-22  Bas Steendijk  <[EMAIL PROTECTED]>
 
+        * include/ircd_features.h, include/supported.h, ircd/ircd_features.c,
+       ircd/ircd_features.c, ircu2.10/ircd/m_join.c, doc/example.conf: 
+       Make ability to create local channels a feature which can be disabled.
+
+2003-06-22  Bas Steendijk  <[EMAIL PROTECTED]>
+
        * include/ircd_features.h, ircd/channel.c, ircd/ircd_features.c,
        ircd/m_kick.c, doc/example.conf: Added OPLEVELS feature, which
        makes it possible to disable the +Au/oplevels functions.
Index: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.21 ircu2.10/doc/example.conf:1.22
--- ircu2.10/doc/example.conf:1.21      Sun Jun 22 06:22:37 2003
+++ ircu2.10/doc/example.conf   Sun Jun 22 06:42:39 2003
@@ -762,6 +762,7 @@
 # "LOCOP_WIDE_GLINE" = "FALSE";
 # "LOCOP_LIST_CHAN" = "FALSE";
 # "OPLEVELS" = "TRUE";
+# "LOCAL_CHANNELS" = "TRUE";
 };
 
 # Well, you have now reached the end of this sample configuration
Index: ircu2.10/include/ircd_features.h
diff -u ircu2.10/include/ircd_features.h:1.17 ircu2.10/include/ircd_features.h:1.18
--- ircu2.10/include/ircd_features.h:1.17       Sun Jun 22 06:22:38 2003
+++ ircu2.10/include/ircd_features.h    Sun Jun 22 06:42:40 2003
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_features.h,v 1.17 2003/06/22 13:22:38 denspike Exp $
+ * $Id: ircd_features.h,v 1.18 2003/06/22 13:42:40 denspike Exp $
  */
 
 struct Client;
@@ -50,6 +50,7 @@
   FEAT_AUTOHIDE,
   FEAT_CONNEXIT_NOTICES,
   FEAT_OPLEVELS,
+  FEAT_LOCAL_CHANNELS,
 
   /* features that probably should not be touched */
   FEAT_KILLCHASETIMELIMIT,
Index: ircu2.10/include/supported.h
diff -u ircu2.10/include/supported.h:1.12 ircu2.10/include/supported.h:1.13
--- ircu2.10/include/supported.h:1.12   Tue Jan  7 02:06:43 2003
+++ ircu2.10/include/supported.h        Sun Jun 22 06:42:40 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: supported.h,v 1.12 2003/01/07 10:06:43 a1kmm Exp $
+ * $Id: supported.h,v 1.13 2003/06/22 13:42:40 denspike Exp $
  *
  * Description: This file has the featureset that ircu announces on connecting
  *              a client.  It's in this .h because it's likely to be appended
@@ -58,7 +58,7 @@
                        feature_int(FEAT_MAXBANS), NICKLEN, TOPICLEN, \
                        AWAYLEN, TOPICLEN
 
-#define FEATURESVALUES2 "#&", "(ov)@+", "b,k,l,imnpstr", "rfc1459", \
+#define FEATURESVALUES2 feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", 
"b,k,l,imnpstr", "rfc1459", \
                         feature_str(FEAT_NETWORK)
 
 #endif /* INCLUDED_supported_h */
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.23 ircu2.10/ircd/ircd_features.c:1.24
--- ircu2.10/ircd/ircd_features.c:1.23  Sun Jun 22 06:22:38 2003
+++ ircu2.10/ircd/ircd_features.c       Sun Jun 22 06:42:40 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_features.c,v 1.23 2003/06/22 13:22:38 denspike Exp $
+ * $Id: ircd_features.c,v 1.24 2003/06/22 13:42:40 denspike Exp $
  */
 #include "config.h"
 
@@ -256,6 +256,7 @@
   F_B(AUTOHIDE, 0, 1, 0),
   F_B(CONNEXIT_NOTICES, 0, 0, 0),
   F_B(OPLEVELS, 0, 1, 0),
+  F_B(LOCAL_CHANNELS, 0, 1, 0),
 
   /* features that probably should not be touched */
   F_I(KILLCHASETIMELIMIT, 0, 30, 0),
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.22 ircu2.10/ircd/m_join.c:1.23
--- ircu2.10/ircd/m_join.c:1.22 Tue Jan  7 02:06:41 2003
+++ ircu2.10/ircd/m_join.c      Sun Jun 22 06:42:40 2003
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_join.c,v 1.22 2003/01/07 10:06:41 a1kmm Exp $
+ * $Id: m_join.c,v 1.23 2003/06/22 13:42:40 denspike Exp $
  */
 
 /*
@@ -228,6 +228,12 @@
     }
     else
       flags = CHFL_CHANOP;
+
+    /* disallow creating local channels */
+    if ((name[0] == '&') && !chptr && !feature_bool(FEAT_LOCAL_CHANNELS)) {
+        send_reply(sptr, ERR_NOSUCHCHANNEL, name);
+        continue;
+    }
 
     if (cli_user(sptr)->joined >= feature_int(FEAT_MAXCHANNELSPERUSER) &&
        !HasPriv(sptr, PRIV_CHAN_LIMIT)) {
----------------------- End of diff -----------------------

Reply via email to