]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index b457648e672e7e60e147f1b62dd9b2e10614703a..becc7a6e85d59762b01886b1d0c544d8386d1d4a 100644 (file)
@@ -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())