mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Notify about possible save codes right away
This commit is contained in:
parent
00392c7ee6
commit
f847215fd0
|
@ -292,7 +292,24 @@ void CScore::SaveTeam(int ClientID, const char *pCode, const char *pServer)
|
|||
Tmp->m_aGeneratedCode[0] = '\0';
|
||||
GeneratePassphrase(Tmp->m_aGeneratedCode, sizeof(Tmp->m_aGeneratedCode));
|
||||
|
||||
char aBuf[512];
|
||||
if(Tmp->m_aCode[0] == '\0')
|
||||
{
|
||||
str_format(aBuf,
|
||||
sizeof(aBuf),
|
||||
"Team save in progress. You'll be able to load with '/load %s'",
|
||||
Tmp->m_aGeneratedCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
str_format(aBuf,
|
||||
sizeof(aBuf),
|
||||
"Team save in progress. You'll be able to load with '/load %s' if save is successful or with '/load %s' if it fails",
|
||||
Tmp->m_aCode,
|
||||
Tmp->m_aGeneratedCode);
|
||||
}
|
||||
pController->m_Teams.KillSavedTeam(ClientID, Team);
|
||||
GameServer()->SendChatTeam(Team, aBuf);
|
||||
m_pPool->ExecuteWrite(CScoreWorker::SaveTeam, std::move(Tmp), "save team");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue