summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-17 09:43:31 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-17 09:43:31 -0400
commit753a03d895e60f3a59eb686fb9fc0278618cc924 (patch)
treee10056e7121847c9953b02ddfe37e5505a571190 /lib
parentfb6266265060202cb5e17cb2a03477b8c4559f68 (diff)
public indexers in config file
darcs-hash:20080717134331-84dde-b63c9b7e318d74e2cfea14cc962ec2d519f20d43.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php3
-rw-r--r--lib/jabber.php15
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 0203c2dea..a49806b05 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -73,7 +73,8 @@ $config =
'resource' => 'uniquename',
'password' => 'blahblahblah',
'host' => NULL, # only set if != server
- 'debug' => false), # print extra debug info
+ 'debug' => false, # print extra debug info
+ 'public' => array()), # JIDs of users who want to receive the public stream
);
$config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
diff --git a/lib/jabber.php b/lib/jabber.php
index d772cd92c..1e609377f 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -255,6 +255,21 @@ function jabber_broadcast_notice($notice) {
}
}
+ # Now, users who want everything
+
+ $public = common_config('xmpp', 'public');
+
+ # FIXME PRIV don't send out private messages here
+
+ if ($public) {
+ foreach ($public as $address) {
+ common_log(LOG_INFO,
+ 'Sending notice ' . $notice->id . ' to public listener ' . $address,
+ __FILE__);
+ jabber_send_notice($address, $notice);
+ }
+ }
+
return true;
}