This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Another Time Question

Old posts that have not been replied to for several years.
Locked
S
SomeGuy
Voice
Posts: 13
Joined: Sat May 01, 2004 5:25 pm

Another Time Question

Post by SomeGuy »

I've gone and made things really hard now.

Basically, I have a script that checks if a game server is up or down, reports the down time, and the time it came up, in the format %H:%S

Now, I have another script for this game that notifies everyone in the channel when an event is about to occur. Now what I'm trying to do is this, if the server is in DOWN mode, I don't want it to display the events (maybe adding a down to the database of the event thing then if the date:check see's down it won't do anything with it)

Now, when the server comes back up, It then displays another time, the UP time. When an UP occurs it'll get the up time, add 1 hour, then write a new time in the database over the old time (which you remember fell during server DOWN).

So to simplify my question, if I'm doing a file check when the server goes down, how do I check if the time in the event file is >= to the time of server down, then check again at up time to see if the event file <= time of server up but still >= time of server down?

I hope i was clear on my explanation, Its probably just simple lines of code. Thanks
Locked