]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
Fix problem with autoconnects: don't reset NextConnectTime to a higher value than...
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index 1ec9879ae98ab7ecdddec399fe2abb3e83e185ab..0c3c2df7d91e3b96c9eff72a43f32650e1a7648a 100644 (file)
@@ -261,7 +261,7 @@ class ModuleDNSBL : public Module
                        /* Use portparser for record replies */
 
                        /* yeah, logic here is a little messy */
-                       if (e->bitmask <= 0)
+                       if ((e->bitmask <= 0) && (DNSBLConfEntry::A_BITMASK == e->type))
                        {
                                ServerInstance->SNO->WriteToSnoMask('A', "DNSBL(#%d): invalid bitmask",i);
                        }
@@ -312,26 +312,9 @@ class ModuleDNSBL : public Module
                        unsigned char a, b, c, d;
                        char reversedipbuf[128];
                        std::string reversedip;
-                       bool success = false;
+                       bool success;
 
-                       if (!inet_aton(user->GetIPString(), &in))
-                       {
-#ifdef IPV6
-                               /* We could have an ipv6 address here */
-                               std::string x = user->GetIPString();
-                               /* Is it a 4in6 address? (Compensate for this kernel kludge that people love) */
-                               if (x.find("0::ffff:") == 0)
-                               {
-                                       x.erase(x.begin(), x.begin() + 8);
-                                       if (inet_aton(x.c_str(), &in))
-                                               success = true;
-                               }
-#endif
-                       }
-                       else
-                       {
-                               success = true;
-                       }
+                       success = inet_aton(user->GetIPString(), &in);
 
                        if (!success)
                                return 0;