aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Attila Molnar2016-09-12 18:28:00 +0200
committerGravatar Attila Molnar2016-09-12 18:28:00 +0200
commit49b665809ca66c26dbe1161e8b04dcff407a3d73 (patch)
tree9a23606b4a098a58c3d176149a8aeda47acdcfe8 /src
parentChange type of log messages to MODNAME in several modules (diff)
downloadinspircd++-49b665809ca66c26dbe1161e8b04dcff407a3d73.tar.gz
inspircd++-49b665809ca66c26dbe1161e8b04dcff407a3d73.tar.bz2
inspircd++-49b665809ca66c26dbe1161e8b04dcff407a3d73.zip
m_shun Add support for shunning CIDR masks
Issue #1195
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_shun.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 5388bb485..022726524 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -44,6 +44,9 @@ public:
if (InspIRCd::Match(u->GetFullHost(), matchtext) || InspIRCd::Match(u->GetFullRealHost(), matchtext) || InspIRCd::Match(u->nick+"!"+u->ident+"@"+u->GetIPString(), matchtext))
return true;
+ if (InspIRCd::MatchCIDR(u->GetIPString(), matchtext, ascii_case_insensitive_map))
+ return true;
+
return false;
}