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
+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,
# "LOCOP_WIDE_GLINE" = "FALSE";
# "LOCOP_LIST_CHAN" = "FALSE";
# "OPLEVELS" = "TRUE";
+# "LOCAL_CHANNELS" = "TRUE";
};
# Well, you have now reached the end of this sample configuration
FEAT_AUTOHIDE,
FEAT_CONNEXIT_NOTICES,
FEAT_OPLEVELS,
+ FEAT_LOCAL_CHANNELS,
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
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 */
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),
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);