mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Less strict spam filtering
This commit is contained in:
parent
24c5dc3c6a
commit
4a2eaaf1cc
|
@ -1,5 +1,4 @@
|
|||
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
||||
#include <iostream>
|
||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||
#include <new>
|
||||
#include <engine/shared/config.h>
|
||||
|
@ -1583,7 +1582,6 @@ void CCharacter::HandleTiles(int Index)
|
|||
|
||||
if(GameServer()->Collision()->IsSwitch(MapIndex) != TILE_PENALTY)
|
||||
{
|
||||
std::cout << "a" << std::endl;
|
||||
m_LastPenalty = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -814,9 +814,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
{
|
||||
if(MsgID == NETMSGTYPE_CL_SAY)
|
||||
{
|
||||
if(g_Config.m_SvSpamprotection && pPlayer->m_LastChat && pPlayer->m_LastChat+Server()->TickSpeed() > Server()->Tick())
|
||||
return;
|
||||
|
||||
CNetMsg_Cl_Say *pMsg = (CNetMsg_Cl_Say *)pRawMsg;
|
||||
int Team = pMsg->m_Team;
|
||||
|
||||
|
@ -849,7 +846,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
*(const_cast<char *>(pEnd)) = 0;
|
||||
|
||||
// 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()))
|
||||
if(Length == 0 || (pMsg->m_pMessage[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