]> git.pond.sub.org Git - empserver/commit
Rewrite accounting of play time
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 15 Nov 2008 19:08:19 +0000 (13:08 -0600)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 15 Nov 2008 19:08:19 +0000 (13:08 -0600)
commit875a80d14f485d74dccb1e62b467aa3d3361edef
tree3b34c087189e10966cbf03a2a0c3c26eb98468ae
parentf46dc55254ff53380ae5be66149a5934396560be
Rewrite accounting of play time

Replace daychange() and gettimeleft() by update_timeused_login(),
update_timeused() and enforce_minimum_session_time().  The new
code doesn't assume the day is always 24 hours long which can
occur when transitioning into or out of DST and such.  Logging
in after more a multiple of 128 days now resets nat_timeused
properly.

Fix nat_timeused calculation on midnight rollover to include
the time since midnight.

struct natstr member nat_dayno and struct player member timeleft
are now unused, remove them.
include/nat.h
include/player.h
include/prototypes.h
src/lib/common/nsc.c
src/lib/player/empdis.c
src/lib/player/player.c
src/lib/subs/natsub.c
src/scripts/nightly/patches/All/emptime.c.patch