mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Rate-limit /lock (fixes #1122)
This commit is contained in:
parent
a7b778977a
commit
59675fe63c
|
@ -771,8 +771,18 @@ void CGameContext::ConLockTeam(IConsole::IResult *pResult, void *pUserData)
|
|||
if (pResult->NumArguments() > 0)
|
||||
Lock = !pResult->GetInteger(0);
|
||||
|
||||
if(Team > TEAM_FLOCK && Team < TEAM_SUPER)
|
||||
if(Team <= TEAM_FLOCK || Team >= TEAM_SUPER)
|
||||
{
|
||||
pSelf->Console()->Print(
|
||||
IConsole::OUTPUT_LEVEL_STANDARD,
|
||||
"print",
|
||||
"This team can't be locked");
|
||||
return;
|
||||
}
|
||||
|
||||
if(pSelf->ProcessSpamProtection(pResult->m_ClientID))
|
||||
return;
|
||||
|
||||
char aBuf[512];
|
||||
if(Lock)
|
||||
{
|
||||
|
@ -802,12 +812,6 @@ void CGameContext::ConLockTeam(IConsole::IResult *pResult, void *pUserData)
|
|||
pSelf->SendChatTarget(i, aBuf);
|
||||
}
|
||||
}
|
||||
else
|
||||
pSelf->Console()->Print(
|
||||
IConsole::OUTPUT_LEVEL_STANDARD,
|
||||
"print",
|
||||
"This team can't be locked");
|
||||
}
|
||||
|
||||
void CGameContext::ConInviteTeam(IConsole::IResult *pResult, void *pUserData)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue