Less restrictive spam protection

This commit is contained in:
def 2014-01-01 22:06:46 +01:00
parent 3e28e52d8d
commit 39ba649849

View file

@ -841,8 +841,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
if(pEnd != 0) if(pEnd != 0)
*(const_cast<char *>(pEnd)) = 0; *(const_cast<char *>(pEnd)) = 0;
// drop empty and autocreated spam messages (more than 16 characters per second) // 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()*((15+Length)/16) > Server()->Tick())) if(Length == 0 || (g_Config.m_SvSpamprotection && pPlayer->m_LastChat && pPlayer->m_LastChat+Server()->TickSpeed()*((31+Length)/32) > Server()->Tick()))
return; return;
//pPlayer->m_LastChat = Server()->Tick(); //pPlayer->m_LastChat = Server()->Tick();