summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 13:29:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-06 13:29:24 +0000
commit0efd33072128bb6bd956766db0699577937c493e (patch)
treeb9b0bb65326224bece7fc335e09d12c4c3adfcb6 /include
parent7410e81e80513d09c1116de4d4536258bb25d914 (diff)
Properly handle CIDR etc for user pointer extbans
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10412 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-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();
}
}