feat: custom bracket seeding

This commit is contained in:
2026-04-15 12:24:03 -04:00
Unverified
parent b1ac2c0855
commit 279671ca7f
4 changed files with 85 additions and 14 deletions

View File

@@ -1160,6 +1160,10 @@ impl Server {
}
}
}
"BRACKET_PAIRINGS" => {
let file = std::fs::read_to_string("bracket_pairings.txt").unwrap_or_default();
msg += file.replace("\n", ",").as_str();
}
"MOVE_WAIT" => {
let wait_time = *self.waiting_timeout.read().await as f64 / 1000f64;
msg += wait_time.to_string().as_str();
@@ -1212,6 +1216,14 @@ impl Server {
}
*self.max_timeout.write().await = (max_time.unwrap() * 1000.0) as u64;
}
"BRACKET_PAIRINGS" => {
let file = data_value.replace(",", "\n");
let result = std::fs::write("bracket_pairings.txt", file);
match result {
Ok(_) => (),
Err(_) => return Err(anyhow::anyhow!("ERROR:INVALID:SET")),
}
}
&_ => return Err(anyhow::anyhow!("ERROR:INVALID:SET")),
}