summaryrefslogtreecommitdiff
path: root/npc/commands/super-menu.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-12 09:07:22 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-12 09:07:22 -0300
commit3ce6aec83b789b34848ff6cffadab8ba85e97cb1 (patch)
tree57cb5ed75046e49f355e493db530694325dc1934 /npc/commands/super-menu.txt
parent16a6d9ced9c7b3f06534df945985836b0bd97eb8 (diff)
downloadserverdata-3ce6aec83b789b34848ff6cffadab8ba85e97cb1.tar.gz
serverdata-3ce6aec83b789b34848ff6cffadab8ba85e97cb1.tar.bz2
serverdata-3ce6aec83b789b34848ff6cffadab8ba85e97cb1.tar.xz
serverdata-3ce6aec83b789b34848ff6cffadab8ba85e97cb1.zip
Hardcore server scheduled restarts
Diffstat (limited to 'npc/commands/super-menu.txt')
-rw-r--r--npc/commands/super-menu.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt
index 9dfe29a3a..8f6bea9ec 100644
--- a/npc/commands/super-menu.txt
+++ b/npc/commands/super-menu.txt
@@ -71,6 +71,7 @@ OnInit:
end;
// Servers with "debug" set are debug servers which must reset on their own
+// They restart every sunday, at 03:00 UTC
OnSun0250:
if (debug) kamibroadcast("WARNING: Test Server will go down for scheduled maintenance in 10 minutes!");
end;
@@ -84,5 +85,27 @@ OnSun0300:
if (debug) atcommand("@serverexit 103");
end;
+
+// Hardcore Servers also need to reset, but with less frequency
+// They restart on the first monday 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)
+OnMon0250:
+ if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
+ kamibroadcast("WARNING: Hardcore Server will go down for scheduled maintenance in 10 minutes!");
+ end;
+OnMon0255:
+ if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
+ kamibroadcast("WARNING: Hardcore Server will go down for scheduled maintenance in 5 minutes!");
+ end;
+OnMon0259:
+ if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
+ kamibroadcast("WARNING: Imminent Hardcore Server restart!");
+ end;
+OnMon0300:
+ if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
+ atcommand("@serverexit 103");
+ end;
+
}