From 70c238b2cf0bada99cadab4d74edadf48ccbb177 Mon Sep 17 00:00:00 2001 From: Lanta <43404397+OpzekerIT@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:25:33 +0200 Subject: [PATCH 1/3] Update report_new_matches.ps1 --- discord/report_new_matches.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index a996bed..c4de6c9 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -1,3 +1,6 @@ +. .\..\includes\ps1\lockfile.ps1 + +new-lock if ($PSScriptRoot.length -eq 0) { $scriptroot = Get-Location @@ -151,3 +154,5 @@ $newJson = $player_matches | ConvertTo-Json -Depth 100 # Display the updated JSON $newJson | out-file "$scriptroot/../data/player_matches.json" + +remove-lock \ No newline at end of file From e0cc2476484da27b1e34877dfbce760815b14f6e Mon Sep 17 00:00:00 2001 From: Lanta <43404397+OpzekerIT@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:26:03 +0200 Subject: [PATCH 2/3] Update report_to_discord.ps1 --- discord/report_to_discord.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discord/report_to_discord.ps1 b/discord/report_to_discord.ps1 index c246261..d4e2f11 100644 --- a/discord/report_to_discord.ps1 +++ b/discord/report_to_discord.ps1 @@ -1,4 +1,7 @@ +. .\..\includes\ps1\lockfile.ps1 + +new-lock if ($PSScriptRoot.length -eq 0) { $scriptroot = Get-Location @@ -98,4 +101,5 @@ $payload = [PSCustomObject]@{ } -Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json' \ No newline at end of file +Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json' +remove-lock \ No newline at end of file From d9984106b44709293245abbeafb0f374eeadd3c7 Mon Sep 17 00:00:00 2001 From: Lanta <43404397+OpzekerIT@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:06:54 +0200 Subject: [PATCH 3/3] Update report_new_matches.ps1 --- discord/report_new_matches.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index c4de6c9..a4ed1f2 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -94,7 +94,7 @@ map $($map_map[$winmatches[0].mapName]) 'Human Kills' = "$(($telemetry | Where-Object { $_._T -eq 'LOGPLAYERKILLV2' -and $_.killer.name -eq $player -and $_.victim.accountId -notlike "ai.*" }).count)" 'Dmg' = "$([math]::Round(($all_winners_of_match | Where-Object { $_.name -eq $player }).damageDealt))" 'Kills' = "$(($all_winners_of_match | Where-Object { $_.name -eq $player }).kills)" - 'alive minutes' = "$([math]::Round((($all_winners_of_match | Where-Object { $_.name -eq $player }).timeSurvived /60 )))" + 'alive' = "$([math]::Round((($all_winners_of_match | Where-Object { $_.name -eq $player }).timeSurvived /60 )))" } $teamdmg = $telemetry | Where-Object { $_._T -eq 'LOGPLAYERTAKEDAMAGE' -and