diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 28cd796507..f2819f91be 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -336,6 +336,7 @@ class messenger $this->jabber = new Jabber; $this->jabber->server = $config['jab_host']; + $this->jabber->port = ($config['jab_port']) ? $config['jab_port'] : 5222; $this->jabber->username = $config['jab_username']; $this->jabber->password = $config['jab_password']; $this->jabber->resource = (!empty($config['jab_resource'])) ? htmlentities($config['jab_resource']) : ''; @@ -358,7 +359,7 @@ class messenger $this->jabber->SendMessage($address, 'normal', NULL, array('body' => $msg)); } - $this->jabber->CruiseControl(2); + sleep(1); $this->jabber->Disconnect(); } else @@ -409,7 +410,7 @@ class queue set_config('last_queue_run', time()); - if (!file_exists($this->cache_file) || file_exists($this->cache_file . '.lock')) + if (!file_exists($this->cache_file) || (file_exists($this->cache_file . '.lock') && filemtime($this->cache_file) > time() - $config['queue_interval'])) { return; } @@ -449,6 +450,7 @@ class queue $this->jabber = new Jabber; $this->jabber->server = $config['jab_host']; + $this->jabber->port = ($config['jab_port']) ? $config['jab_port'] : 5222; $this->jabber->username = $config['jab_username']; $this->jabber->password = $config['jab_password']; $this->jabber->resource = (!empty($config['jab_resource'])) ? htmlentities($config['jab_resource']) : ''; @@ -515,7 +517,7 @@ class queue case 'jabber': // Hang about a couple of secs to ensure the messages are // handled, then disconnect - $this->jabber->CruiseControl(2); + sleep(1); $this->jabber->Disconnect(); break; } diff --git a/phpBB/language/en/lang_admin.php b/phpBB/language/en/lang_admin.php index d38e62ae36..6e3f53a2c2 100644 --- a/phpBB/language/en/lang_admin.php +++ b/phpBB/language/en/lang_admin.php @@ -521,6 +521,7 @@ $lang += array( 'JAB_SERVER' => 'Jabber server', 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers', 'JAB_PORT' => 'Jabber port', + 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not 5222', 'JAB_USERNAME' => 'Jabber username', 'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.', 'JAB_PASSWORD' => 'Jabber password',