- $this->conn = jabber_connect($this->_id);
- if ($this->conn) {
- $this->conn->addEventHandler('message', 'forward_message', $this);
- $this->conn->addEventHandler('reconnect', 'handle_reconnect', $this);
- $this->conn->setReconnectTimeout(600);
- jabber_send_presence("Send me a message to post a notice", 'available', null, 'available', -1);
+ $this->conn = jabber_connect($this->_id.$this->transport());
+
+ if (empty($this->conn)) {
+ $this->log(LOG_ERR, "Couldn't connect to server.");
+ return false;