mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-21 12:12:48 +00:00
feat(dashboard): restarts from 30 seconds; no "undefined" in the restart banner
Restarts can be scheduled in seconds (30 s to 24 h; minutes still accepted), with 30 second and 1 minute choices for quick restarts. The restart banner only names who scheduled it when that is known: staff who manage restarts read it from /api/server/restart, everyone else gets when and why from the status, which leaves the name out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -463,7 +463,7 @@ namespace {
|
||||
if (when == "start") part.status = "Restarts when the event ends";
|
||||
return true;
|
||||
}
|
||||
const auto error = LiveWorld::ScheduleRestart(part.config.value("minutes", 15), Text(part.config, "reason"), run.actor, false);
|
||||
const auto error = LiveWorld::ScheduleRestart(part.config.value("minutes", int64_t{ 15 }) * 60, Text(part.config, "reason"), run.actor, false);
|
||||
part.status = error ? "Not scheduled: " + *error : "Restart scheduled when it " + std::string(when == "start" ? "started" : "ended");
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user