mirror of
				https://github.com/onyx-and-iris/q3rcon-ps.git
				synced 2025-10-31 04:41:47 +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")) { |         if ($line -in @("fast_restart", "map_rotate", "map_restart")) { | ||||||
|             $cmd = $line -replace '(?:^|_)(\p{L})', { $_.Groups[1].Value.ToUpper() } |             $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 { |         else { | ||||||
|             $resp = $rcon.Send($line)  |             $rcon.Send($line) | ||||||
|         } |         } | ||||||
|         $resp | Write-Host |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user