updates
This commit is contained in:
parent
246ab2be65
commit
59ef4d670c
2 changed files with 5 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
Start-Transcript -Path '/var/log/dtch/report_new_matches.log' -Append
|
||||
Start-Transcript -Path '/var/log/dtch/report_new_matches.log' -Append
|
||||
|
||||
if ($PSScriptRoot.length -eq 0) {
|
||||
$scriptroot = Get-Location
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ else {
|
|||
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
|
||||
|
||||
##SETTINGS
|
||||
$monthsback = -1 # how many months back to look for matches
|
||||
##END OF SETTINGS
|
||||
function Get-Change {
|
||||
param (
|
||||
[double]$OldWinRatio,
|
||||
|
|
@ -142,7 +143,7 @@ foreach ($player in $all_player_matches) {
|
|||
|
||||
$killstats = @()
|
||||
$matchfiles = Get-ChildItem "$scriptroot/../data/killstats/" -File -Filter *.json
|
||||
$last_month = (get-date).AddMonths(-1)
|
||||
$last_month = (get-date).AddMonths($monthsback)
|
||||
foreach ($file in $matchfiles) {
|
||||
$json = get-content $file | ConvertFrom-Json
|
||||
if ($json.created -gt $last_month) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue