Change the panic restart verb to probably actually work

This commit is contained in:
D3athrow
2024-01-17 02:04:37 -06:00
parent 52456e70d5
commit 821e62a0f3
2 changed files with 6 additions and 10 deletions

View File

@@ -4,7 +4,6 @@ var/global/datum/watchdog/watchdog = new
var/waiting=0 // Waiting for the server to end round or empty.
var/const/update_signal_file="data/UPDATE_READY.txt"
var/const/server_signal_file="data/SERVER_READY.txt"
var/const/restart_signal_file="data/FORCE_RESTART.txt"
var/map_path
/datum/watchdog/proc/check_for_update()
@@ -28,7 +27,6 @@ var/global/datum/watchdog/watchdog = new
set name = "Panic Restart"
set category = "Watchdog"
var/signal = file(watchdog.restart_signal_file)
log_admin("[key] restarted the server using the watchdog function")
message_admins("[key] restarted the server using the watchdog function")
signal << "1"
log_admin("[key] has restarted the server using the watchdog function")
message_admins("[key] has restarted the server using the watchdog function")
force_restart = 1

View File

@@ -3,6 +3,7 @@
var/world_startup_time
var/date_string
var/force_restart
#if DM_VERSION < 515
#error You need at least version 515 to compile
@@ -172,11 +173,8 @@ var/auxtools_path
var/notekey = copytext(T, 7)
return list2params(exportnotes(notekey))
else if(T == "port" && master)
if(src.port == 7777 || src.port == "7777")
src.OpenPort(7778)
else
src.OpenPort(7777)
else if(T == "force_restart")
return force_restart
/world/Reboot(reason)
if(reason == REBOOT_HOST)