mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #4846
4846: Do not mute if spamprotection is off (closed #4816) r=def- a=ChillerDragon ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
This commit is contained in:
commit
1f33fc82a0
|
@ -3820,7 +3820,7 @@ int CGameContext::ProcessSpamProtection(int ClientID, bool RespectChatInitialDel
|
|||
return 1;
|
||||
}
|
||||
|
||||
if((m_apPlayers[ClientID]->m_ChatScore += g_Config.m_SvChatPenalty) > g_Config.m_SvChatThreshold)
|
||||
if(g_Config.m_SvSpamMuteDuration && (m_apPlayers[ClientID]->m_ChatScore += g_Config.m_SvChatPenalty) > g_Config.m_SvChatThreshold)
|
||||
{
|
||||
Mute(&Addr, g_Config.m_SvSpamMuteDuration, Server()->ClientName(ClientID));
|
||||
m_apPlayers[ClientID]->m_ChatScore = 0;
|
||||
|
|
Loading…
Reference in a new issue