From 451fb82e544fda19888c4d5bc250431a3197cef6 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 22 Mar 2011 23:58:53 -0400 Subject: Bug #1203 --- docs/XMLRPC/xmlrpc.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'docs/XMLRPC/xmlrpc.php') diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index c75319259..cffc23a0c 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -1,5 +1,4 @@ Host = $Host; $this->Port = $Port; $this->Bind = $Bind; - $this->Username = $Username; - $this->Pass = $Pass; $this->Socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($Bind && socket_bind($this->Socket, $this->Bind) == false) $his->Socket = false; if (socket_connect($this->Socket, $this->Host, $this->Port) == false) $this->Socket = false; - - if ($Username && $Pass) - { - /* Login to XMLRPC, if required */ - $this->RunXMLRPC("login", array($Username, $Pass)); - } } function __destruct() @@ -52,10 +43,11 @@ class AnopeXMLRPC socket_write($this->Socket, $xmlquery); $inbuf = socket_read($this->Socket, 4096); - $inxmlrpc = xmlrpc_decode($inbuf); + $inbuf = substr($inbuf, strpos($inbuf, "\r\n\r\n") + 4); + $response = xmlrpc_decode($inbuf); - if (isset($inxmlrpc[0])) - return $inxmlrpc[0]; + if (isset($response[0])) + return $response[0]; return NULL; } -- cgit