]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
Fix crash on propogation after routed squit has reached it's destination. Thx HiroP.
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index 27387871ccaaf3678bb1e8a39027122ed2c56039..7ff0fcdc35458b4056995d7b6e252a1f27e52cd9 100644 (file)
@@ -23,7 +23,6 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <stdint.h>
 #endif
 
 /* $ModDesc: Provides handling of DNS blacklists */
@@ -224,7 +223,7 @@ class ModuleDNSBL : public Module
                        e->reason = MyConf->ReadValue("dnsbl", "reason", i);
                        e->domain = MyConf->ReadValue("dnsbl", "domain", i);
                        e->banaction = str2banaction(MyConf->ReadValue("dnsbl", "action", i));
-                       e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i).c_str());
+                       e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i));
                        e->bitmask = MyConf->ReadInteger("dnsbl", "bitmask", i, false);
 
                        /* yeah, logic here is a little messy */
@@ -232,11 +231,11 @@ class ModuleDNSBL : public Module
                        {
                                ServerInstance->WriteOpers("*** DNSBL(#%d): invalid bitmask",i);
                        }
-                       else if (e->name == "")
+                       else if (e->name.empty())
                        {
                                ServerInstance->WriteOpers("*** DNSBL(#%d): Invalid name",i);
                        }
-                       else if (e->domain == "")
+                       else if (e->domain.empty())
                        {
                                ServerInstance->WriteOpers("*** DNSBL(#%d): Invalid domain",i);
                        }
@@ -246,7 +245,7 @@ class ModuleDNSBL : public Module
                        }
                        else
                        {
-                               if (e->reason == "")
+                               if (e->reason.empty())
                                {
                                        ServerInstance->WriteOpers("*** DNSBL(#%d): empty reason, using defaults",i);
                                        e->reason = "Your IP has been blacklisted.";