Adds logging to special world reboots, admins with debug access can now reboot while world is OOM'd (#5737)

* Update world.dm
This commit is contained in:
kevinz000
2018-11-30 21:30:00 -08:00
committed by Atermonera
parent 23cd3e8d5e
commit aa6f232b87
+17 -9
View File
@@ -419,19 +419,27 @@ var/world_topic_spam_protect_time = world.timeofday
return "Database connection failed or not set up"
/world/Reboot(var/reason)
/world/Reboot(reason = 0, fast_track = FALSE)
/*spawn(0)
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy
*/
if (reason || fast_track) //special reboot, do none of the normal stuff
if (usr)
log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools")
message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools")
world << "<span class='boldannounce'>[key_name_admin(usr)] has requested an immediate world restart via client side debugging tools</span>"
else
world << "<span class='boldannounce'>Rebooting world immediately due to host request</span>"
else
processScheduler.stop()
Master.Shutdown() //run SS shutdowns
for(var/client/C in clients)
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[config.server]")
processScheduler.stop()
Master.Shutdown() //run SS shutdowns
for(var/client/C in clients)
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[config.server]")
..(reason)
log_world("World rebooted at [time_stamp()]")
..()
/hook/startup/proc/loadMode()
world.load_mode()