X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c81afd158057056dae1436c4a24a64e1d4448e34..78825899cd6b68037fd1b3c6c77afb7d10c4774e:/extensions/createoperonly.c diff --git a/extensions/createoperonly.c b/extensions/createoperonly.c index ec92540a..50d996de 100644 --- a/extensions/createoperonly.c +++ b/extensions/createoperonly.c @@ -15,23 +15,26 @@ #include "s_conf.h" #include "snomask.h" #include "numeric.h" +#include "s_newconf.h" -static void h_can_create_channel_authenticated(hook_data_client_approval *); static const char restrict_desc[] = "Restricts channel creation to IRC operators"; +static void h_can_create_channel_authenticated(void *); + mapi_hfn_list_av1 restrict_hfnlist[] = { - { "can_create_channel", (hookfn) h_can_create_channel_authenticated }, + { "can_create_channel", h_can_create_channel_authenticated }, { NULL, NULL } }; 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) +h_can_create_channel_authenticated(void *data_) { + hook_data_client_approval *data = 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;