diff options
author | Adam <Adam@anope.org> | 2010-12-10 15:34:52 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:04 -0500 |
commit | 2a4d0e3e898f1ee2395b5e83198d68a5e646a640 (patch) | |
tree | 3c2b4cc157c04e97e5db2b136bac4b81e55d3978 /docs/XMLRPC | |
parent | 9f7a2e4da2c9917ae7a0fb2729609ef03093a312 (diff) |
Allow getting users opertype from XMLRPC requests
Diffstat (limited to 'docs/XMLRPC')
-rw-r--r-- | docs/XMLRPC/xmlrpc.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index 768fcd449..31f174172 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -30,9 +30,7 @@ class AnopeXMLRPC if ($Username && $Pass) { /* Login to XMLRPC, if required */ - $query = array("login", array($Username, $Pass)); - $xmlquery = xmlrpc_encode_request($query); - socket_write($this->Socket, $xmlquery); + $this->RunXMLRPC("login", array($Username, $Pass)); } } @@ -48,7 +46,7 @@ class AnopeXMLRPC * Note that $params["id"] is reserved for query ID, you may set it to something if you wish. * If you do, the same ID will be passed back with the reply from Anope. */ - private function RunXMLRPC($name, $params) + function RunXMLRPC($name, $params) { $xmlquery = xmlrpc_encode_request($name, $params); socket_write($this->Socket, $xmlquery); @@ -97,14 +95,14 @@ class AnopeXMLRPC */ function DoChannel($Channel) { - return $this->RunXMLRPC("channel"); + return $this->RunXMLRPC("channel", NULL); } /* Like DoChannel(), but different. */ function DoUser($User) { - return $this->RunXMLRPC("channel", array($User)); + return $this->RunXMLRPC("user", array($User)); } } |