X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_dnsbl.cpp;h=7fb652cf715ffa8ee7cd012398fa975dcc45b4b3;hb=b5e220008782b2d538cb8e6e3b1923af0c13fb99;hp=9122486fc86fd2e8953420453d596ffffb60c5a9;hpb=1f75c5c20a8733cd0f9a9851a91482fd4f503075;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 9122486fc..7fb652cf7 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -60,12 +60,8 @@ class DNSBLResolver : public Resolver } /* Note: This may be called multiple times for multiple A record results */ - virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0) + virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached) { - /* for bitmask reply types, we arent interested in any but the first result (number 0) */ - if ((ConfEntry->type == DNSBLConfEntry::A_BITMASK) && (resultnum)) - return; - /* Check the user still exists */ if ((them) && (them == ServerInstance->SE->GetRef(theirfd))) { @@ -259,7 +255,7 @@ class ModuleDNSBL : public Module } e->banaction = str2banaction(MyConf->ReadValue("dnsbl", "action", i)); - e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i)); + e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", "60", i)); /* Use portparser for record replies */ @@ -280,6 +276,10 @@ class ModuleDNSBL : public Module { ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(#%d): Invalid banaction", i); } + else if (e->duration <= 0) + { + ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(#%d): Invalid duration", i); + } else { if (e->reason.empty()) @@ -300,7 +300,7 @@ class ModuleDNSBL : public Module delete MyConf; } - virtual void OnRehash(User* user, const std::string ¶meter) + virtual void OnRehash(User* user) { ReadConf(); }