sv_dnsbl_vote option added

This commit is contained in:
east 2016-09-05 11:53:26 +02:00
parent 678a69bf5b
commit c9a50916b3
2 changed files with 3 additions and 2 deletions

View file

@ -153,6 +153,7 @@ MACRO_CONFIG_INT(SvVanillaAntiSpoof, sv_vanilla_antispoof, 1, 0, 1, CFGFLAG_SERV
MACRO_CONFIG_INT(SvDnsbl, sv_dnsbl, 0, 0, 1, CFGFLAG_SERVER, "Enable DNSBL (DNS-based Blackhole List)")
MACRO_CONFIG_STR(SvDnsblHost, sv_dnsbl_host, 128, "", CFGFLAG_SERVER, "Hostname of DNSBL provider to use for IP Verification")
MACRO_CONFIG_STR(SvDnsblKey, sv_dnsbl_key, 128, "", CFGFLAG_SERVER, "Optional Authentification Key for the specified DNSBL provider")
MACRO_CONFIG_INT(SvDnsblVote, sv_dnsbl_vote, 0, 0, 1, CFGFLAG_SERVER, "Block votes by blacklisted addresses")
MACRO_CONFIG_INT(SvDnsblBan, sv_dnsbl_ban, 0, 0, 1, CFGFLAG_SERVER, "Automatically ban blacklisted addresses")

View file

@ -654,7 +654,7 @@ void CGameContext::OnTick()
continue;
// don't count votes by blacklisted clients
if (!m_pServer->DnsblWhite(i))
if (g_Config.m_SvDnsblVote && !m_pServer->DnsblWhite(i))
continue;
int ActVote = m_apPlayers[i]->m_Vote;
@ -1155,7 +1155,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
int64 Now = Server()->Tick();
int64 TickSpeed = Server()->TickSpeed();
if (!m_pServer->DnsblWhite(ClientID))
if (g_Config.m_SvDnsblVote && !m_pServer->DnsblWhite(ClientID))
{
// blacklisted by dnsbl
SendChatTarget(ClientID, "You are not allowed to vote due to DNSBL");