2 * This module restricts channel creation to opered up users
3 * only. This module could be useful for running private chat
4 * systems, or if a network gets droneflood problems. It will
5 * return ERR_NEEDREGGEDNICK on failure.
19 static void h_can_create_channel_authenticated(hook_data_client_approval
*);
20 static const char restrict_desc
[] = "Restricts channel creation to IRC operators";
22 mapi_hfn_list_av1 restrict_hfnlist
[] = {
23 { "can_create_channel", (hookfn
) h_can_create_channel_authenticated
},
27 DECLARE_MODULE_AV2(createoperonly
, NULL
, NULL
, NULL
, NULL
, restrict_hfnlist
, NULL
, NULL
, restrict_desc
);
30 h_can_create_channel_authenticated(hook_data_client_approval
*data
)
32 struct Client
*source_p
= data
->client
;
34 if (!IsOper(source_p
))
36 sendto_one_notice(source_p
, ":*** Channel creation is restricted to network staff only.");
37 data
->approved
= ERR_NEEDREGGEDNICK
;