2 * This module restricts channel creation to authenticated 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.
8 * $Id: createauthonly.c 833 2006-02-15 00:27:59Z jilles $
21 static void h_can_create_channel_authenticated(hook_data_client_approval
*);
23 mapi_hfn_list_av1 restrict_hfnlist
[] = {
24 { "can_create_channel", (hookfn
) h_can_create_channel_authenticated
},
28 DECLARE_MODULE_AV1(createauthonly
, NULL
, NULL
, NULL
, NULL
, restrict_hfnlist
, "$Revision: 833 $");
31 h_can_create_channel_authenticated(hook_data_client_approval
*data
)
33 struct Client
*source_p
= data
->client
;
35 if (*source_p
->user
->suser
== '\0')
36 data
->approved
= ERR_NEEDREGGEDNICK
;