13 static void h_can_join(hook_data_channel
*);
15 mapi_hfn_list_av1 operonly_hfnlist
[] = {
16 { "can_join", (hookfn
) h_can_join
},
20 static unsigned int mymode
;
22 /* This is a simple example of how to use dynamic channel modes.
23 * Not tested enough yet, use at own risk.
29 mymode
= cflag_add('O', chm_staff
);
43 DECLARE_MODULE_AV1(chm_operonly
, _modinit
, _moddeinit
, NULL
, NULL
, operonly_hfnlist
, "$Revision$");
46 h_can_join(hook_data_channel
*data
)
48 struct Client
*source_p
= data
->client
;
49 struct Channel
*chptr
= data
->chptr
;
51 if((chptr
->mode
.mode
& mymode
) && !IsOper(source_p
)) {
52 sendto_one_numeric(source_p
, 520, "%s :Cannot join channel (+O) - you are not an IRC operator", chptr
->chname
);
53 data
->approved
= ERR_CUSTOM
;