diff --git a/.gitignore b/.gitignore index 85637033..aef7d02e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /system/config.php .DS_Store .vscode/ -ui/compiled/*.php \ No newline at end of file +ui/compiled/*.php +ui/cache/*.php \ No newline at end of file diff --git a/system/autoload/PEAR2/Net/RouterOS/Client.php b/system/autoload/PEAR2/Net/RouterOS/Client.php index 88b13e56..cc1d136f 100644 --- a/system/autoload/PEAR2/Net/RouterOS/Client.php +++ b/system/autoload/PEAR2/Net/RouterOS/Client.php @@ -135,6 +135,11 @@ class Client $crypto = N::CRYPTO_OFF, $context = null ) { + if(strpos($host,":")>-1){ + $part = explode(":",$host); + $host = $part[0]; + $port = $part[1]; + } $this->com = new Communicator( $host, $port, @@ -151,7 +156,7 @@ class Client if ((!$persist || !($old = $this->com->getTransmitter()->lock(S::DIRECTION_ALL))) && $this->com->getTransmitter()->isFresh() - ) { + ) { if (!static::login($this->com, $username, $password, $timeout)) { $this->com->close(); throw new DataFlowException(