mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Only allow /save when team is started already (prevents saving after
noobfilter)
This commit is contained in:
parent
4efaa85e7a
commit
73229fbb62
|
@ -220,6 +220,12 @@ int CSaveTeam::save(int Team)
|
|||
}
|
||||
|
||||
m_TeamState = Teams->GetTeamState(Team);
|
||||
|
||||
if(m_TeamState != CGameTeams::TEAMSTATE_STARTED)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
m_NumSwitchers = m_pController->GameServer()->Collision()->m_NumSwitchers;
|
||||
m_TeamLocked = Teams->TeamLocked(Team);
|
||||
|
||||
|
|
|
@ -1625,7 +1625,6 @@ void CSqlScore::SaveTeamThread(void *pUser)
|
|||
CSaveTeam* SavedTeam = 0;
|
||||
CSqlTeamSave *pData = (CSqlTeamSave *)pUser;
|
||||
|
||||
|
||||
char TeamString[65536];
|
||||
int Team = pData->m_Team;
|
||||
char OriginalCode[32];
|
||||
|
@ -1652,6 +1651,9 @@ void CSqlScore::SaveTeamThread(void *pUser)
|
|||
case 3:
|
||||
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, "Unable to find all Characters");
|
||||
break;
|
||||
case 4:
|
||||
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, "Your team is not started yet");
|
||||
break;
|
||||
}
|
||||
if(!Num)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue