diff options
| author | Thomas Fargeix <t.fargeix@gmail.com> | 2014-10-12 00:12:09 +0200 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-10-12 10:54:11 -0400 |
| commit | 1c1297695894fd543554b1a063b1dee990594885 (patch) | |
| tree | d685ed39164b7b530a8ffc1cb5868e11ef45873e | |
| parent | 96583892c6a0bc48029348ddcf86b1afc5a9915d (diff) | |
Add an operserv/oper/modify privilege.
The operserv/oper command privilege allows to add operators
with fewer or the same privileges as ourself.
This new privilege allows to have operators who can use operserv/oper
to see the list of operators and their privileges, but cannot add new
operators.
| -rw-r--r-- | data/example.conf | 1 | ||||
| -rw-r--r-- | docs/Changes.conf | 1 | ||||
| -rw-r--r-- | modules/commands/os_oper.cpp | 12 |
3 files changed, 14 insertions, 0 deletions
diff --git a/data/example.conf b/data/example.conf index f8db60b23..223f770fb 100644 --- a/data/example.conf +++ b/data/example.conf @@ -763,6 +763,7 @@ log * nickserv/confirm - Can confirm other users nicknames * nickserv/drop - Can drop other users nicks * operserv/config - Can modify services's configuration + * operserv/oper/modify - Can add and remove operators with at most the same privileges * protected - Can not be kicked from channels by Services * * Available commands: diff --git a/docs/Changes.conf b/docs/Changes.conf index d63cf9c15..1b66f56a9 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,5 +1,6 @@ Anope Version 2.0.2 ------------------- +Add an operserv/oper/modify privilege, required to use oper add and oper del Add a chanserv/access/list privilege, which allow readonly access to ChanServ access and akick lists Anope Version 2.0.1 diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index 370a974b4..71cdf026c 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -82,6 +82,12 @@ class CommandOSOper : public Command const Anope::string &oper = params[1]; const Anope::string &otype = params[2]; + if (!source.HasPriv("operserv/oper/modify")) + { + source.Reply(ACCESS_DENIED); + return; + } + const NickAlias *na = NickAlias::Find(oper); if (na == NULL) source.Reply(NICK_X_NOT_REGISTERED, oper.c_str()); @@ -115,6 +121,12 @@ class CommandOSOper : public Command { const Anope::string &oper = params[1]; + if (!source.HasPriv("operserv/oper/modify")) + { + source.Reply(ACCESS_DENIED); + return; + } + const NickAlias *na = NickAlias::Find(oper); if (na == NULL) source.Reply(NICK_X_NOT_REGISTERED, oper.c_str()); |
