mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-06-28 04:43:14 +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" );
|
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
|
||||||
$Buffer = $this->Socket->Read( );
|
$Buffer = $this->Socket->Read( );
|
||||||
|
|
||||||
$Type = $Buffer->GetByte( );
|
$Type = $Buffer->GetByte( );
|
||||||
$Server = [];
|
$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
|
// Old GoldSource protocol, HLTV still uses it
|
||||||
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
|
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user