summaryrefslogtreecommitdiff
path: root/modules/commands/cs_access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-12-20 19:48:20 -0500
committerAdam <Adam@anope.org>2013-12-20 19:48:20 -0500
commit2b5a1d8c8f5be502462843c3635a76cf1724f817 (patch)
tree3e55d89811e76e532129c1f56804014d0163e68a /modules/commands/cs_access.cpp
parent7cf21342f494c512e97b4e51880b3e7ad81a53b3 (diff)
Fix deleting multiple access entries when one of them matches your access group
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r--modules/commands/cs_access.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index d098e4c59..5d5b1169c 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -250,9 +250,8 @@ class CommandCSAccess : public Command
Anope::string Nicks;
bool denied;
bool override;
- AccessGroup ag;
public:
- AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), denied(false), override(false), ag(source.AccessFor(ci))
+ AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), denied(false), override(false)
{
if (!source.AccessFor(ci).HasPriv("ACCESS_CHANGE") && source.HasPriv("chanserv/access/modify"))
this->override = true;
@@ -282,6 +281,7 @@ class CommandCSAccess : public Command
ChanAccess *access = ci->GetAccess(Number - 1);
+ AccessGroup ag = source.AccessFor(ci);
const ChanAccess *u_highest = ag.Highest();
if ((!u_highest || *u_highest <= *access) && !ag.founder && !this->override && !access->mask.equals_ci(source.nc->display))