]> jfr.im git - solanum.git/blobdiff - extensions/chm_operpeace.c
Remove Windows support
[solanum.git] / extensions / chm_operpeace.c
index aaa40dc843bd5532376f8d0063c50cbaaf2fafbc..f0d1afaacc7674314f556271b77246d2609d89f7 100644 (file)
@@ -18,6 +18,9 @@
 #include "s_newconf.h"
 #include "chmode.h"
 
+static const char chm_operpeace_desc[] =
+       "Adds channel mode +M which prohibits operators from being kicked";
+
 static void hdl_can_kick(hook_data_channel_approval *);
 
 mapi_hfn_list_av1 chm_operpeace_hfnlist[] = {
@@ -43,7 +46,7 @@ _moddeinit(void)
        cflag_orphan('M');
 }
 
-DECLARE_MODULE_AV1(chm_operpeace, _modinit, _moddeinit, NULL, NULL, chm_operpeace_hfnlist, "$Revision$");
+DECLARE_MODULE_AV2(chm_operpeace, _modinit, _moddeinit, NULL, NULL, chm_operpeace_hfnlist, NULL, NULL, chm_operpeace_desc);
 
 static void
 hdl_can_kick(hook_data_channel_approval *data)
@@ -55,7 +58,7 @@ hdl_can_kick(hook_data_channel_approval *data)
        if(IsOper(source_p))
                return;
 
-       if((chptr->mode.mode & mymode) && IsOper(who))
+       if((chptr->mode.mode & mymode) && HasPrivilege(who, "oper:receive_immunity"))
        {
                sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s attempted to kick %s from %s (which is +M)",
                        source_p->name, who->name, chptr->chname);