mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
Explain why the randomly generated save code is used
to the player when the database connection failed
This commit is contained in:
parent
d169bb1b52
commit
0d887e8b37
|
@ -1573,9 +1573,18 @@ bool CSqlScore::SaveTeamThread(CSqlServer* pSqlServer, const CSqlData<CScoreSave
|
||||||
pData->m_pResult->m_Status = CScoreSaveResult::SAVE_SUCCESS;
|
pData->m_pResult->m_Status = CScoreSaveResult::SAVE_SUCCESS;
|
||||||
strcpy(pData->m_pResult->m_aBroadcast,
|
strcpy(pData->m_pResult->m_aBroadcast,
|
||||||
"Database connection failed, teamsave written to a file instead. Admins will add it manually in a few days.");
|
"Database connection failed, teamsave written to a file instead. Admins will add it manually in a few days.");
|
||||||
str_format(pData->m_pResult->m_aMessage, sizeof(pData->m_pResult->m_aMessage),
|
if(str_comp(pData->m_Server, g_Config.m_SvSqlServerName) == 0)
|
||||||
"Team successfully saved by %s. Use '/load %s' to continue",
|
{
|
||||||
pData->m_ClientName, Code.Str());
|
str_format(pData->m_pResult->m_aMessage, sizeof(pData->m_pResult->m_aMessage),
|
||||||
|
"Team successfully saved by %s. The database connection failed, using generated save code instead to avoid collisions. Use '/load %s' to continue",
|
||||||
|
pData->m_ClientName, Code.ClrStr());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str_format(pData->m_pResult->m_aMessage, sizeof(pData->m_pResult->m_aMessage),
|
||||||
|
"Team successfully saved by %s. The database connection failed, using generated save code instead to avoid collisions. Use '/load %s' on %s to continue",
|
||||||
|
pData->m_ClientName, Code.ClrStr(), pData->m_Server);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
lock_unlock(ms_FailureFileLock);
|
lock_unlock(ms_FailureFileLock);
|
||||||
|
|
Loading…
Reference in a new issue