diff options
author | Adam <Adam@anope.org> | 2013-12-20 19:48:20 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-12-20 19:48:20 -0500 |
commit | 2b5a1d8c8f5be502462843c3635a76cf1724f817 (patch) | |
tree | 3e55d89811e76e532129c1f56804014d0163e68a /modules/commands/cs_access.cpp | |
parent | 7cf21342f494c512e97b4e51880b3e7ad81a53b3 (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.cpp | 4 |
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)) |