X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dnsbl.cpp;h=7ff0fcdc35458b4056995d7b6e252a1f27e52cd9;hb=02c6ce1ad09a7471a6b03dc00bac4b843d157489;hp=27387871ccaaf3678bb1e8a39027122ed2c56039;hpb=75f0cba571dca97f181835d3645c3d42dd5daf2d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 27387871c..7ff0fcdc3 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #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.";