From c9008cdafa37a76d2579a09d360b2fe008748a66 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 15 Nov 2014 02:13:10 -0500 Subject: Fix access dup check to account for accounts --- modules/commands/cs_xop.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_xop.cpp') 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::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("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")) { -- cgit