-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from hjorslev/dev
Fix #7 - Rework so Get-SteamServerInfo uses Server queries -- !deploy !ver:MAJOR
- Loading branch information
Showing
19 changed files
with
370 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
# .NET coding convention settings for EditorConfig | ||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference | ||
# | ||
# This file comes from dotnet repositories: | ||
# https://github.com/dotnet/runtime/blob/master/.editorconfig | ||
# https://github.com/dotnet/roslyn/blob/master/.editorconfig | ||
|
||
# Top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8-bom | ||
# indent_size intentionally not specified in this section | ||
indent_style = space | ||
|
||
# Source code | ||
[*.{cs,ps1,psd1,psm1}] | ||
indent_size = 4 | ||
|
||
# Shell scripts | ||
[*.sh] | ||
indent_size = 4 | ||
|
||
# Xml project files | ||
[*.{csproj,resx,ps1xml}] | ||
indent_size = 2 | ||
|
||
# Data serialization | ||
[*.{json,yaml,yml}] | ||
indent_size = 2 | ||
|
||
# Markdown | ||
[*.md] | ||
indent_size = 2 | ||
|
||
# Xml files | ||
[*.{resx,ruleset,stylecop,xml,xsd,xsl}] | ||
indent_size = 2 | ||
|
||
# Xml config files | ||
[*.{props,targets,config,nuspec}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
{ | ||
"editor.tabSize": 4, | ||
"editor.autoIndent": "full", | ||
"editor.insertSpaces": true, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.renderWhitespace": "boundary", | ||
"editor.wordWrap": "off", | ||
"editor.detectIndentation": true, | ||
"files.trimTrailingWhitespace": true, | ||
"powershell.codeFormatting.preset": "OTBS", | ||
"powershell.scriptAnalysis.settingsPath": ".\\PSScriptAnalyzerSettings.psd1", | ||
} | ||
"editor.tabSize": 4, | ||
"editor.autoIndent": "full", | ||
"editor.insertSpaces": true, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.renderWhitespace": "boundary", | ||
"editor.detectIndentation": true, | ||
"files.trimTrailingWhitespace": true, | ||
"powershell.codeFormatting.preset": "OTBS", | ||
"powershell.scriptAnalysis.settingsPath": ".\\PSScriptAnalyzerSettings.psd1", | ||
"cSpell.words": [ | ||
"cmdlet" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
function Get-PacketString { | ||
<# | ||
.SYNOPSIS | ||
Get a string in a byte stream. | ||
.DESCRIPTION | ||
Get a string in a byte stream. | ||
.PARAMETER Stream | ||
Accepts BinaryReader. | ||
.EXAMPLE | ||
Get-PacketString -Stream $Stream | ||
Assumes that you already have a byte stream. See more detailed usage in | ||
Get-SteamServerInfo. | ||
.NOTES | ||
Author: Jordan Borean and Chris Dent | ||
#> | ||
|
||
[CmdletBinding()] | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[System.IO.BinaryReader]$Stream | ||
) | ||
|
||
process { | ||
# Find the end of the string, terminated with \0 and convert that byte range to a string. | ||
$stringBytes = while ($true) { | ||
$byte = $Stream.ReadByte() | ||
if ($byte -eq 0) { | ||
break | ||
} | ||
$byte | ||
} | ||
|
||
[System.Text.Encoding]::UTF8.GetString($stringBytes) | ||
} # Process | ||
} # Cmdlet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.