From 3fd3d7e1761f37e125e652daeaae4c32cf1c2266 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Mon, 7 Mar 2016 03:50:03 -0600 Subject: [PATCH] Port some more extensions to AV2 and add descriptions --- extensions/no_kill_services.c | 6 ++++-- extensions/no_locops.c | 4 +++- extensions/no_oper_invis.c | 5 ++++- extensions/override.c | 7 +++++-- extensions/restrict-unauthenticated.c | 7 +++++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/extensions/no_kill_services.c b/extensions/no_kill_services.c index c1e6ad90..15f6365c 100644 --- a/extensions/no_kill_services.c +++ b/extensions/no_kill_services.c @@ -20,6 +20,8 @@ #include "privilege.h" #include "s_newconf.h" +static const char nokill_desc[] = "Prevents operators from killing services"; + static void block_services_kill(void *data); 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, - no_kill_services_hfnlist, "Charybdis 3.4+"); +DECLARE_MODULE_AV2(no_kill_services, NULL, NULL, NULL, NULL, + no_kill_services_hfnlist, NULL, NULL, nokill_desc); diff --git a/extensions/no_locops.c b/extensions/no_locops.c index e8635044..7fc7d1b6 100644 --- a/extensions/no_locops.c +++ b/extensions/no_locops.c @@ -12,6 +12,8 @@ #include "s_conf.h" #include "s_newconf.h" +static const char no_locops_desc[] = "Disables local operators"; + static void h_nl_umode_changed(hook_data_umode_changed *); mapi_hfn_list_av1 nl_hfnlist[] = { @@ -19,7 +21,7 @@ mapi_hfn_list_av1 nl_hfnlist[] = { { 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 h_nl_umode_changed(hook_data_umode_changed *hdata) diff --git a/extensions/no_oper_invis.c b/extensions/no_oper_invis.c index a89f742b..def1b016 100644 --- a/extensions/no_oper_invis.c +++ b/extensions/no_oper_invis.c @@ -13,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[] = { @@ -20,7 +23,7 @@ mapi_hfn_list_av1 noi_hfnlist[] = { { 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 h_noi_umode_changed(hook_data_umode_changed *hdata) diff --git a/extensions/override.c b/extensions/override.c index f2a67e64..312318b2 100644 --- a/extensions/override.c +++ b/extensions/override.c @@ -22,6 +22,9 @@ #include "privilege.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 hack_channel_access(void *data); static void hack_can_join(void *data); @@ -277,5 +280,5 @@ _moddeinit(void) rb_event_delete(expire_override_deadlines_ev); } -DECLARE_MODULE_AV1(override, _modinit, _moddeinit, NULL, NULL, - override_hfnlist, NULL); +DECLARE_MODULE_AV2(override, _modinit, _moddeinit, NULL, NULL, + override_hfnlist, NULL, NULL, override_desc); diff --git a/extensions/restrict-unauthenticated.c b/extensions/restrict-unauthenticated.c index 5daacacd..16267a22 100644 --- a/extensions/restrict-unauthenticated.c +++ b/extensions/restrict-unauthenticated.c @@ -16,6 +16,9 @@ #include "privilege.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); mapi_hfn_list_av1 restrict_unauthenticated_hfnlist[] = { @@ -35,5 +38,5 @@ hack_channel_access(void *vdata) data->approved = 0; } -DECLARE_MODULE_AV1(restrict_unauthenticated, NULL, NULL, NULL, NULL, - restrict_unauthenticated_hfnlist, NULL); +DECLARE_MODULE_AV2(restrict_unauthenticated, NULL, NULL, NULL, NULL, + restrict_unauthenticated_hfnlist, NULL, NULL, restrict_desc);