It appears that both (-band, -and) work the same in this case. It never displays the messages about "spectator port?" or "game tag?" Still not to sure about the EDF of 145. On some servers I see 10 bytes after the EDF, two for the gameport and eight for the steamID. On other servers there are only two bytes after the EDF, the gameport. The script displays the correct game port, not sure why that is included since I had to send the info_query to that port. Guess I should display the ABS of the server steam ID. The 2nd AppID displays ok. except on my lan test server. It does not send the byte.
if($EDF -band 0x80) # server game port { $i++ $portbyte1 = $receivebuffer[$i] $i++ $portbyte2 = $receivebuffer[$i] $2bytes = $portbyte1, $portbyte2 $info_gameport = [system.bitconverter]::ToInt16($2bytes,0) if($EDF -band 0x10) # server steam ID { $i++ $steamidbyte1 = $receivebuffer[$i] $i++ $steamidbyte2 = $receivebuffer[$i] $i++ $steamidbyte3 = $receivebuffer[$i] $i++ $steamidbyte4 = $receivebuffer[$i] $i++ $steamidbyte5 = $receivebuffer[$i] $i++ $steamidbyte6 = $receivebuffer[$i] $i++ $steamidbyte7 = $receivebuffer[$i] $i++ $steamidbyte8 = $receivebuffer[$i] $8bytes = $steamidbyte1,$steamidbyte2,$steamidbyte3,$steamidbyte4,$steamidbyte5,$steamidbyte6,$steamidbyte7,$steamidbyte8 $SteamID = [system.bitconverter]::toint16($8bytes,0) } if($EDF -band 0x40) # spectator port? { $null write-host "spectator port?" } if($EDF -band 0x20) # game tag? { $null write-host "game tag?" } if($EDF -band 0x01) # app ID two { $i++ [int16[]]$AppID2 = $receivebuffer[$i] } } output: Type: I Protocol Version: 48 Server Name: SC Test Server -DAL- [2815] Map: snark_pit Game Directory: SvenCoop4 Game Description: Sven Co-op 4.6 or later AppID: 70, 78 Number of players: 0 Maximum players: 24 Number of bots: 0 Dedicated: d OS: w Password: 1 Secure: 1 Game Version: 1.1.2.1 EDF: 145 gameport: 27015 SteamID: -10238 AppID2: 70 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux