Author: beware
authorJochen Meesters <spike@undernet.org>
Sun, 22 Jun 2003 13:42:40 +0000 (13:42 +0000)
committerJochen Meesters <spike@undernet.org>
Sun, 22 Jun 2003 13:42:40 +0000 (13:42 +0000)
Log message: This adds FEAT_LOCAL_CHANNELS, which causes "CHANTYPES" isupport token to be "#&" or "#", and allows/disallows creation of &channels.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@953 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

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

index 4abcfb44827b4b502b52f9c859dbfbb2aef2d2d6..83d8e9d786068c11b37201708f946a691d5f3850 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-22  Bas Steendijk  <steendijk@xs4all.nl>
+
+        * 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  <steendijk@xs4all.nl>
 
        * include/ircd_features.h, ircd/channel.c, ircd/ircd_features.c,
index a35f8d949e5a7b4f7dd1ce9754059ae1bd213d4a..8212254a0afcdf51a5e1f996ff6b554b8075e3aa 100644 (file)
@@ -762,6 +762,7 @@ features
 # "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 024d4589464a23eec59b10cdf3e356de6670be11..429ff10441c0054ff3ef7af5cdb683ab0114ab97 100644 (file)
@@ -50,6 +50,7 @@ enum Feature {
   FEAT_AUTOHIDE,
   FEAT_CONNEXIT_NOTICES,
   FEAT_OPLEVELS,
+  FEAT_LOCAL_CHANNELS,
 
   /* features that probably should not be touched */
   FEAT_KILLCHASETIMELIMIT,
index 23eee8520de16e23fa10bd3e8c3ea94cad812da5..650cfdae442e9ed4534f0d1bc53441796b36cce0 100644 (file)
@@ -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 507e811e3acc8d0e3484642a03cdda569a40011e..45f6ab637e4820a2bd670170136f133412e7b685 100644 (file)
@@ -256,6 +256,7 @@ static struct FeatureDesc {
   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 d2bfcfecabce299f1d6b4503f1279bc1f82d306b..143a09081f32d6464668710a87d072c97f56ba5a 100644 (file)
@@ -229,6 +229,12 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     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)) {
       send_reply(sptr, ERR_TOOMANYCHANNELS, chptr ? chptr->chname : name);