From 92e127e02ed40dd25cf0b2fc1694b55f34e771eb Mon Sep 17 00:00:00 2001 From: Fenhl Date: Tue, 19 Dec 2023 19:40:03 +0000 Subject: [PATCH] =?UTF-8?q?Crafatar=20no=20longer=20likes=20Discord=20?= =?UTF-8?q?=E2=80=94=20use=20Minotar=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crate/wurstminebot/src/lib.rs | 3 ++- crate/wurstminebot/src/log.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crate/wurstminebot/src/lib.rs b/crate/wurstminebot/src/lib.rs index 1c975d5..f38b054 100644 --- a/crate/wurstminebot/src/lib.rs +++ b/crate/wurstminebot/src/lib.rs @@ -38,7 +38,8 @@ pub const DEV: ChannelId = ChannelId::new(506905544901001228); /// The directory where all Wurstmineberg-related files are located: `/opt/wurstmineberg`. pub fn base_path() -> &'static Path { //TODO make this a constant when stable - Path::new("/opt/wurstmineberg") + #[cfg(unix)] { Path::new("/opt/wurstmineberg") } + #[cfg(windows)] { Path::new("C:/Users/fenhl/games/minecraft/srv/wmb") } // for testing } /// Errors that may occur in this crate. diff --git a/crate/wurstminebot/src/log.rs b/crate/wurstminebot/src/log.rs index 870a12f..9a688c6 100644 --- a/crate/wurstminebot/src/log.rs +++ b/crate/wurstminebot/src/log.rs @@ -241,7 +241,7 @@ pub async fn handle(ctx_fut: RwFuture) -> Result { //TODO async fn handle_world(ctx_fut: RwFuture, world: World) -> Result { let follower = follow(&world); pin_mut!(follower); - let mut player_uuids = HashMap::new(); //TODO persist across wurstminebot restarts? + let mut player_uuids = HashMap::<_, Uuid>::default(); //TODO persist across wurstminebot restarts? while let Some(line) = follower.try_next().await? { match line { Line::Regular { content, .. } => match content { @@ -253,7 +253,7 @@ async fn handle_world(ctx_fut: RwFuture, world: World) -> Result