mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
sv_dnsbl_vote option added
This commit is contained in:
parent
678a69bf5b
commit
c9a50916b3
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue