Graceful shutdown now asks the server to kill it

This commit is contained in:
CitadelStationBot
2017-06-06 13:26:07 -05:00
parent 8a9db7b4d2
commit 60f759e674
+7 -5
View File
@@ -10,18 +10,20 @@ GLOBAL_PROTECT(reboot_mode)
/world/proc/IRCBroadcast(msg)
ExportService("[SERVICE_REQUEST_IRC_BROADCAST] [msg]")
/world/proc/ServiceEndProcess()
log_world("Sending shutdown request!");
sleep(1) //flush the buffers
ExportService(SERVICE_REQUEST_KILL_PROCESS)
//called at the exact moment the world is supposed to reboot
/world/proc/ServiceReboot()
switch(GLOB.reboot_mode)
if(REBOOT_MODE_HARD)
to_chat(src, "<span class='boldannounce'>Hard reboot triggered, you will automatically reconnect...</span>")
log_world("Sending shutdown request!");
sleep(1) //flush the buffers
ExportService(SERVICE_REQUEST_KILL_PROCESS)
ServiceEndProcess()
if(REBOOT_MODE_SHUTDOWN)
to_chat(src, "<span class='boldannounce'>The server is shutting down...</span>")
log_world("Deleting world")
qdel(src)
ServiceEndProcess()
/world/proc/ServiceCommand(list/params)
var/sCK = RunningService()