summaryrefslogtreecommitdiff
path: root/scripts/xmppconfirmhandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmppconfirmhandler.php')
-rwxr-xr-xscripts/xmppconfirmhandler.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php
index c63498f55..6cb44ce09 100755
--- a/scripts/xmppconfirmhandler.php
+++ b/scripts/xmppconfirmhandler.php
@@ -48,8 +48,12 @@ class XmppConfirmHandler {
function start() {
# Low priority; we don't want to receive messages
$this->log(LOG_INFO, "INITIALIZE");
- $this->conn = jabber_connect($this->_id, NULL, -1);
- $this->conn->addEventHandler('message', 'forward_message', $this);
+ $this->conn = jabber_connect($this->_id);
+ if ($this->conn) {
+ $this->conn->addEventHandler('message', 'forward_message', $this);
+ $this->conn->addEventHandler('reconnect', 'handle_reconnect', $this);
+ jabber_send_presence("Send me a message to post an notice", 'available', NULL, 'available', -1);
+ }
return !is_null($this->conn);
}