set_error_handler('common_error_handler');
-class PublicQueueHandler extends XmppQueueHandler {
+class PublicQueueHandler extends XmppQueueHandler
+{
- function transport() {
+ function transport()
+ {
return 'public';
}
- function handle_notice($notice) {
+ function handle_notice($notice)
+ {
try {
return jabber_public_notice($notice);
} catch (XMPPHP_Exception $e) {
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);