Save the game time before shutting down the server (avoids drfts)

This commit is contained in:
Vincent Le Goff 2017-02-14 13:02:38 -08:00 committed by Griatch
parent c05a0a58bf
commit 95c8bf348b

View file

@ -346,6 +346,7 @@ class Evennia(object):
from evennia.objects.models import ObjectDB
#from evennia.players.models import PlayerDB
from evennia.server.models import ServerConfig
from evennia.utils import gametime as _GAMETIME_MODULE
if mode == 'reload':
# call restart hooks
@ -394,6 +395,9 @@ class Evennia(object):
# kill the server
reactor.callLater(1, reactor.stop)
# we make sure the proper gametime is saved as late as possible
ServerConfig.objects.conf("runtime", _GAMETIME_MODULE.runtime())
# server start/stop hooks
def at_server_start(self):