]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
Use consistent numerics when a mode already exists or doesn't exist.
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index 89fecf6968aa15bc419c7f52c15d037aaa031d7e..7b88bc9619fce50b5f179a0e557c45311db08244 100644 (file)
@@ -200,7 +200,8 @@ class DNSBLResolver : public DNS::Request
                                        break;
                        }
 
-                       ServerInstance->SNO->WriteGlobalSno('d', "Connecting user %s%s detected as being on a DNS blacklist (%s) with result %d", them->nick.empty() ? "<unknown>" : "", them->GetFullRealHost().c_str(), ConfEntry->domain.c_str(), (ConfEntry->type==DNSBLConfEntry::A_BITMASK) ? bitmask : record);
+                       ServerInstance->SNO->WriteGlobalSno('d', "Connecting user %s (%s) detected as being on the '%s' DNS blacklist with result %d",
+                               them->GetFullRealHost().c_str(), them->GetIPString().c_str(), ConfEntry->name.c_str(), (ConfEntry->type==DNSBLConfEntry::A_BITMASK) ? bitmask : record);
                }
                else
                        ConfEntry->stats_misses++;
@@ -217,7 +218,13 @@ class DNSBLResolver : public DNS::Request
                        countExt.set(them, i - 1);
 
                if (q->error == DNS::ERROR_NO_RECORDS || q->error == DNS::ERROR_DOMAIN_NOT_FOUND)
+               {
                        ConfEntry->stats_misses++;
+                       return;
+               }
+
+               ServerInstance->SNO->WriteGlobalSno('d', "An error occurred whilst checking whether %s (%s) is on the '%s' DNS blacklist: %s",
+                       them->GetFullRealHost().c_str(), them->GetIPString().c_str(), ConfEntry->name.c_str(), this->manager->GetErrorStr(q->error).c_str());
        }
 };