Skip to content
This repository has been archived by the owner on Nov 16, 2017. It is now read-only.

Added spamprotection for chat commands #245

Open
wants to merge 1 commit into
base: DDRace
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,13 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
}
if(pMsg->m_pMessage[0]=='/')
{
if(ProcessSpamProtection(ClientID))
{
SendChatTarget(ClientID, "Muted text:");
SendChatTarget(ClientID, pMsg->m_pMessage);
return;
}

m_ChatResponseTargetID = ClientID;
Console()->SetFlagMask(CFGFLAG_CHAT);

Expand Down