From 2b5a1d8c8f5be502462843c3635a76cf1724f817 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 20 Dec 2013 19:48:20 -0500 Subject: Fix deleting multiple access entries when one of them matches your access group --- modules/commands/cs_access.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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)) -- cgit