]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Use the normal method for applying a default config in dnsbl.
authorSadie Powell <sadie@witchery.services>
Tue, 29 Sep 2020 11:07:06 +0000 (12:07 +0100)
committerSadie Powell <sadie@witchery.services>
Tue, 29 Sep 2020 11:07:06 +0000 (12:07 +0100)
src/modules/m_dnsbl.cpp

index 267bb892e35ae706d49b5bb7e21b38922d43154d..f843512058b12576f0eb2b2e2cf8c16e155aa131 100644 (file)
@@ -299,7 +299,7 @@ class ModuleDNSBL : public Module, public Stats::EventListener
                        e->name = tag->getString("name");
                        e->ident = tag->getString("ident");
                        e->host = tag->getString("host");
-                       e->reason = tag->getString("reason");
+                       e->reason = tag->getString("reason", "Your IP has been blacklisted.", 1);
                        e->domain = tag->getString("domain");
 
                        if (stdalgo::string::equalsci(tag->getString("type"), "bitmask"))
@@ -341,13 +341,6 @@ class ModuleDNSBL : public Module, public Stats::EventListener
                        }
                        else
                        {
-                               if (e->reason.empty())
-                               {
-                                       std::string location = tag->getTagLocation();
-                                       ServerInstance->SNO->WriteGlobalSno('d', "DNSBL(%s): empty reason, using defaults", location.c_str());
-                                       e->reason = "Your IP has been blacklisted.";
-                               }
-
                                /* add it, all is ok */
                                newentries.push_back(e);
                        }