From 5bf81862273168c181e560f8fad98bbc6e5a82bb Mon Sep 17 00:00:00 2001 From: Valentin Barat Date: Tue, 30 Jan 2024 23:47:59 +0100 Subject: [PATCH 1/2] Fixed map name --- Source/DiscordStatus.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/DiscordStatus.cs b/Source/DiscordStatus.cs index 0abb83a..bfb0274 100644 --- a/Source/DiscordStatus.cs +++ b/Source/DiscordStatus.cs @@ -26,7 +26,8 @@ public override async void Load(bool hotReload) { Server.NextFrame(() => { - _g.MapName = NativeAPI.GetMapName(); + if (string.IsNullOrEmpty(_g.MapName)) + _g.MapName = NativeAPI.GetMapName(); }); RegisterListeners(); if (!hotReload) From dc68eea157487a7edf4b80283bd566be8a339537 Mon Sep 17 00:00:00 2001 From: Valentin Barat Date: Wed, 31 Jan 2024 00:02:57 +0100 Subject: [PATCH 2/2] Fixed mapname update --- Source/Events.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Events.cs b/Source/Events.cs index 3e3153a..5ca3c67 100644 --- a/Source/Events.cs +++ b/Source/Events.cs @@ -43,10 +43,10 @@ private void OnMapStart(string mapName) else { DSLog.Log(1, $"Map {_g.MapName} changed to {mapName}!"); + _g.MapName = mapName; if (!_g.WConfig.NewMapNotification) return; var playercounts = Utilities.GetPlayers().Where(_chores.IsPlayerValid).Count(); _webhook.NewMap(mapName, playercounts); - _g.MapName = mapName; } }