Merge pull request #1439 from Citadel-Station-13/upstream-merge-28102

[MIRROR] Graceful shutdown now asks the server to kill it
This commit is contained in:
LetterJay
2017-06-14 08:52:02 -05:00
committed by GitHub
+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()