Add message for failed database connection

This commit is contained in:
def 2018-08-22 22:27:01 +02:00
parent 32265d11e5
commit 58927375fc
2 changed files with 3 additions and 1 deletions

View file

@ -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++)

View file

@ -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);