X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=zncadmin%2FZNCServer.class.php;h=92e9c3f4da6dd15ee0eb6f08c43d419f765fe5d5;hb=a002a07957fe9d65ba856662aa95a5ab4b2697ae;hp=f85dd5607848db4c340006978b1f0ef6e9fd9f0a;hpb=af798c5febaeefd3cb1378438442522eaae8285f;p=ZNCAdmin.git diff --git a/zncadmin/ZNCServer.class.php b/zncadmin/ZNCServer.class.php index f85dd56..92e9c3f 100644 --- a/zncadmin/ZNCServer.class.php +++ b/zncadmin/ZNCServer.class.php @@ -1,19 +1,19 @@ . + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ define("ERR_OK", 0); @@ -24,6 +24,7 @@ define("ERR_UNKNOWN_ZNC_VERSION_OR_METHOD", 4); $zncserver_classes = array( "ZNCServerV0.class.php", + "ZNCServerV1.class.php", ); class ZNCServer { @@ -44,7 +45,7 @@ class ZNCServer { 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); @@ -81,7 +82,7 @@ class ZNCServer { $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;