mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Less restrictive spam protection
This commit is contained in:
parent
3e28e52d8d
commit
39ba649849
|
@ -841,8 +841,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
if(pEnd != 0)
|
||||
*(const_cast<char *>(pEnd)) = 0;
|
||||
|
||||
// drop empty and autocreated spam messages (more than 16 characters per second)
|
||||
if(Length == 0 || (g_Config.m_SvSpamprotection && pPlayer->m_LastChat && pPlayer->m_LastChat+Server()->TickSpeed()*((15+Length)/16) > Server()->Tick()))
|
||||
// drop empty and autocreated spam messages (more than 32 characters per second)
|
||||
if(Length == 0 || (g_Config.m_SvSpamprotection && pPlayer->m_LastChat && pPlayer->m_LastChat+Server()->TickSpeed()*((31+Length)/32) > Server()->Tick()))
|
||||
return;
|
||||
|
||||
//pPlayer->m_LastChat = Server()->Tick();
|
||||
|
|
Loading…
Reference in a new issue