Merge pull request #8640 from Robyt3/Server-DNSBL-Ban-Only-New

Only apply DNSBL bans once when player joins
This commit is contained in:
Dennis Felsing 2024-07-24 11:08:40 +00:00 committed by GitHub
commit a84a53c5fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2890,12 +2890,12 @@ int CServer::Run()
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_ADDINFO, "dnsbl", aBuf); Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "dnsbl", aBuf);
}
}
if(m_aClients[ClientId].m_DnsblState == CClient::DNSBL_STATE_BLACKLISTED && Config()->m_SvDnsblBan) if(Config()->m_SvDnsblBan)
{ {
m_NetServer.NetBan()->BanAddr(m_NetServer.ClientAddr(ClientId), 60 * 10, Config()->m_SvDnsblBanReason); m_NetServer.NetBan()->BanAddr(m_NetServer.ClientAddr(ClientId), 60 * 10, Config()->m_SvDnsblBanReason);
}
}
} }
} }
} }