Author: beware
[ircu2.10.12-pk.git] / ircd / m_join.c
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);