Changeset 459 for trunk/jabberit_messenger/inc/class.jabber.inc.php
- Timestamp:
- 09/22/08 17:02:02 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/class.jabber.inc.php
r382 r459 103 103 $this->SendPacket("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n"); 104 104 105 sleep( 2);105 sleep(1); 106 106 107 107 if ($this->_check_connected()) … … 304 304 305 305 306 307 306 function StripJID($jid = NULL) 308 307 { … … 310 309 return ($temp[1] != "") ? $temp[1] : $jid; 311 310 } 312 313 311 314 312 … … 383 381 } 384 382 } 385 386 387 383 388 384 function SendError($to, $id = NULL, $error_number, $error_message = NULL) … … 399 395 } 400 396 401 397 function RosterGroups() 398 { 399 $roster_request_id = "roster_" . time(); 400 $incoming_array = $this->SendIq(NULL, 'get', $roster_request_id, "jabber:iq:roster"); 401 $groups = array(); 402 403 if (is_array($incoming_array)) 404 { 405 if ($incoming_array['iq']['@']['type'] == 'result' 406 && $incoming_array['iq']['@']['id'] == $roster_request_id 407 && $incoming_array['iq']['#']['query']['0']['@']['xmlns'] == "jabber:iq:roster") 408 { 409 $number_of_contacts = count($incoming_array['iq']['#']['query'][0]['#']['item']); 410 $this->roster = array(); 411 412 for ($a = 0; $a < $number_of_contacts; $a++) 413 $groups[] = $incoming_array['iq']['#']['query'][0]['#']['item'][$a]['#']['group'][0]['#']; 414 415 return $groups; 416 } 417 else 418 { 419 $this->AddToLog("ERROR: RosterGroups() #1"); 420 return FALSE; 421 } 422 } 423 else 424 { 425 $this->AddToLog("ERROR: RosterGroups() #2"); 426 return FALSE; 427 } 428 429 } 402 430 403 431 function RosterUpdate() … … 990 1018 991 1019 $this->SendPacket("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n"); 992 sleep( 2);1020 sleep(1); 993 1021 $incoming_array = $this->_listen_incoming(); 994 1022 … … 1018 1046 $this->SendPacket("<?xml version='1.0' encoding='UTF-8' ?" . ">\n"); 1019 1047 $this->SendPacket("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n"); 1020 sleep( 2);1048 sleep(1); 1021 1049 1022 1050 if (!$this->_check_connected()) … … 1753 1781 } 1754 1782 1755 1756 1757 1783 function AddPacketDetails($string, $value = NULL) 1758 1784 { … … 1777 1803 eval("\$this->nodes$node = \"" . htmlspecialchars($value) . "\";"); 1778 1804 } 1779 1780 1781 1805 1782 1806 function BuildPacket($array = NULL)
Note: See TracChangeset
for help on using the changeset viewer.