2 * Do not allow operators to be kicked from +M channels.
17 #include "privilege.h"
18 #include "s_newconf.h"
21 static void hdl_can_kick(hook_data_channel_approval
*);
23 mapi_hfn_list_av1 chm_operpeace_hfnlist
[] = {
24 { "can_kick", (hookfn
) hdl_can_kick
},
28 static unsigned int mymode
;
33 mymode
= cflag_add('M', chm_hidden
);
46 DECLARE_MODULE_AV1(chm_operpeace
, _modinit
, _moddeinit
, NULL
, NULL
, chm_operpeace_hfnlist
, "$Revision$");
49 hdl_can_kick(hook_data_channel_approval
*data
)
51 struct Client
*source_p
= data
->client
;
52 struct Client
*who
= data
->target
;
53 struct Channel
*chptr
= data
->chptr
;
58 if((chptr
->mode
.mode
& mymode
) && IsOper(who
))
60 sendto_realops_snomask(SNO_GENERAL
, L_NETWIDE
, "%s attempted to kick %s from %s (which is +M)",
61 source_p
->name
, who
->name
, chptr
->chname
);
62 sendto_one_numeric(source_p
, ERR_ISCHANSERVICE
, "%s %s :Cannot kick IRC operators from that channel.",
63 who
->name
, chptr
->chname
);