diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-26 16:38:33 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-26 16:38:33 +0000 |
commit | 1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9 (patch) | |
tree | fb368f22ddc4ca85ba81b455cc05c756f533f6a1 /phpBB/includes/functions_messenger.php | |
parent | fda482ce2921bdaa5c5c61a1e288461701cea6b7 (diff) | |
download | forums-1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9.tar forums-1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9.tar.gz forums-1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9.tar.bz2 forums-1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9.tar.xz forums-1b32236b1ebbf046e84a435c97c7ed6bc9edd5f9.zip |
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
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r-- | phpBB/includes/functions_messenger.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index d4052a8968..01d8b4854f 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -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; } |