Skip to content

Commit 5b848a2

Browse files
author
Bartek Chromebook
committed
Fixed examples/muc_log_bot.php - setting host in a script argument
1 parent da99565 commit 5b848a2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/muc_log_bot.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838

3939
if($argc < 5) {
40-
echo "Usage: $argv[0] jid pass [email protected] nickname\n";
40+
echo "Usage: $argv[0] host jid pass [email protected] nickname\n";
4141
exit;
4242
}
4343

@@ -47,8 +47,9 @@
4747
require_once 'jaxl.php';
4848
$client = new JAXL(array(
4949
// (required) credentials
50-
'jid' => $argv[1],
51-
'pass' => $argv[2],
50+
'jid' => $argv[2],
51+
'pass' => $argv[3],
52+
'host' => $argv[1],
5253
'log_level' => JAXL_INFO
5354
));
5455

@@ -62,7 +63,7 @@
6263
// add necessary event callbacks here
6364
//
6465

65-
$_room_full_jid = $argv[3]."/".$argv[4];
66+
$_room_full_jid = $argv[4]."/".$argv[5];
6667
$room_full_jid = new XMPPJid($_room_full_jid);
6768

6869
$client->add_cb('on_auth_success', function() {

0 commit comments

Comments
 (0)