]> jfr.im git - solanum.git/blobdiff - extensions/createoperonly.c
Merge pull request #288 from edk0/umode-o-split
[solanum.git] / extensions / createoperonly.c
index 6e063386cee73f1560034e361b59276d8e2ded7a..fb004783d14bf8f1760b401f506d76cf924fb4f4 100644 (file)
@@ -4,8 +4,6 @@
  * systems, or if a network gets droneflood problems. It will
  * return ERR_NEEDREGGEDNICK on failure.
  *    -- nenolod
- *
- * $Id: createoperonly.c 3476 2007-05-24 04:28:36Z nenolod $
  */
 
 #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 IRC operators";
 
 static void h_can_create_channel_authenticated(hook_data_client_approval *);
 
@@ -25,14 +26,14 @@ mapi_hfn_list_av1 restrict_hfnlist[] = {
        { NULL, NULL }
 };
 
-DECLARE_MODULE_AV1(createoperonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 3476 $");
+DECLARE_MODULE_AV2(createoperonly, 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 (!IsOper(source_p))
+       if (!IsOperGeneral(source_p))
        {
                sendto_one_notice(source_p, ":*** Channel creation is restricted to network staff only.");
                data->approved = ERR_NEEDREGGEDNICK;