Skip to content

Commit 673e572

Browse files
committed
Use challenge straight away if available
1 parent 7c8e5ad commit 673e572

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

SourceQuery/SourceQuery.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,15 @@ public function GetInfo( ) : array
200200
throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
201201
}
202202

203-
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
203+
if( $this->Challenge )
204+
{
205+
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" . $this->Challenge );
206+
}
207+
else
208+
{
209+
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
210+
}
211+
204212
$Buffer = $this->Socket->Read( );
205213
$Type = $Buffer->GetByte( );
206214
$Server = [];

0 commit comments

Comments
 (0)