summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-06-25 06:57:00 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-06-25 06:57:00 +0000
commite872ca5bfa01f8f3c0142d7a618d8069690d6a23 (patch)
tree35b98251728b88155ad69c4dc84b8eb1f22d32bc /scripts/xmppdaemon.php
parentfcb43dd7112740284d2c1cb2708ac6a8a135cbdb (diff)
parent246013d984245737983054abf7496aa3879cfc58 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index 661631937..3eecfec29 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -20,13 +20,13 @@
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-$shortoptions = 'r::';
-$longoptions = array('resource::');
+$shortoptions = 'i::';
+$longoptions = array('id::');
$helptext = <<<END_OF_XMPP_HELP
Daemon script for receiving new notices from Jabber users.
- -r --resource Jabber Resource ID (default to config)
+ -i --id Identity (default none)
END_OF_XMPP_HELP;
@@ -52,7 +52,7 @@ class XMPPDaemon extends Daemon
}
if ($resource) {
- $this->resource = $resource;
+ $this->resource = $resource . 'daemon';
} else {
$this->resource = common_config('xmpp', 'resource') . 'daemon';
}
@@ -323,16 +323,16 @@ if (common_config('xmpp','enabled')==false) {
exit();
}
-if (have_option('r')) {
- $resource = get_option_value('r');
-} else if (have_option('--resource')) {
- $resource = get_option_value('--resource');
+if (have_option('i')) {
+ $id = get_option_value('i');
+} else if (have_option('--id')) {
+ $id = get_option_value('--id');
} else if (count($args) > 0) {
- $resource = $args[0];
+ $id = $args[0];
} else {
- $resource = null;
+ $id = null;
}
-$daemon = new XMPPDaemon($resource);
+$daemon = new XMPPDaemon($id);
$daemon->runOnce();