Changed the order of Portal/Server shutdown to make sure the Portal stops correctly in light of the changes to the shutdown protocol from previous revision.

This commit is contained in:
Griatch 2015-05-14 21:20:31 +02:00
parent 33154d4d60
commit b7872f2d6f
2 changed files with 2 additions and 2 deletions

View file

@ -118,8 +118,8 @@ class CmdShutdown(MuxCommand):
announcement += "%s\n" % self.args
logger.log_infomsg('Server shutdown by %s.' % self.caller.name)
SESSIONS.announce_all(announcement)
SESSIONS.portal_shutdown()
SESSIONS.server.shutdown(mode='shutdown')
SESSIONS.portal_shutdown()
class CmdPy(MuxCommand):

View file

@ -355,7 +355,6 @@ class Evennia(object):
from evennia.server.oobhandler import OOB_HANDLER
OOB_HANDLER.save()
else:
ServerConfig.objects.conf("server_restart_mode", "reset")
if mode == 'reset':
# like shutdown but don't unset the is_connected flag and don't disconnect sessions
yield [o.at_server_shutdown() for o in ObjectDB.get_all_cached_instances()]
@ -368,6 +367,7 @@ class Evennia(object):
for p in PlayerDB.get_all_cached_instances()]
yield ObjectDB.objects.clear_all_sessids()
yield [(s.pause(), s.at_server_reload()) for s in ScriptDB.get_all_cached_instances()]
ServerConfig.objects.conf("server_restart_mode", "reset")
self.at_server_cold_stop()
# tickerhandler state should always be saved.