X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FXmpp%2Fxmppmanager.php;h=c7d4c15dd6987568a8f182ab01a4d0acb0ef5637;hb=b6cfcfbcaa0459b39c5d581c103bfa031b2e02cd;hp=87d8186684d28a3f6119feba76c24b7f1e53ce05;hpb=c187bf55974347f7ddb4f28714af57861dce8f08;p=quix0rs-gnu-social.git
diff --git a/plugins/Xmpp/xmppmanager.php b/plugins/Xmpp/xmppmanager.php
index 87d8186684..c7d4c15dd6 100644
--- a/plugins/Xmpp/xmppmanager.php
+++ b/plugins/Xmpp/xmppmanager.php
@@ -29,16 +29,14 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
* In a multi-site queuedaemon.php run, one connection will be instantiated
* for each site being handled by the current process that has XMPP enabled.
*/
-
class XmppManager extends ImManager
{
protected $lastping = null;
protected $pingid = null;
public $conn = null;
-
+
const PING_INTERVAL = 120;
-
/**
* Initialize connection to server.
@@ -81,7 +79,7 @@ class XmppManager extends ImManager
*/
public function handleInput($socket)
{
- # Process the queue for as long as needed
+ // Process the queue for as long as needed
try {
common_log(LOG_DEBUG, "Servicing the XMPP queue.");
$this->stats('xmpp_process');
@@ -114,7 +112,7 @@ class XmppManager extends ImManager
*
* Side effect: kills process on exception from XMPP library.
*
- * @fixme non-dying error handling
+ * @todo FIXME: non-dying error handling
*/
public function idle($timeout=0)
{
@@ -165,6 +163,7 @@ class XmppManager extends ImManager
}
$this->conn->processUntil('session_start');
+ // TRANS: Presence announcement for XMPP.
$this->send_presence(_m('Send me a message to post a notice'), 'available', null, 'available', 100);
}
return $this->conn;
@@ -184,14 +183,14 @@ class XmppManager extends ImManager
}
common_log(LOG_DEBUG, "Sending ping #{$this->pingid}");
- $this->conn->send("");
+ $this->conn->send("");
$this->lastping = $now;
return true;
}
function handle_xmpp_message(&$pl)
{
- $this->plugin->enqueue_incoming_raw($pl);
+ $this->plugin->enqueueIncomingRaw($pl);
return true;
}
@@ -204,6 +203,7 @@ class XmppManager extends ImManager
common_log(LOG_NOTICE, 'XMPP reconnected');
$this->conn->processUntil('session_start');
+ // TRANS: Message for XMPP reconnect.
$this->send_presence(_m('Send me a message to post a notice'), 'available', null, 'available', 100);
}
@@ -245,7 +245,7 @@ class XmppManager extends ImManager
function special_presence($type, $to=null, $show=null, $status=null)
{
- // FIXME: why use this instead of send_presence()?
+ // @todo FIXME: why use this instead of send_presence()?
$this->connect();
if (!$this->conn || $this->conn->isDisconnected()) {
return false;