Skip to content

Commit

Permalink
Merge pull request ddnet#8690 from def-/pr-dnsbl-info
Browse files Browse the repository at this point in the history
More dnsbl printing
  • Loading branch information
heinrich5991 authored Aug 6, 2024
2 parents 7dc6825 + 922e32b commit e97b8e1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2877,6 +2877,12 @@ int CServer::Run()
{
// entry not found -> 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
{
Expand All @@ -2888,8 +2894,7 @@ int CServer::Run()
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");

Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "dnsbl", aBuf);
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "dnsbl", aBuf);

if(Config()->m_SvDnsblBan)
{
Expand Down

0 comments on commit e97b8e1

Please sign in to comment.