mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 15:45:34 +02:00
Add jabber port, ignore queue lock if older than queue_interval ... probably means it didn't complete (this queue business may cause us problems ...)
git-svn-id: file:///svn/phpbb/trunk@4591 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
a175297e14
commit
abf3cadc48
@ -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;
|
||||
}
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user