mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Add message for failed database connection
This commit is contained in:
parent
32265d11e5
commit
58927375fc
|
@ -422,7 +422,7 @@ void CGameContext::SendBroadcast(const char *pText, int ClientID, bool IsImporta
|
|||
|
||||
if(ClientID == -1)
|
||||
{
|
||||
dbg_assert(IsImportant, "broadcast messages to all players must be important");
|
||||
dbg_assert(IsImportant, "broadcast messages to all players must be important");
|
||||
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID);
|
||||
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
|
|
|
@ -512,6 +512,8 @@ bool CSqlScore::SaveScoreThread(CSqlServer* pSqlServer, const CSqlData *pGameDat
|
|||
io_close(File);
|
||||
lock_unlock(ms_FailureFileLock);
|
||||
|
||||
pData->GameServer()->SendBroadcast("Database connection failed, score written to a file instead. Admins will add it manually in a few days.", -1);
|
||||
|
||||
return true;
|
||||
}
|
||||
lock_unlock(ms_FailureFileLock);
|
||||
|
|
Loading…
Reference in a new issue