From dc2652fc61373d5897adeda01d65e6e2a1ce71ae Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 13 Nov 2023 10:29:36 +0100 Subject: [PATCH] discord locks fix --- discord/report_new_matches.ps1 | 6 ++---- discord/report_to_discord.ps1 | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index d0cf5d3..77a1641 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -1,13 +1,11 @@ -. .\..\includes\ps1\lockfile.ps1 - -new-lock - if ($PSScriptRoot.length -eq 0) { $scriptroot = Get-Location } else { $scriptroot = $PSScriptRoot } +. $scriptroot\..\includes\ps1\lockfile.ps1 +new-lock $fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw diff --git a/discord/report_to_discord.ps1 b/discord/report_to_discord.ps1 index 2811502..4081a98 100644 --- a/discord/report_to_discord.ps1 +++ b/discord/report_to_discord.ps1 @@ -1,14 +1,11 @@ - -. .\..\includes\ps1\lockfile.ps1 - -new-lock - if ($PSScriptRoot.length -eq 0) { $scriptroot = Get-Location } else { $scriptroot = $PSScriptRoot } +. $scriptroot\..\includes\ps1\lockfile.ps1 +new-lock function IsValidEntry($entry) { return ($entry.KD_H -ne 'NaN' -and $entry.KD_ALL -ne 'NaN') -and ($entry.KD_H -ne 'Infinity' -and $entry.KD_ALL -ne 'Infinity')