View Single Post
02-15-07, 12:47 AM   #2
Aule
A Fallenroot Satyr
 
Aule's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 20
Implemented an initialization check...

Since there's a server restart in the morning I'll be able to test this.

In my addon init function I implemented this:

Code:
-- Has there been a server reboot?
local current = GetTime()
if (GrudgeBook_Config.LastInitTimestamp < current) then
    -- No, server is still up since last run.
else
    -- Yes.  Invalidate all timestamps.
    GrudgeBook_InvalidateLastSeen()
end
GrudgeBook_Config.LastInitTimestamp = current
For the rest of the mod if the timestamp is nil, I display it as "Unknown".

Seconds since epoch on the server would sure be nice right about now!!
__________________
"Any society that would trade liberty for security will lose both and deserve neither."
- Benjamin Franklin
  Reply With Quote