diff options
author | Adam <Adam@anope.org> | 2014-11-15 02:13:10 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-11-15 02:13:10 -0500 |
commit | c9008cdafa37a76d2579a09d360b2fe008748a66 (patch) | |
tree | 84955c3ec9c0ed4d0c1c9ab62a2e05b36e85946a /modules/commands/cs_xop.cpp | |
parent | 8a7793da0cc8331022775c381cd8e33be07fc2c9 (diff) |
Fix access dup check to account for accounts
Diffstat (limited to 'modules/commands/cs_xop.cpp')
-rw-r--r-- | modules/commands/cs_xop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 9524446ea..0839804bf 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -120,6 +120,7 @@ class CommandCSXOP : public Command AccessGroup access = source.AccessFor(ci); const ChanAccess *highest = access.Highest(); bool override = false; + const NickAlias *na = NULL; std::vector<Anope::string>::iterator cmd_it = std::find(order.begin(), order.end(), source.command.upper()), access_it = highest ? std::find(order.begin(), order.end(), XOPChanAccess::DetermineLevel(highest)) : order.end(); @@ -159,7 +160,7 @@ class CommandCSXOP : public Command } else { - const NickAlias *na = NickAlias::Find(mask); + na = NickAlias::Find(mask); if (!na && Config->GetModule("chanserv")->Get<bool>("disallow_hostmask_access")) { source.Reply(_("Masks and unregistered users may not be on access lists.")); @@ -185,7 +186,7 @@ class CommandCSXOP : public Command { const ChanAccess *a = ci->GetAccess(i); - if (a->Mask().equals_ci(mask)) + if ((na && na->nc == a->GetAccount()) || mask.equals_ci(a->Mask())) { if ((!highest || *a >= *highest) && !access.founder && !source.HasPriv("chanserv/access/modify")) { |