]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dnsbl.cpp
Make connect class debug logging more complete and consistent.
[user/henk/code/inspircd.git] / src / modules / m_dnsbl.cpp
index f843512058b12576f0eb2b2e2cf8c16e155aa131..6265ca85a88fafd3f8a49f5b9e027e5be0ebf9f3 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Copyright (C) 2018-2020 Matt Schatz <genius3000@g3k.solutions>
  *   Copyright (C) 2018-2019 linuxdaemon <linuxdaemon.irc@gmail.com>
- *   Copyright (C) 2013, 2016-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013, 2016-2020 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2013, 2015-2016 Adam <Adam@anope.org>
  *   Copyright (C) 2012-2016 Attila Molnar <attilamolnar@hush.com>
  *   Copyright (C) 2012, 2018 Robby <robby@chatbelgie.be>
@@ -427,12 +427,20 @@ class ModuleDNSBL : public Module, public Stats::EventListener
 
                std::string* match = nameExt.get(user);
                if (!match)
+               {
+                       ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as it requires a DNSBL mark",
+                                       myclass->GetName().c_str());
                        return MOD_RES_DENY;
+               }
 
-               if (InspIRCd::Match(*match, dnsbl))
-                       return MOD_RES_PASSTHRU;
+               if (!InspIRCd::Match(*match, dnsbl))
+               {
+                       ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as the DNSBL mark (%s) does not match %s",
+                                       myclass->GetName().c_str(), match->c_str(), dnsbl.c_str());
+                       return MOD_RES_DENY;
+               }
 
-               return MOD_RES_DENY;
+               return MOD_RES_PASSTHRU;
        }
 
        ModResult OnCheckReady(LocalUser *user) CXX11_OVERRIDE