From 0f5a4f84281eb9c8f15c5d8264099d9e29c73921 Mon Sep 17 00:00:00 2001 From: def Date: Tue, 19 May 2015 17:47:41 +0200 Subject: [PATCH] Fix start info spam protection --- src/game/server/gamecontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 7aa340139..cdda55b78 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1593,6 +1593,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) { //if(pPlayer->m_IsReady) // return; + if(g_Config.m_SvSpamprotection && pPlayer->m_LastChangeInfo && pPlayer->m_LastChangeInfo+Server()->TickSpeed()*g_Config.m_SvInfoChangeDelay > Server()->Tick()) + return; CNetMsg_Cl_StartInfo *pMsg = (CNetMsg_Cl_StartInfo *)pRawMsg; pPlayer->m_LastChangeInfo = Server()->Tick();