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
This commit is contained in:
Taavi Väänänen 2021-01-28 16:09:31 +02:00 committed by GitHub
parent 2e79cebb9e
commit d04ed5c53f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View file

@ -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

View file

@ -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" {

View file

@ -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" {

View file

@ -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

View file

@ -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;
}