aboutsummaryrefslogtreecommitdiff
path: root/server/src/state.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-30 11:22:38 +0100
committermetamuffin <metamuffin@disroot.org>2025-10-30 11:22:38 +0100
commita85f6200517405918941cc64ba4b734e246bc411 (patch)
tree267f027215e38f5db55181cf3b9706962763cdfa /server/src/state.rs
parent269da6178e51f727a2b80a784e59981a13704df4 (diff)
downloadhurrycurry-a85f6200517405918941cc64ba4b734e246bc411.tar
hurrycurry-a85f6200517405918941cc64ba4b734e246bc411.tar.bz2
hurrycurry-a85f6200517405918941cc64ba4b734e246bc411.tar.zst
Configurable lobby map and inactivity kick timout (close #492)
Diffstat (limited to 'server/src/state.rs')
-rw-r--r--server/src/state.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/state.rs b/server/src/state.rs
index a42c1663..fc97a7d1 100644
--- a/server/src/state.rs
+++ b/server/src/state.rs
@@ -34,7 +34,7 @@ impl Server {
let mut idle_kick = Vec::new();
for (cid, conn) in &mut self.connections {
conn.last_player_input += dt;
- if conn.last_player_input > 60. {
+ if conn.last_player_input > self.config.inactivity_kick_timeout {
idle_kick.push(*cid);
}
}
@@ -201,7 +201,7 @@ impl Server {
.ok();
self.load(
self.index
- .generate_with_book("lobby")
+ .generate_with_book(&self.config.lobby)
.map_err(|m| tre!("s.error.map_load", s = format!("{m}")))?,
None,
);