Skip to content

Commit

Permalink
Use challenge straight away if available
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Dec 4, 2020
1 parent 7c8e5ad commit 673e572
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion SourceQuery/SourceQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,15 @@ public function GetInfo( ) : array
throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
}

$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
if( $this->Challenge )
{
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" . $this->Challenge );
}
else
{
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
}

$Buffer = $this->Socket->Read( );
$Type = $Buffer->GetByte( );
$Server = [];
Expand Down

0 comments on commit 673e572

Please sign in to comment.