X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=zncadmin%2FZNCServerV1.class.php;fp=zncadmin%2FZNCServerV1.class.php;h=e18976736eab737ddaeac17061c1ce4de5c8363b;hb=34f4e7d4085055bdaf8b866862bdf8f3f9fc2cae;hp=59bbfd6e25f602d688b59b9ed44315f94d65e52e;hpb=f56580e7ae0d04ad848473102b91b445122a9eb7;p=ZNCAdmin.git diff --git a/zncadmin/ZNCServerV1.class.php b/zncadmin/ZNCServerV1.class.php index 59bbfd6..e189767 100644 --- a/zncadmin/ZNCServerV1.class.php +++ b/zncadmin/ZNCServerV1.class.php @@ -1,37 +1,37 @@ . + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ $classinfo = array( - "name" => "ZNCServerV1", - "version" => 1.000, + "name" => "ZNCServerV1", + "version" => 1.000, ); class ZNCServerV1 { - private $host, $port; - private $connector; - - public function ZNCServerV1($host, $port, $connector = NULL) { - $this->host = $host; - $this->port = $port; - if($connector == NULL) - $connector = new HTTPConnector(); - $this->connector = $connector; - } + private $host, $port; + private $connector; + + public function ZNCServerV1($host, $port, $connector = NULL) { + $this->host = $host; + $this->port = $port; + if($connector == NULL) + $connector = new HTTPConnector(); + $this->connector = $connector; + } public function login($user, $pass) { $post = array( @@ -92,6 +92,10 @@ class ZNCServerV1 { return $seenlist; } + public function getTrafficStats() { + $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/global/webadmin/traffic"); + } + /* $settings array elements: nick @@ -391,7 +395,7 @@ class ZNCServerV1 { $post['autoclearchanbuffer'] = 'true'; $this->connector->post("http://".$this->host.":".$this->port."/mods/global/webadmin/addchan?user=".$username.'&network=default', $post); } - + } ?> \ No newline at end of file