Port some more extensions to AV2 and add descriptions

This commit is contained in:
Elizabeth Myers 2016-03-07 03:50:03 -06:00
parent 8699801ca2
commit 3fd3d7e176
5 changed files with 21 additions and 8 deletions

View file

@ -20,6 +20,8 @@
#include "privilege.h" #include "privilege.h"
#include "s_newconf.h" #include "s_newconf.h"
static const char nokill_desc[] = "Prevents operators from killing services";
static void block_services_kill(void *data); static void block_services_kill(void *data);
mapi_hfn_list_av1 no_kill_services_hfnlist[] = { mapi_hfn_list_av1 no_kill_services_hfnlist[] = {
@ -47,5 +49,5 @@ block_services_kill(void *vdata)
} }
} }
DECLARE_MODULE_AV1(no_kill_services, NULL, NULL, NULL, NULL, DECLARE_MODULE_AV2(no_kill_services, NULL, NULL, NULL, NULL,
no_kill_services_hfnlist, "Charybdis 3.4+"); no_kill_services_hfnlist, NULL, NULL, nokill_desc);

View file

@ -12,6 +12,8 @@
#include "s_conf.h" #include "s_conf.h"
#include "s_newconf.h" #include "s_newconf.h"
static const char no_locops_desc[] = "Disables local operators";
static void h_nl_umode_changed(hook_data_umode_changed *); static void h_nl_umode_changed(hook_data_umode_changed *);
mapi_hfn_list_av1 nl_hfnlist[] = { mapi_hfn_list_av1 nl_hfnlist[] = {
@ -19,7 +21,7 @@ mapi_hfn_list_av1 nl_hfnlist[] = {
{ NULL, NULL } { NULL, NULL }
}; };
DECLARE_MODULE_AV2(no_locops, NULL, NULL, NULL, NULL, nl_hfnlist, NULL, NULL, NULL); DECLARE_MODULE_AV2(no_locops, NULL, NULL, NULL, NULL, nl_hfnlist, NULL, NULL, no_locops_desc);
static void static void
h_nl_umode_changed(hook_data_umode_changed *hdata) h_nl_umode_changed(hook_data_umode_changed *hdata)

View file

@ -13,6 +13,9 @@
#include "s_conf.h" #include "s_conf.h"
#include "s_newconf.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 *); static void h_noi_umode_changed(hook_data_umode_changed *);
mapi_hfn_list_av1 noi_hfnlist[] = { mapi_hfn_list_av1 noi_hfnlist[] = {
@ -20,7 +23,7 @@ mapi_hfn_list_av1 noi_hfnlist[] = {
{ NULL, NULL } { NULL, NULL }
}; };
DECLARE_MODULE_AV2(no_oper_invis, NULL, NULL, NULL, NULL, noi_hfnlist, NULL, NULL, NULL); DECLARE_MODULE_AV2(no_oper_invis, NULL, NULL, NULL, NULL, noi_hfnlist, NULL, NULL, noi_desc);
static void static void
h_noi_umode_changed(hook_data_umode_changed *hdata) h_noi_umode_changed(hook_data_umode_changed *hdata)

View file

@ -22,6 +22,9 @@
#include "privilege.h" #include "privilege.h"
#include "s_newconf.h" #include "s_newconf.h"
static const char override_desc[] =
"Adds user mode +p, an operator-only user mode that grants temporary privileges to override anything";
static void check_umode_change(void *data); static void check_umode_change(void *data);
static void hack_channel_access(void *data); static void hack_channel_access(void *data);
static void hack_can_join(void *data); static void hack_can_join(void *data);
@ -277,5 +280,5 @@ _moddeinit(void)
rb_event_delete(expire_override_deadlines_ev); rb_event_delete(expire_override_deadlines_ev);
} }
DECLARE_MODULE_AV1(override, _modinit, _moddeinit, NULL, NULL, DECLARE_MODULE_AV2(override, _modinit, _moddeinit, NULL, NULL,
override_hfnlist, NULL); override_hfnlist, NULL, NULL, override_desc);

View file

@ -16,6 +16,9 @@
#include "privilege.h" #include "privilege.h"
#include "s_newconf.h" #include "s_newconf.h"
static const char restrict_desc[] =
"Restrict unautenticated users from doing anything as channel ops";
static void hack_channel_access(void *data); static void hack_channel_access(void *data);
mapi_hfn_list_av1 restrict_unauthenticated_hfnlist[] = { mapi_hfn_list_av1 restrict_unauthenticated_hfnlist[] = {
@ -35,5 +38,5 @@ hack_channel_access(void *vdata)
data->approved = 0; data->approved = 0;
} }
DECLARE_MODULE_AV1(restrict_unauthenticated, NULL, NULL, NULL, NULL, DECLARE_MODULE_AV2(restrict_unauthenticated, NULL, NULL, NULL, NULL,
restrict_unauthenticated_hfnlist, NULL); restrict_unauthenticated_hfnlist, NULL, NULL, restrict_desc);