]> jfr.im git - solanum.git/blobdiff - extensions/createauthonly.c
Replace most checks for +o with oper:general
[solanum.git] / extensions / createauthonly.c
index faf10e570321e4477334449007006fc368540211..78ad3da287bc4f80f93f8026e4590c54b11eb826 100644 (file)
@@ -4,8 +4,6 @@
  * 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"
@@ -17,6 +15,9 @@
 #include "s_conf.h"
 #include "snomask.h"
 #include "numeric.h"
+#include "s_newconf.h"
+
+static const char restrict_desc[] = "Restricts channel creation to authenticated users and IRC operators only";
 
 static void h_can_create_channel_authenticated(hook_data_client_approval *);
 
@@ -25,13 +26,13 @@ mapi_hfn_list_av1 restrict_hfnlist[] = {
        { NULL, NULL }
 };
 
-DECLARE_MODULE_AV1(createauthonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 833 $");
+DECLARE_MODULE_AV2(createauthonly, NULL, NULL, NULL, NULL, restrict_hfnlist, NULL, NULL, restrict_desc);
 
 static void
 h_can_create_channel_authenticated(hook_data_client_approval *data)
 {
        struct Client *source_p = data->client;
 
-       if (*source_p->user->suser == '\0' && !IsOper(source_p))
+       if (*source_p->user->suser == '\0' && !IsOperGeneral(source_p))
                data->approved = ERR_NEEDREGGEDNICK;
 }