mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-28 07:38:35 +01:00
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:
+17
-9
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user