X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=backend%2Fsrc%2Fvalheim_controller.rs;fp=backend%2Fsrc%2Fvalheim_controller.rs;h=33c532f20cabe09de0133f42b511eee9b6e8158d;hb=b0336a574d710ba48449d7330b332c18231df1c5;hp=6fa6c7ff996bbf1397a6968b9c341cd0d1b577bf;hpb=83993038d45c0d11c11417f9b47e19eb61e53928;p=valheim_web.git diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index 6fa6c7f..33c532f 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -38,11 +38,13 @@ impl ValheimExe { } pub fn format_active_players(&self) -> String { + /* Commented because the player list isn't correct (the number is). if self.active_players.len() == 0 { String::from("") } else { self.active_players.join(", ") - } + }*/ + self.active_players.len().to_string() } pub fn format_last_backup(&self) -> String { @@ -75,9 +77,14 @@ fn format_byte_size(bytes: u64, precision: usize) -> String { } const VALHEIM_PROCESS_NAME: &str = "valheim_server"; + +#[cfg(target_os = "linux")] const STRING_BEFORE_CHARACTER_NAME: &str = "Got character ZDOID from"; + +#[cfg(target_os = "linux")] const STRING_BEFORE_NB_OF_CONNECTIONS: &str = "Connections"; +// It doesn't work for the moment, it only scan the connection event and do not treat disconnections. #[cfg(target_os = "linux")] fn get_active_players() -> Vec { let mut journal =