cf3209e1d0
Quick fix for PowerShell IE use Makes date readable for target player Resolved translation string inconsistencies Minor code cleanups Initial commit from review Cleaned up code & amended a few checks Comment typo Fix infinite unmuting Removed unnecessary checks (Unmuting an already unmuted player will not trigger MuteStateMeta creation (if already doesn't exist)) Resolved !listmutes showing expired mutes Committing before refactor Refactor from review Removed reference to AdditionalProperty Fix check for meta state when unmuting Continued request solves main problem Handle potential failed command execution Missed CommandExecuted onJoin Fix another PS Reference to Invoke-WebRequest Fixes review issues & Cleaned up code Adds support for Intercepting Commands via Plugin (Credit: @RaidMax) Comparing Revert formatting changes Removing MuteList for Penalty Added Mute, TempMute & Unmute Penalty Fixed reference in Mute.csproj & Removed ListMutesCommand.cs
24 lines
885 B
PowerShell
24 lines
885 B
PowerShell
param (
|
|
[string]$PublishDir = $(throw "-PublishDir is required.")
|
|
)
|
|
|
|
md -Force ("{0}\Localization" -f $PublishDir)
|
|
|
|
$localizations = @("en-US", "ru-RU", "es-EC", "pt-BR", "de-DE")
|
|
foreach($localization in $localizations)
|
|
{
|
|
$url = "http://api.raidmax.org:5000/localization/{0}" -f $localization
|
|
$filePath = "{0}\Localization\IW4MAdmin.{1}.json" -f $PublishDir, $localization
|
|
$response = Invoke-WebRequest $url -UseBasicParsing
|
|
Out-File -FilePath $filePath -InputObject $response.Content -Encoding utf8
|
|
}
|
|
|
|
$versionInfo = (Get-Command ("{0}\IW4MAdmin.exe" -f $PublishDir)).FileVersionInfo
|
|
$json = @{
|
|
Major = $versionInfo.ProductMajorPart
|
|
Minor = $versionInfo.ProductMinorPart
|
|
Build = $versionInfo.ProductBuildPart
|
|
Revision = $versionInfo.ProductPrivatePart
|
|
}
|
|
$json | ConvertTo-Json | Out-File -FilePath ("{0}\VersionInformation.json" -f $PublishDir) -Encoding ASCII
|