Merge pull request #104 from OpzekerIT/dev

update
This commit is contained in:
Lanta 2023-11-14 10:30:11 +01:00 committed by GitHub
commit 2c1c55fbae
2 changed files with 4 additions and 11 deletions

View file

@ -389,5 +389,4 @@ foreach ($file in $difference) {
}
write-output "Operation complete"
remove-lock
$Error
Stop-Transcript

View file

@ -23,15 +23,10 @@ else {
Write-Output "API Key not found"
}
if ($fileContent -match "\`$clanmembers\s*=\s*array\(([^)]+)\)") {
# Remove quotes and split by comma to get individual members
$clanMembers = ($matches[1] -replace '"|\'', '' -split ","').replace(" ", "")
$clanMembersArray = $clanMembers.split(",").trim()
Write-Output "Clan Members: $($clanMembersArray -join ', ')"
}
else {
Write-Output "Clan members not found"
}
$clanMembersArray = (get-content "$scriptroot/../config/clanmembers.json" | convertfrom-json).clanMembers
$clanMembers = $clanMembersArray -join ','
if ($clanMembersArray.count -gt 10 ) {
write-output "Currently not able to process more then 10 players"
exit
@ -131,5 +126,4 @@ $lifetimestats['updated'] = $formattedString
$lifetimestats | convertto-json -Depth 100 | out-file "$scriptroot/../data/player_lifetime_data.json"
remove-lock
$Error
Stop-Transcript