1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-18 12:53:34 +02:00

Support challenges in A2S_INFO

This commit is contained in:
Pavel Djundik
2020-12-04 10:18:46 +02:00
parent fbabd440da
commit 7c8e5add77
+9 -1
View File
@@ -202,10 +202,18 @@
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
$Buffer = $this->Socket->Read( );
$Type = $Buffer->GetByte( );
$Server = [];
if( $Type === self::S2A_CHALLENGE )
{
$this->Challenge = $Buffer->Get( 4 );
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" . $this->Challenge );
$Buffer = $this->Socket->Read( );
$Type = $Buffer->GetByte( );
}
// Old GoldSource protocol, HLTV still uses it
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
{