1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

hopefully not too late in the game. Checked in new jabber class (the class done by the flyspray project). It would be nice if this could be tested with more servers - jabber.org seems to work fine...

- other fixes


git-svn-id: file:///svn/phpbb/trunk@7687 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-05-26 16:38:33 +00:00
parent fda482ce29
commit 1b32236b1e
31 changed files with 681 additions and 1392 deletions

View File

@@ -458,7 +458,7 @@ class messenger
if (!$use_queue)
{
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password']);
if (!$this->jabber->connect())
{
@@ -466,19 +466,17 @@ class messenger
return false;
}
if (!$this->jabber->send_auth())
if (!$this->jabber->login())
{
$this->error('JABBER', 'Could not authorise on Jabber server<br />' . $this->jabber->get_log());
return false;
}
$this->jabber->send_presence(NULL, NULL, 'online');
foreach ($addresses as $address)
{
$this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg, 'subject' => $this->subject));
$this->jabber->send_message($address, $this->msg, $this->subject);
}
sleep(1);
$this->jabber->disconnect();
}
else
@@ -592,7 +590,7 @@ class queue
}
include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']);
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password']);
if (!$this->jabber->connect())
{
@@ -600,12 +598,11 @@ class queue
continue 2;
}
if (!$this->jabber->send_auth())
if (!$this->jabber->login())
{
messenger::error('JABBER', 'Could not authorise on Jabber server');
continue 2;
}
$this->jabber->send_presence(NULL, NULL, 'online');
break;
@@ -647,7 +644,7 @@ class queue
case 'jabber':
foreach ($addresses as $address)
{
if ($this->jabber->send_message($address, 'normal', NULL, array('body' => $msg, 'subject' => $subject)) === false)
if ($this->jabber->send_message($address, $msg, $subject) === false)
{
messenger::error('JABBER', $this->jabber->get_log());
continue 3;
@@ -669,7 +666,6 @@ class queue
case 'jabber':
// Hang about a couple of secs to ensure the messages are
// handled, then disconnect
sleep(1);
$this->jabber->disconnect();
break;
}