commit
4a71a193f3
2 changed files with 4 additions and 11 deletions
|
|
@ -389,5 +389,4 @@ foreach ($file in $difference) {
|
||||||
}
|
}
|
||||||
write-output "Operation complete"
|
write-output "Operation complete"
|
||||||
remove-lock
|
remove-lock
|
||||||
$Error
|
|
||||||
Stop-Transcript
|
Stop-Transcript
|
||||||
|
|
@ -23,15 +23,10 @@ else {
|
||||||
Write-Output "API Key not found"
|
Write-Output "API Key not found"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fileContent -match "\`$clanmembers\s*=\s*array\(([^)]+)\)") {
|
|
||||||
# Remove quotes and split by comma to get individual members
|
$clanMembersArray = (get-content "$scriptroot/../config/clanmembers.json" | convertfrom-json).clanMembers
|
||||||
$clanMembers = ($matches[1] -replace '"|\'', '' -split ","').replace(" ", "")
|
$clanMembers = $clanMembersArray -join ','
|
||||||
$clanMembersArray = $clanMembers.split(",").trim()
|
|
||||||
Write-Output "Clan Members: $($clanMembersArray -join ', ')"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Output "Clan members not found"
|
|
||||||
}
|
|
||||||
if ($clanMembersArray.count -gt 10 ) {
|
if ($clanMembersArray.count -gt 10 ) {
|
||||||
write-output "Currently not able to process more then 10 players"
|
write-output "Currently not able to process more then 10 players"
|
||||||
exit
|
exit
|
||||||
|
|
@ -131,5 +126,4 @@ $lifetimestats['updated'] = $formattedString
|
||||||
|
|
||||||
$lifetimestats | convertto-json -Depth 100 | out-file "$scriptroot/../data/player_lifetime_data.json"
|
$lifetimestats | convertto-json -Depth 100 | out-file "$scriptroot/../data/player_lifetime_data.json"
|
||||||
remove-lock
|
remove-lock
|
||||||
$Error
|
|
||||||
Stop-Transcript
|
Stop-Transcript
|
||||||
Loading…
Add table
Add a link
Reference in a new issue