diff options
| author | 2019-01-24 15:58:57 +0000 | |
|---|---|---|
| committer | 2019-01-24 15:58:57 +0000 | |
| commit | 1799bcff97e8018156df809fd3cae3ed3d663591 (patch) | |
| tree | e8ed9f51b8d52f188c9b3d18abab4ebde915c3d4 /src/modules/m_dnsbl.cpp | |
| parent | Add translation for casemapping between 2.0/3.0 (#1544) (diff) | |
| parent | Add translation for casemapping between 2.0/3.0 (#1544) (diff) | |
| download | inspircd++-1799bcff97e8018156df809fd3cae3ed3d663591.tar.gz inspircd++-1799bcff97e8018156df809fd3cae3ed3d663591.tar.bz2 inspircd++-1799bcff97e8018156df809fd3cae3ed3d663591.zip | |
Merge branch 'insp3' into master
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
| -rw-r--r-- | src/modules/m_dnsbl.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index d1ca800b3..eade39bd7 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -148,7 +148,7 @@ class DNSBLResolver : public DNS::Request if (ServerInstance->XLines->AddLine(kl,NULL)) { std::string timestr = InspIRCd::TimeString(kl->expiry); - ServerInstance->SNO->WriteGlobalSno('x',"K:line added due to DNSBL match on *@%s to expire on %s: %s", + ServerInstance->SNO->WriteGlobalSno('x', "K-line added due to DNSBL match on *@%s to expire on %s: %s", them->GetIPString().c_str(), timestr.c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } @@ -166,7 +166,7 @@ class DNSBLResolver : public DNS::Request if (ServerInstance->XLines->AddLine(gl,NULL)) { std::string timestr = InspIRCd::TimeString(gl->expiry); - ServerInstance->SNO->WriteGlobalSno('x',"G:line added due to DNSBL match on *@%s to expire on %s: %s", + ServerInstance->SNO->WriteGlobalSno('x', "G-line added due to DNSBL match on *@%s to expire on %s: %s", them->GetIPString().c_str(), timestr.c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } @@ -184,7 +184,7 @@ class DNSBLResolver : public DNS::Request if (ServerInstance->XLines->AddLine(zl,NULL)) { std::string timestr = InspIRCd::TimeString(zl->expiry); - ServerInstance->SNO->WriteGlobalSno('x',"Z:line added due to DNSBL match on %s to expire on %s: %s", + ServerInstance->SNO->WriteGlobalSno('x', "Z-line added due to DNSBL match on %s to expire on %s: %s", them->GetIPString().c_str(), timestr.c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } @@ -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; } |
