13 static void h_can_join(hook_data_channel
*);
14 static const char chm_operonly_desc
[] =
15 "Adds channel mode +O which makes a channel operator-only";
17 mapi_hfn_list_av1 operonly_hfnlist
[] = {
18 { "can_join", (hookfn
) h_can_join
},
22 static unsigned int mymode
;
27 mymode
= cflag_add('O', chm_staff
);
41 DECLARE_MODULE_AV2(chm_operonly
, _modinit
, _moddeinit
, NULL
, NULL
, operonly_hfnlist
, NULL
, NULL
, chm_operonly_desc
);
44 h_can_join(hook_data_channel
*data
)
46 struct Client
*source_p
= data
->client
;
47 struct Channel
*chptr
= data
->chptr
;
49 if((chptr
->mode
.mode
& mymode
) && !IsOper(source_p
)) {
50 sendto_one_numeric(source_p
, 520, "%s :Cannot join channel (+O) - you are not an IRC operator", chptr
->chname
);
51 data
->approved
= ERR_CUSTOM
;