Added new start/stop hooks to server. These are read differently depending on if the server is reloaded or reset/shutdown. OBS: If you have already implemented your own version of AT_STARTSTOP_MODULE, you need to add stubs for new hooks. You can find the required hooks in gamesrc/conf/examples/at_startstop.py.

gamesrc/conf/examples
This commit is contained in:
Griatch 2012-10-28 22:02:22 +01:00
parent b15d1fa683
commit 92f6b06626
4 changed files with 90 additions and 38 deletions

View file

@ -19,19 +19,48 @@ The module should define at least these global functions:
at_server_start()
at_server_stop()
at_server_reload_start()
at_server_reload_stop()
at_server_cold_start()
at_server_cold_stop()
"""
def at_server_start():
"""
This is called every time the server starts up (also after a
reload or reset).
This is called every time the server starts up, regardless of
how it was shut down.
"""
pass
def at_server_stop():
"""
This is called just before a server is shut down, reloaded or
reset.
This is called just before a server is shut down, regardless
of it is fore a reload, reset or shutdown.
"""
pass
def at_server_reload_start():
"""
This is called only when server starts back up after a reload.
"""
pass
def at_server_reload_stop():
"""
This is called only time the server stops before a reload.
"""
pass
def at_server_cold_start():
"""
This is called only when the server starts "cold", i.e. after a
shutdown or a reset.
"""
pass
def at_server_cold_stop():
"""
This is called only when the server goes down due to a shutdown or reset.
"""
pass