aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_banexception.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_banexception.cpp')
-rw-r--r--src/modules/m_banexception.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index 7324e7098..c5105ae65 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -73,10 +73,11 @@ class ModuleBanException
if (!list)
return MOD_RES_PASSTHRU;
- for (const ListModeBase::ListItem ban : *list)
+ for (const ListModeBase::ListItem& ban : *list)
{
+ bool inverted;
std::string name, value;
- if (!ExtBan::Parse(ban.mask, name, value))
+ if (!ExtBan::Parse(ban.mask, name, value, inverted))
continue;
if (name.size() == 1)
@@ -92,7 +93,7 @@ class ModuleBanException
continue;
}
- return extban->IsMatch(user, chan, value) ? MOD_RES_ALLOW : MOD_RES_PASSTHRU;
+ return extban->IsMatch(user, chan, value) != inverted ? MOD_RES_ALLOW : MOD_RES_PASSTHRU;
}
return MOD_RES_PASSTHRU;
}