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')