]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
Allow commands to optionally route themselves using ENCAP
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index 9122486fc86fd2e8953420453d596ffffb60c5a9..7fb652cf715ffa8ee7cd012398fa975dcc45b4b3 100644 (file)
@@ -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 &parameter)
+       virtual void OnRehash(User* user)
        {
                ReadConf();
        }