13 static void h_can_join(hook_data_channel
*);
15 mapi_hfn_list_av1 adminonly_hfnlist
[] = {
16 { "can_join", (hookfn
) h_can_join
},
23 chmode_table
['A'].mode_type
= find_cflag_slot();
24 chmode_table
['A'].set_func
= chm_staff
;
26 construct_noparam_modes();
34 chmode_table
['A'].mode_type
= 0;
36 construct_noparam_modes();
39 DECLARE_MODULE_AV1(chm_adminonly
, _modinit
, _moddeinit
, NULL
, NULL
, adminonly_hfnlist
, "$Revision$");
42 h_can_join(hook_data_channel
*data
)
44 struct Client
*source_p
= data
->client
;
45 struct Channel
*chptr
= data
->chptr
;
47 if((chptr
->mode
.mode
& chmode_flags
['A']) && !IsAdmin(source_p
)) {
48 sendto_one_numeric(source_p
, 519, "%s :Cannot join channel (+A) - you are not an IRC server administrator", chptr
->chname
);
49 data
->approved
= ERR_CUSTOM
;