mirror of
https://github.com/onyx-and-iris/q3rcon-ps.git
synced 2025-01-18 08:40:52 +00:00
if we're changing maps, use SetMap()
This commit is contained in:
parent
7683665c7c
commit
fdf83415d4
@ -14,12 +14,15 @@ Function Read-HostUntilEmpty {
|
||||
|
||||
if ($line -in @("fast_restart", "map_rotate", "map_restart")) {
|
||||
$cmd = $line -replace '(?:^|_)(\p{L})', { $_.Groups[1].Value.ToUpper() }
|
||||
$resp = $rcon.$cmd()
|
||||
$rcon.$cmd()
|
||||
}
|
||||
elseif ($line.StartsWith("map mp_")) {
|
||||
$mapname = $line.Split()[1]
|
||||
$rcon.SetMap($mapname)
|
||||
}
|
||||
else {
|
||||
$resp = $rcon.Send($line)
|
||||
$rcon.Send($line)
|
||||
}
|
||||
$resp | Write-Host
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user