This commit is contained in:
2024-01-21 01:01:54 -05:00
parent 7eafc029e7
commit ba86975d31

View File

@@ -64,6 +64,7 @@ where
} }
async fn do_soft_save_with_announcement() { async fn do_soft_save_with_announcement() {
println!("Soft saving...");
// run_rcon_command([ // run_rcon_command([
// "say", // "say",
// "Soft saving now. No need to interrupt what you're doing.", // "Soft saving now. No need to interrupt what you're doing.",
@@ -71,6 +72,8 @@ async fn do_soft_save_with_announcement() {
// .await; // .await;
run_rcon_command(["save-all"]).await; run_rcon_command(["save-all"]).await;
println!("Soft saving done.");
} }
async fn do_hard_save_with_announcement() { async fn do_hard_save_with_announcement() {
@@ -78,6 +81,8 @@ async fn do_hard_save_with_announcement() {
let duration = ten_seconds; let duration = ten_seconds;
let delay = tokio::spawn(sleep(duration)); let delay = tokio::spawn(sleep(duration));
println!("Hard saving...");
run_rcon_command([ run_rcon_command([
"say", "say",
"Hard saving in 10 seconds. Get to safety and pause your activities.", "Hard saving in 10 seconds. Get to safety and pause your activities.",
@@ -95,6 +100,8 @@ async fn do_hard_save_with_announcement() {
"The hard save has completed. We do this to lower crash risks. Thanks.", "The hard save has completed. We do this to lower crash risks. Thanks.",
]) ])
.await; .await;
println!("Hard saving done.");
} }
#[tokio::main] #[tokio::main]