public function ZNCServer($host, $port, $version = null) {
$this->host = $host;
$this->port = $port;
- if(is_empty(self::$zncserver_classes))
+ if(empty(self::$zncserver_classes))
self::load_classes();
if($version !== null) {
$this->loadServerObject($version);
$logged_in = !preg_match("/errorbar/i", $http);
/* Version detection */
- if(preg_match("ZNC ([0-9]+\.[0-9]+)", $http, $version_match))
+ if(preg_match("#ZNC ([0-9]+\.[0-9]+)#", $http, $version_match))
$this->loadServerObject($version_match[1], $connector);
return $logged_in;