summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/u_listmode.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h
index 981664436..689505c5c 100644
--- a/include/u_listmode.h
+++ b/include/u_listmode.h
@@ -521,12 +521,22 @@ class ListModeBase : public ModeHandler
{
if (LM->extban && it->mask.length() > 1 && it->mask[0] == LM->extban && it->mask[1] == ':')
{
- if (InspIRCd::Match(LM->literal.substr(2), it->mask))
+ if (LM->user)
+ {
+ if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || InspIRCd::Match(LM->user->GetFullHost(), it->mask) || (InspIRCd::MatchCIDR(LM->literal, it->mask)))
+ return it->mask.c_str();
+ }
+ else if (InspIRCd::Match(LM->literal.substr(2), it->mask))
return it->mask.c_str();
}
else
{
- if (InspIRCd::Match(LM->literal, it->mask))
+ if (LM->user)
+ {
+ if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || InspIRCd::Match(LM->user->GetFullHost(), it->mask) || (InspIRCd::MatchCIDR(LM->literal, it->mask)))
+ return it->mask.c_str();
+ }
+ else if (InspIRCd::Match(LM->literal, it->mask))
return it->mask.c_str();
}
}