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

View File

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