diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-08-25 15:26:42 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-08-25 15:26:42 -0300 |
commit | cb91a8736bd994cec54cca3d1d19c1147e053d63 (patch) | |
tree | 738ac597fdcac4d446d8a6ae36ea9f65a46c3db6 | |
parent | ac374029b4dcdf2d9eda5def3399fa3c462fb7de (diff) | |
download | serverdata-cb91a8736bd994cec54cca3d1d19c1147e053d63.tar.gz serverdata-cb91a8736bd994cec54cca3d1d19c1147e053d63.tar.bz2 serverdata-cb91a8736bd994cec54cca3d1d19c1147e053d63.tar.xz serverdata-cb91a8736bd994cec54cca3d1d19c1147e053d63.zip |
Remove Hardcore Server auto-restart, centralize control on $AUTORESTART flag
-rw-r--r-- | npc/commands/super-menu.txt | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt index af43b437c..7b5a69b4d 100644 --- a/npc/commands/super-menu.txt +++ b/npc/commands/super-menu.txt @@ -194,52 +194,24 @@ OnInit: } end; -// Servers with "debug" set are debug servers which must reset on their own -// Hardcore servers as well +// Servers with $AUTORESTART set are debug servers which must reset on their own // They restart every sunday, at 03:00 UTC OnSun0250: .@sv$=(debug ? "Test" : "Hardcore"); - if (debug || $HARDCORE) kamibroadcast("WARNING: "+.@sv$+" Server will go down for scheduled maintenance in 10 minutes!"); + if ($AUTORESTART) kamibroadcast("WARNING: "+.@sv$+" Server will go down for scheduled maintenance in 10 minutes!"); end; OnSun0255: .@sv$=(debug ? "Test" : "Hardcore"); - if (debug || $HARDCORE) kamibroadcast("WARNING: "+.@sv$+" Server will go down for scheduled maintenance in 5 minutes!"); + if ($AUTORESTART) kamibroadcast("WARNING: "+.@sv$+" Server will go down for scheduled maintenance in 5 minutes!"); end; OnSun0259: .@sv$=(debug ? "Test" : "Hardcore"); - if (debug || $HARDCORE) kamibroadcast("WARNING: Imminent "+.@sv$+" Server restart!"); + if ($AUTORESTART) kamibroadcast("WARNING: Imminent "+.@sv$+" Server restart!"); end; OnSun0300: - if (debug || $HARDCORE) atcommand("@serverexit 103"); + if ($AUTORESTART) atcommand("@serverexit 103"); // Or 101? end; - -// Live Servers also need to reset, but with less frequency -// They restart on the first wednesday of the month, at 03:00 UTC -// Note: We can use gettimeparam - weeks since epoch - and restart every -// 2 weeks if needed. (weeks % 2 == 1) -OnWed0245: - if (!$AUTORESTART || gettime(GETTIME_DAYOFMONTH) > 7) end; - kamibroadcast("WARNING: Server will go down for scheduled maintenance in 15 minutes!"); - end; -OnWed0250: - if (!$AUTORESTART || gettime(GETTIME_DAYOFMONTH) > 7) end; - kamibroadcast("WARNING: Server will go down for scheduled maintenance in 10 minutes!"); - end; -OnWed0255: - if (!$AUTORESTART || gettime(GETTIME_DAYOFMONTH) > 7) end; - kamibroadcast("WARNING: Server will go down for scheduled maintenance in 5 minutes!"); - end; -OnWed0259: - if (!$AUTORESTART || gettime(GETTIME_DAYOFMONTH) > 7) end; - kamibroadcast("WARNING: Imminent Server restart!"); - end; -OnWed0300: - if (!$AUTORESTART || gettime(GETTIME_DAYOFMONTH) > 7) end; - atcommand("@serverexit 101"); - end; -} - // Auto-restart scheduled function script SchedRestart { // FIXME - How is that even supposed to work? |