From 2c3e8a76c92b8452c326bc22d8d4a443aa8cb2aa Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 18 Nov 2013 17:04:48 -0500 Subject: Check override permission in cs_flags for modifying existing entries too --- modules/commands/cs_flags.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/commands/cs_flags.cpp') 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 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) { -- cgit