From d04ed5c53f54a506ca695d8da33c21bedb82b921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taavi=20V=C3=A4=C3=A4n=C3=A4nen?= Date: Thu, 28 Jan 2021 16:09:31 +0200 Subject: [PATCH] wallops: require new oper:wallops right (#110) Split oper:wallops right from oper:mass_notice. Update documentation and examples to grant oper:wallops everywhere oper:mass_notice was granted. closes #103 --- NEWS.md | 1 + doc/ircd.conf.example | 3 ++- doc/reference.conf | 6 ++++-- help/opers/wallops | 2 +- modules/m_wallops.c | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index c316bcf3..2b117cb3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -40,6 +40,7 @@ bolded warnings in the full release notes below. - **Breaking:** /stats A output now follows the same format as other stats letters - **Breaking:** helpops now uses +h instead of +H - **Breaking:** sno\_whois and the spy\_ extensions have been removed +- **Breaking:** Using /wallops now requires the oper:wallops privilege instead of oper:massnotice - Opers now have their privset (identified by name) on remote servers - Oper-only umodes are refreshed after rehash and /grant - Extension modules can be reloaded diff --git a/doc/ircd.conf.example b/doc/ircd.conf.example index ab1f940c..631ce6a1 100644 --- a/doc/ircd.conf.example +++ b/doc/ircd.conf.example @@ -244,7 +244,8 @@ privset "server_bot" { privset "global_op" { extends = "local_op"; privs = oper:routing, oper:kline, oper:unkline, oper:xline, - oper:resv, oper:cmodes, oper:mass_notice, oper:remoteban; + oper:resv, oper:cmodes, oper:mass_notice, oper:wallops, + oper:remoteban; }; privset "admin" { diff --git a/doc/reference.conf b/doc/reference.conf index 75847787..5ce9c892 100644 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -456,7 +456,8 @@ privset "local_op" { * channels etc. see /quote help operspy * oper:hidden: hides the oper from /stats p * oper:remoteban: allows remote kline etc - * oper:mass_notice: allows sending wallops and mass notices + * oper:mass_notice: allows sending mass notices + * oper:wallops: allows sending wallops messages * oper:grant: allows using the GRANT command * usermode:servnotice: allows setting +s * @@ -481,7 +482,8 @@ privset "server_bot" { privset "global_op" { extends = "local_op"; privs = oper:routing, oper:kline, oper:unkline, oper:xline, - oper:resv, oper:cmodes, oper:mass_notice, oper:remoteban; + oper:resv, oper:cmodes, oper:mass_notice, oper:wallops, + oper:remoteban; }; privset "admin" { diff --git a/help/opers/wallops b/help/opers/wallops index 94a0213a..2e20998b 100644 --- a/help/opers/wallops +++ b/help/opers/wallops @@ -5,4 +5,4 @@ who are umode +w (including non-opers). Server sent WALLOPS go to all opers who are umode +w. -- Requires Oper Priv: oper:mass_notice +- Requires Oper Priv: oper:wallops diff --git a/modules/m_wallops.c b/modules/m_wallops.c index 0a951b0d..f64bc96e 100644 --- a/modules/m_wallops.c +++ b/modules/m_wallops.c @@ -97,10 +97,10 @@ ms_wallops(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour { const char *prefix = ""; - if (MyClient(source_p) && !IsOperMassNotice(source_p)) + if (MyClient(source_p) && !HasPrivilege(source_p, "oper:wallops")) { sendto_one(source_p, form_str(ERR_NOPRIVS), - me.name, source_p->name, "mass_notice"); + me.name, source_p->name, "wallops"); return; }