Merge pull request #8690 from def-/pr-dnsbl-info

More dnsbl printing
This commit is contained in:
heinrich5991 2024-08-06 16:53:17 +00:00 committed by GitHub
commit e97b8e1818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2877,6 +2877,12 @@ int CServer::Run()
{ {
// entry not found -> whitelisted // entry not found -> whitelisted
m_aClients[ClientId].m_DnsblState = CClient::DNSBL_STATE_WHITELISTED; m_aClients[ClientId].m_DnsblState = CClient::DNSBL_STATE_WHITELISTED;
char aAddrStr[NETADDR_MAXSTRSIZE];
net_addr_str(m_NetServer.ClientAddr(ClientId), aAddrStr, sizeof(aAddrStr), true);
str_format(aBuf, sizeof(aBuf), "ClientId=%d addr=<{%s}> secure=%s whitelisted", ClientId, aAddrStr, m_NetServer.HasSecurityToken(ClientId) ? "yes" : "no");
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "dnsbl", aBuf);
} }
else else
{ {
@ -2888,8 +2894,7 @@ int CServer::Run()
net_addr_str(m_NetServer.ClientAddr(ClientId), aAddrStr, sizeof(aAddrStr), true); net_addr_str(m_NetServer.ClientAddr(ClientId), aAddrStr, sizeof(aAddrStr), true);
str_format(aBuf, sizeof(aBuf), "ClientId=%d addr=<{%s}> secure=%s blacklisted", ClientId, aAddrStr, m_NetServer.HasSecurityToken(ClientId) ? "yes" : "no"); str_format(aBuf, sizeof(aBuf), "ClientId=%d addr=<{%s}> secure=%s blacklisted", ClientId, aAddrStr, m_NetServer.HasSecurityToken(ClientId) ? "yes" : "no");
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "dnsbl", aBuf);
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "dnsbl", aBuf);
if(Config()->m_SvDnsblBan) if(Config()->m_SvDnsblBan)
{ {