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_flags.cpp | |
parent | 8a7793da0cc8331022775c381cd8e33be07fc2c9 (diff) |
Fix access dup check to account for accounts
Diffstat (limited to 'modules/commands/cs_flags.cpp')
-rw-r--r-- | modules/commands/cs_flags.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<bool>("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. |