summaryrefslogtreecommitdiff
path: root/modules/commands/cs_flags.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-18 17:04:48 -0500
committerAdam <Adam@anope.org>2013-11-18 17:18:00 -0500
commit2c3e8a76c92b8452c326bc22d8d4a443aa8cb2aa (patch)
treeddba4471dbf0d0873f1207d42bb9e8d488915551 /modules/commands/cs_flags.cpp
parent0bb23f3f4d0055e2b31e2474fee455b390cf88a0 (diff)
Check override permission in cs_flags for modifying existing entries too
Diffstat (limited to 'modules/commands/cs_flags.cpp')
-rw-r--r--modules/commands/cs_flags.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index b639bbcd9..42b5cf6c4 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -138,6 +138,7 @@ class CommandCSFlags : public Command
ChanAccess *current = NULL;
unsigned current_idx;
std::set<char> current_flags;
+ bool override = false;
for (current_idx = ci->GetAccessCount(); current_idx > 0; --current_idx)
{
ChanAccess *access = ci->GetAccess(current_idx - 1);
@@ -149,8 +150,13 @@ class CommandCSFlags : public Command
// operator<= on the non-me entry!
if (*highest <= *access)
{
- source.Reply(ACCESS_DENIED);
- return;
+ if (source.HasPriv("chanserv/access/modify"))
+ override = true;
+ else
+ {
+ source.Reply(ACCESS_DENIED);
+ return;
+ }
}
current = access;
@@ -169,7 +175,6 @@ class CommandCSFlags : public Command
}
Privilege *p = NULL;
- bool override = false;
int add = 1;
for (size_t i = 0; i < flags.length(); ++i)
{