projects
/
ZNCAdmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
91a6363
)
first cahnges
author
NurPech
<nurpech@nurpech.de>
Sun, 27 Jan 2013 14:31:36 +0000
(15:31 +0100)
committer
NurPech
<nurpech@nurpech.de>
Sun, 27 Jan 2013 14:31:36 +0000
(15:31 +0100)
zncadmin/ZNCServer.class.php
patch
|
blob
|
history
diff --git
a/zncadmin/ZNCServer.class.php
b/zncadmin/ZNCServer.class.php
index d001947fcf7c2f67f9a088919c805c99c870846a..d019be005b9925b292bb6ab19a093993e5ff6537 100644
(file)
--- a/
zncadmin/ZNCServer.class.php
+++ b/
zncadmin/ZNCServer.class.php
@@
-45,7
+45,7
@@
class ZNCServer {
}
public function getUserList() {
}
public function getUserList() {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/listusers");
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/listusers");
$exp = explode('<div class="toptable">', $html);
$exp = explode('</div>', $exp[1]);
$exp = explode('<tbody>', $exp[0]);
$exp = explode('<div class="toptable">', $html);
$exp = explode('</div>', $exp[1]);
$exp = explode('<tbody>', $exp[0]);
@@
-69,7
+69,7
@@
class ZNCServer {
}
public function getSeenList() {
}
public function getSeenList() {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/lastseen/");
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
lastseen/");
$exp = explode('<div class="toptable">', $html);
$exp = explode('</div>', $exp[1]);
$exp = explode('<tbody>', $exp[0]);
$exp = explode('<div class="toptable">', $html);
$exp = explode('</div>', $exp[1]);
$exp = explode('<tbody>', $exp[0]);
@@
-99,7
+99,7
@@
class ZNCServer {
ident
*/
public function addZNC($username, $password, $settings, $servers, $modules, $others) {
ident
*/
public function addZNC($username, $password, $settings, $servers, $modules, $others) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/adduser");
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/adduser");
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
$csrf = $exp[0];
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
$csrf = $exp[0];
@@
-124,12
+124,12
@@
class ZNCServer {
foreach($others as $name => $value) {
$post[$name] = $value;
}
foreach($others as $name => $value) {
$post[$name] = $value;
}
- $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/webadmin/adduser", $post);
+ $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/
global/
webadmin/adduser", $post);
return !preg_match("/Invalid Submission/i", $html);
}
public function delZNC($username) {
return !preg_match("/Invalid Submission/i", $html);
}
public function delZNC($username) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/deluser?user=".$username);
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/deluser?user=".$username);
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
$csrf = $exp[0];
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
$csrf = $exp[0];
@@
-137,7
+137,7
@@
class ZNCServer {
$post['_CSRF_Check'] = $csrf;
$post['submitted'] = '1';
$post['user'] = $username;
$post['_CSRF_Check'] = $csrf;
$post['submitted'] = '1';
$post['user'] = $username;
- $this->connector->post("http://".$this->host.":".$this->port."/mods/webadmin/deluser", $post);
+ $this->connector->post("http://".$this->host.":".$this->port."/mods/
global/
webadmin/deluser", $post);
}
private function parseHTMLFields($html, &$post) {
}
private function parseHTMLFields($html, &$post) {
@@
-256,7
+256,7
@@
class ZNCServer {
}
public function editZNC($username, $password = NULL, $new_servers = NULL, $add_modules = NULL, $del_modules = NULL, $others = NULL) {
}
public function editZNC($username, $password = NULL, $new_servers = NULL, $add_modules = NULL, $del_modules = NULL, $others = NULL) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/edituser?user=".$username);
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/edituser?user=".$username);
if(preg_match("/No such username/i", $html)) return false;
$post = array();
$post['loadmod'] = array();
if(preg_match("/No such username/i", $html)) return false;
$post = array();
$post['loadmod'] = array();
@@
-282,12
+282,12
@@
class ZNCServer {
foreach($others as $name => $value) {
$post[$name] = $value;
}
foreach($others as $name => $value) {
$post[$name] = $value;
}
- $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/webadmin/edituser?user=".$username, $post);
+ $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/
global/
webadmin/edituser?user=".$username, $post);
return !preg_match("/Invalid Submission/i", $html);
}
public function blockZNC($username, $block) {
return !preg_match("/Invalid Submission/i", $html);
}
public function blockZNC($username, $block) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/edituser?user=".$username);
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/edituser?user=".$username);
if(preg_match("/No such username/i", $html)) return ERR_USER_NOT_FOUND;
$post = array();
$post['loadmod'] = array();
if(preg_match("/No such username/i", $html)) return ERR_USER_NOT_FOUND;
$post = array();
$post['loadmod'] = array();
@@
-298,12
+298,12
@@
class ZNCServer {
if(!$block) {
$post['doconnect'] = 1;
}
if(!$block) {
$post['doconnect'] = 1;
}
- $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/webadmin/edituser?user=".$username, $post);
+ $html = $this->connector->post("http://".$this->host.":".$this->port."/mods/
global/
webadmin/edituser?user=".$username, $post);
return (preg_match("/Invalid Submission/i", $html) ? ERR_UNKNOWN : ERR_OK);
}
public function simulZNC($username, $raw, &$errmsg, $server = true) {
return (preg_match("/Invalid Submission/i", $html) ? ERR_UNKNOWN : ERR_OK);
}
public function simulZNC($username, $raw, &$errmsg, $server = true) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/send_raw/");
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
user/
send_raw/");
if(preg_match("/Not Found/i", $html)) return ERR_MODULE_NOT_FOUND;
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
if(preg_match("/Not Found/i", $html)) return ERR_MODULE_NOT_FOUND;
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
@@
-314,12
+314,12
@@
class ZNCServer {
$post['user'] = $username;
$post['send_to'] = ($server ? "server" : "client");
$post['line'] = $raw;
$post['user'] = $username;
$post['send_to'] = ($server ? "server" : "client");
$post['line'] = $raw;
- $this->connector->post("http://".$this->host.":".$this->port."/mods/send_raw/", $post);
+ $this->connector->post("http://".$this->host.":".$this->port."/mods/
user/
send_raw/", $post);
return ERR_OK;
}
public function addChan($username, $channel, $key = NULL, $buffer = NULL) {
return ERR_OK;
}
public function addChan($username, $channel, $key = NULL, $buffer = NULL) {
- $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/webadmin/addchan?user=".$username);
+ $html = $this->connector->get("http://".$this->host.":".$this->port."/mods/
global/
webadmin/addchan?user=".$username);
if(preg_match("/No such username/i", $html)) return false;
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
if(preg_match("/No such username/i", $html)) return false;
$exp = explode('name="_CSRF_Check" value="', $html);
$exp = explode('"', $exp[1]);
@@
-338,7
+338,7
@@
class ZNCServer {
$default_buffer = $exp[0];
$post['buffercount'] = ($buffer ? $buffer : $default_buffer);
$post['save'] = 'true';
$default_buffer = $exp[0];
$post['buffercount'] = ($buffer ? $buffer : $default_buffer);
$post['save'] = 'true';
- $this->connector->post("http://".$this->host.":".$this->port."/mods/webadmin/addchan?user=".$username, $post);
+ $this->connector->post("http://".$this->host.":".$this->port."/mods/
global/
webadmin/addchan?user=".$username, $post);
}
}
}
}