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.
20 static void h_can_create_channel_authenticated(hook_data_client_approval
*);
22 mapi_hfn_list_av1 restrict_hfnlist
[] = {
23 { "can_create_channel", (hookfn
) h_can_create_channel_authenticated
},
27 DECLARE_MODULE_AV1(createauthonly
, NULL
, NULL
, NULL
, NULL
, restrict_hfnlist
, "$Revision: 833 $");
30 h_can_create_channel_authenticated(hook_data_client_approval
*data
)
32 struct Client
*source_p
= data
->client
;
34 if (*source_p
->user
->suser
== '\0' && !IsOper(source_p
))
35 data
->approved
= ERR_NEEDREGGEDNICK
;