From 0a6b1e1a7de92e078a98f0b955d2624e5b85e4c1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 3 Nov 2020 15:43:04 +0000 Subject: Make connect class debug logging more complete and consistent. --- src/modules/m_cgiirc.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/modules/m_cgiirc.cpp') diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 9397b206a..52c24e50a 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -346,11 +346,22 @@ class ModuleCgiIRC // cannot match this connect class. const std::string* gateway = cmd.gateway.get(user); if (!gateway) + { + ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as it requires a connection via a WebIRC gateway", + myclass->GetName().c_str()); return MOD_RES_DENY; + } // If the gateway matches the constraint then // allow the check to continue. Otherwise, reject it. - return InspIRCd::Match(*gateway, webirc) ? MOD_RES_PASSTHRU : MOD_RES_DENY; + if (!InspIRCd::Match(*gateway, webirc)) + { + ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as the WebIRC gateway name (%s) does not match %s", + myclass->GetName().c_str(), gateway->c_str(), webirc.c_str()); + return MOD_RES_DENY; + } + + return MOD_RES_PASSTHRU; } ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE -- cgit v1.3.1-10-gc9f91