mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Forbid votes while being muted
Fixes the problem of people abusing the vote reason for spamming. Fixes #3926.
This commit is contained in:
parent
ca14d87b13
commit
15c6ad2fe7
|
@ -4138,6 +4138,11 @@ bool CGameContext::RateLimitPlayerVote(int ClientID)
|
|||
for(int i = 0; i < m_NumVoteMutes && !VoteMuted; i++)
|
||||
if(!net_addr_comp_noport(&Addr, &m_aVoteMutes[i].m_Addr))
|
||||
VoteMuted = (m_aVoteMutes[i].m_Expire - Server()->Tick()) / Server()->TickSpeed();
|
||||
for(int i = 0; i < m_NumMutes && VoteMuted == 0; i++)
|
||||
{
|
||||
if(!net_addr_comp_noport(&Addr, &m_aMutes[i].m_Addr))
|
||||
VoteMuted = (m_aMutes[i].m_Expire - Server()->Tick()) / Server()->TickSpeed();
|
||||
}
|
||||
if(VoteMuted > 0)
|
||||
{
|
||||
char aChatmsg[64];
|
||||
|
|
Loading…
Reference in a new issue