HybridGames / odyssey

Working on preserving and improving the Odyssey Classic source code.
The Unlicense
3 stars 4 forks source link

Server.dat being overwritten when older than 30 days. #21

Open clowenhg opened 10 years ago

clowenhg commented 10 years ago

I've already added TODO, but the timeout for when the server.dat last update is older than 30 days causes a shutdown, which then saves the .dat with nothing in it. Especially since you need a really old version of Access to be able to set that date, we may want to remove this, or at least have it not overwrite the .dat

modDatabase.LoadDatabase

    If World.LastUpdate > CLng(Date) Or Abs(World.LastUpdate - CLng(Date)) >= 30 Then
        If MsgBox("Please verify that your system date and time is set correctly -- click ok to go on.", vbOKCancel, TitleString) = vbCancel Then
            '@TODO This looks like it's deleting old .dat files by writing the emptiness over what was there
            ShutdownServer
            End
        End If
    End If