summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorlinuxdaemon <linuxdaemon@snoonet.org>2019-01-11 09:44:51 -0600
committerPeter Powell <petpow@saberuk.com>2019-01-11 16:17:51 +0000
commit0a7d2456d9e8b5a506e4619c40caef4606864502 (patch)
tree45f297a990e239d68ac63d552c01917528f9cd72 /src/modules
parente784524e1107dd13f1591c9d9d2b2be2b5294581 (diff)
Allow wildcards in <connect:dnsbl>
This makes it consistent with other <connect> class parameters like `webirc`
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_dnsbl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index a645e2cd1..eade39bd7 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -420,10 +420,14 @@ class ModuleDNSBL : public Module, public Stats::EventListener
std::string dnsbl;
if (!myclass->config->readString("dnsbl", dnsbl))
return MOD_RES_PASSTHRU;
+
std::string* match = nameExt.get(user);
- std::string myname = match ? *match : "";
- if (dnsbl == myname)
+ if (!match)
+ return MOD_RES_PASSTHRU;
+
+ if (InspIRCd::Match(*match, dnsbl))
return MOD_RES_PASSTHRU;
+
return MOD_RES_DENY;
}