Skip to content

Commit

Permalink
Merge branch 'fix/mapName' of github.com:edgegamers/DiscordStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Feb 25, 2024
2 parents 209e4ee + dc68eea commit 821e9ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/DiscordStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 821e9ed

Please sign in to comment.