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_flags.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_flags.cpp') diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index 1d861b883..8d66ec5a3 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -88,6 +88,7 @@ class CommandCSFlags : public Command AccessGroup u_access = source.AccessFor(ci); const ChanAccess *highest = u_access.Highest(); + const NickAlias *na = NULL; if (IRCD->IsChannelValid(mask)) { @@ -113,7 +114,7 @@ class CommandCSFlags : 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.")); @@ -142,7 +143,7 @@ class CommandCSFlags : public Command for (current_idx = ci->GetAccessCount(); current_idx > 0; --current_idx) { ChanAccess *access = ci->GetAccess(current_idx - 1); - if (mask.equals_ci(access->Mask())) + if ((na && na->nc == access->GetAccount()) || mask.equals_ci(access->Mask())) { // Flags allows removing others that have the same access as you, // but no other access system does. -- cgit