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

Initialize rcon only when setting rcon password

This commit is contained in:
xPaw
2014-10-20 17:05:10 +03:00
parent 77d8a3aba1
commit ed5a98cb23
+18 -16
View File
@@ -148,22 +148,6 @@
}
$this->Connected = true;
switch( $this->Socket->Engine )
{
case SourceQuery :: GOLDSOURCE:
{
$this->Rcon = new SourceQueryGoldSourceRcon( $this->Buffer, $this->Socket );
break;
}
case SourceQuery :: SOURCE:
{
$this->Rcon = new SourceQuerySourceRcon( $this->Buffer, $this->Socket );
break;
}
}
}
/**
@@ -197,6 +181,8 @@
if( $this->Rcon )
{
$this->Rcon->Close( );
$this->Rcon = null;
}
}
@@ -537,6 +523,22 @@
return false;
}
switch( $this->Socket->Engine )
{
case SourceQuery :: GOLDSOURCE:
{
$this->Rcon = new SourceQueryGoldSourceRcon( $this->Buffer, $this->Socket );
break;
}
case SourceQuery :: SOURCE:
{
$this->Rcon = new SourceQuerySourceRcon( $this->Buffer, $this->Socket );
break;
}
}
$this->Rcon->Open( );
return $this->Rcon->Authorize( $Password );