Mercurial > prosody-modules
comparison mod_pubsub_feeds/mod_pubsub_feeds.lua @ 763:bcf0c9fff512
mod_pubsub_feeds: Depend on pubsub instead of aborting if it's not loaded
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Aug 2012 16:08:54 +0200 |
parents | 0a06cf46c263 |
children | 82d292e4f30f |
comparison
equal
deleted
inserted
replaced
762:0a06cf46c263 | 763:bcf0c9fff512 |
---|---|
14 -- | 14 -- |
15 -- Reference | 15 -- Reference |
16 -- http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html | 16 -- http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html |
17 | 17 |
18 local modules = hosts[module.host].modules; | 18 local modules = hosts[module.host].modules; |
19 if not modules.pubsub or module:get_option("component_module") ~= "pubsub" then | 19 module:depends"pubsub"; |
20 module:log("warn", "Pubsub needs to be loaded on this host"); | |
21 --module:log("debug", "component_module is %s", tostring(module:get_option("component_module"))); | |
22 return | |
23 end | |
24 | 20 |
25 local date, time = os.date, os.time; | 21 local date, time = os.date, os.time; |
26 local dt_parse, dt_datetime = require "util.datetime".parse, require "util.datetime".datetime; | 22 local dt_parse, dt_datetime = require "util.datetime".parse, require "util.datetime".datetime; |
27 local uuid = require "util.uuid".generate; | 23 local uuid = require "util.uuid".generate; |
28 local hmac_sha1 = require "util.hmac".sha1; | 24 local hmac_sha1 = require "util.hmac".sha1; |