Swap: Don't spam-protect retrying with local messages only

As suggested by 冷落:
> I have a advice./swap need wait 30s,and often someone will say /swap
> within 30 seconds,but kept saying it would be muted
This commit is contained in:
def 2021-12-05 23:11:15 +01:00
parent d456d4bc26
commit 16c748c6b1

View file

@ -682,9 +682,6 @@ void CGameContext::ConSwap(IConsole::IResult *pResult, void *pUserData)
if(!pPlayer)
return;
if(pSelf->ProcessSpamProtection(pResult->m_ClientID))
return;
if(!g_Config.m_SvSwap)
{
pSelf->Console()->Print(
@ -747,6 +744,9 @@ void CGameContext::ConSwap(IConsole::IResult *pResult, void *pUserData)
bool SwapPending = pSwapPlayer->m_SwapTargetsClientID != pResult->m_ClientID;
if(SwapPending)
{
if(pSelf->ProcessSpamProtection(pResult->m_ClientID))
return;
Teams.RequestTeamSwap(pPlayer, pSwapPlayer, Team);
return;
}