From: Greg Burri Date: Fri, 8 Apr 2022 19:35:04 +0000 (+0200) Subject: Merge branch 'master' of gburri.org:valheim_web X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=e1d2ac7d318ed90b941bdc9911d6c22474c1f535;hp=aa59a1f9b79009079a5a1fbafd4f65d3130e9ee2;p=valheim_web.git Merge branch 'master' of gburri.org:valheim_web --- diff --git a/backend/build.rs b/backend/build.rs index be60465..012f651 100644 --- a/backend/build.rs +++ b/backend/build.rs @@ -41,6 +41,6 @@ fn main() { if !output.status.success() { // SASS will put the error in the file. let error = std::fs::read_to_string("./static/style.css").expect("unable to read style.css"); - panic!("{}", error); + panic!("Error from SASS: {}", error); } } diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index f92e63d..631f46b 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -37,11 +37,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 { @@ -81,6 +83,7 @@ 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 =