]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/createauthonly.c
Backed out changeset c04f6578869c
[irc/rqf/shadowircd.git] / extensions / createauthonly.c
index 4f7477ac1347f7b3575c184a36d95b4e3421b91c..87440b9e238976652c27720a09060579baa47da5 100644 (file)
@@ -1,11 +1,10 @@
 /*
  * This module restricts channel creation to authenticated users
- * only. This module could be useful for running private chat
- * systems, or if a network gets droneflood problems. It will
- * return ERR_NEEDREGGEDNICK on failure.
+ * and IRC operators only. This module could be useful for
+ * running private chat systems, or if a network gets droneflood
+ * problems. It will return ERR_NEEDREGGEDNICK on failure.
  *    -- nenolod
  *
- * $Id: createauthonly.c 833 2006-02-15 00:27:59Z jilles $
  */
 
 #include "stdinc.h"
@@ -32,6 +31,6 @@ h_can_create_channel_authenticated(hook_data_client_approval *data)
 {
        struct Client *source_p = data->client;
 
-       if (*source_p->user->suser == '\0')
+       if (*source_p->user->suser == '\0' && !IsOper(source_p))
                data->approved = ERR_NEEDREGGEDNICK;
 }