Added check for bans.txt file.

This commit is contained in:
2024-12-23 14:35:13 +03:00
parent 39a55edced
commit e98bd53b44

View File

@@ -1,4 +1,4 @@
# wDayzManager v0.5
# wDayzManager v0.6
# Copyright (c) 2024 Vladislav Salikov aka W0LF aka 'dreamforce'
# https://github.com/dreamforceinc
# Required module: PSIni
@@ -333,7 +333,11 @@ foreach ($srv in $servers) {
Write-Warning "Please make shure the config file `"$($instance).cfg`" in `"$($becLocation)\Config\`" folder is valid!"
Exit
}
if (-not (Test-Path -Path "$($serverProfile)\BattlEye\bans.txt")) {
Copy-Item -Path "$($serverLocation)\ban.txt" -Destination "$($serverProfile)\BattlEye\bans.txt" -ErrorAction Stop
}
$bec = "`"$($becLocation)\bec.exe`""
$becArguments = "-f `"$($instance).cfg`" --dsc"
}