From 1c1297695894fd543554b1a063b1dee990594885 Mon Sep 17 00:00:00 2001 From: Thomas Fargeix Date: Sun, 12 Oct 2014 00:12:09 +0200 Subject: 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. --- modules/commands/os_oper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules') 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()); -- cgit