13 static void h_can_join(hook_data_channel
*);
15 mapi_hfn_list_av1 adminonly_hfnlist
[] = {
16 { "can_join", (hookfn
) h_can_join
},
20 static unsigned int mymode
;
25 mymode
= cflag_add('A', chm_staff
);
38 DECLARE_MODULE_AV1(chm_adminonly
, _modinit
, _moddeinit
, NULL
, NULL
, adminonly_hfnlist
, "$Revision$");
41 h_can_join(hook_data_channel
*data
)
43 struct Client
*source_p
= data
->client
;
44 struct Channel
*chptr
= data
->chptr
;
46 if((chptr
->mode
.mode
& mymode
) && !IsAdmin(source_p
)) {
47 sendto_one_numeric(source_p
, 519, "%s :Cannot join channel (+A) - you are not an IRC server administrator", chptr
->chname
);
48 data
->approved
= ERR_CUSTOM
;