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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user