summaryrefslogtreecommitdiff
path: root/modules/commands/cs_flags.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_flags.cpp')
-rw-r--r--modules/commands/cs_flags.cpp5
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.