summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-08-12 19:20:18 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-12 19:20:18 +0200
commit6d39615998dee7b30565d34a9f209b569678fb6a (patch)
tree477fdbe6d1f385e797e58e64cbc3af9bdbda9a64 /src/modules/m_dnsbl.cpp
parent1e89f510705753a33644b0356cdd902ecc2d9128 (diff)
Add ConfigTag::getDuration() with optional bounds checking
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index b457648e6..becc7a6e8 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -289,7 +289,7 @@ class ModuleDNSBL : public Module
}
e->banaction = str2banaction(tag->getString("action"));
- e->duration = InspIRCd::Duration(tag->getString("duration", "60"));
+ e->duration = tag->getDuration("duration", 60, 1);
/* Use portparser for record replies */
@@ -314,11 +314,6 @@ class ModuleDNSBL : public Module
std::string location = tag->getTagLocation();
ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(%s): Invalid banaction", location.c_str());
}
- else if (e->duration <= 0)
- {
- std::string location = tag->getTagLocation();
- ServerInstance->SNO->WriteGlobalSno('a', "DNSBL(%s): Invalid duration", location.c_str());
- }
else
{
if (e->reason.empty())