Less strict spam filtering

This commit is contained in:
def 2014-02-14 00:26:05 +01:00
parent 24c5dc3c6a
commit 4a2eaaf1cc
2 changed files with 1 additions and 6 deletions

View file

@ -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;
}

View file

@ -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();