diff --git a/code/modules/server_tools/server_tools.dm b/code/modules/server_tools/server_tools.dm
index 0594ee810f..b9af612cc7 100644
--- a/code/modules/server_tools/server_tools.dm
+++ b/code/modules/server_tools/server_tools.dm
@@ -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, "Hard reboot triggered, you will automatically reconnect...")
- log_world("Sending shutdown request!");
- sleep(1) //flush the buffers
- ExportService(SERVICE_REQUEST_KILL_PROCESS)
+ ServiceEndProcess()
if(REBOOT_MODE_SHUTDOWN)
to_chat(src, "The server is shutting down...")
- log_world("Deleting world")
- qdel(src)
+ ServiceEndProcess()
/world/proc/ServiceCommand(list/params)
var/sCK = RunningService()