2 * This module restricts channel creation to authenticated users
3 * and IRC operators only. This module could be useful for
4 * running private chat systems, or if a network gets droneflood
5 * problems. It will return ERR_NEEDREGGEDNICK on failure.
18 #include "s_newconf.h"
20 static const char restrict_desc
[] = "Restricts channel creation to authenticated users and IRC operators only";
22 static void h_can_create_channel_authenticated(void *);
24 mapi_hfn_list_av1 restrict_hfnlist
[] = {
25 { "can_create_channel", h_can_create_channel_authenticated
},
29 DECLARE_MODULE_AV2(createauthonly
, NULL
, NULL
, NULL
, NULL
, restrict_hfnlist
, NULL
, NULL
, restrict_desc
);
32 h_can_create_channel_authenticated(void *data_
)
34 hook_data_client_approval
*data
= data_
;
35 struct Client
*source_p
= data
->client
;
37 if (*source_p
->user
->suser
== '\0' && !IsOperGeneral(source_p
))
38 data
->approved
= ERR_NEEDREGGEDNICK
;