]> jfr.im git - solanum.git/blobdiff - extensions/no_oper_invis.c
chmode: use NULL for priv argument when auspex:cmodes priv is not needed
[solanum.git] / extensions / no_oper_invis.c
index 6d7ec28759662ec078dbf3305a5aed239290f7bb..def1b01693efaab5544f8c5f723b605ed8680a8b 100644 (file)
@@ -2,8 +2,6 @@
  * Deny opers setting themselves +i unless they are bots (i.e. have
  * hidden_oper privilege).
  * -- jilles
- *
- * $Id: no_oper_invis.c 3215 2007-02-24 18:35:58Z jilles $
  */
 
 #include "stdinc.h"
@@ -15,6 +13,9 @@
 #include "s_conf.h"
 #include "s_newconf.h"
 
+static const char noi_desc[] =
+       "Disallow operators from setting user mode +i on themselves";
+
 static void h_noi_umode_changed(hook_data_umode_changed *);
 
 mapi_hfn_list_av1 noi_hfnlist[] = {
@@ -22,7 +23,7 @@ mapi_hfn_list_av1 noi_hfnlist[] = {
        { NULL, NULL }
 };
 
-DECLARE_MODULE_AV1(no_oper_invis, NULL, NULL, NULL, NULL, noi_hfnlist, "$Revision: 3215 $");
+DECLARE_MODULE_AV2(no_oper_invis, NULL, NULL, NULL, NULL, noi_hfnlist, NULL, NULL, noi_desc);
 
 static void
 h_noi_umode_changed(hook_data_umode_changed *hdata)
@@ -37,7 +38,5 @@ h_noi_umode_changed(hook_data_umode_changed *hdata)
                 * if they opered up while invisible -- jilles */
                if (hdata->oldumodes & UMODE_OPER)
                        sendto_one_notice(source_p, ":*** Opers may not set themselves invisible");
-               else /* XXX oper_up() should really do this */
-                       Count.invisi--;
        }
 }