mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
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:
parent
d456d4bc26
commit
16c748c6b1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue