Software /
code /
prosody
Comparison
core/modulemanager.lua @ 878:72a7eeaa9e58
Let global modules add disco features for all hosts
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 04 Mar 2009 22:23:41 +0500 |
parent | 876:fad020cead52 |
child | 896:2c0b9e3c11c3 |
comparison
equal
deleted
inserted
replaced
877:0bababc930dd | 878:72a7eeaa9e58 |
---|---|
298 reply:tag("feature", {var = feature}):up(); -- TODO cache | 298 reply:tag("feature", {var = feature}):up(); -- TODO cache |
299 done[feature] = true; | 299 done[feature] = true; |
300 end | 300 end |
301 end | 301 end |
302 end | 302 end |
303 for module, features in pairs(features_table:get("*") or NULL) do -- for each module | |
304 for feature in pairs(features) do | |
305 if not done[feature] then | |
306 reply:tag("feature", {var = feature}):up(); -- TODO cache | |
307 done[feature] = true; | |
308 end | |
309 end | |
310 end | |
303 return next(done) ~= nil; | 311 return next(done) ~= nil; |
304 end | 312 end |
305 end); | 313 end); |
306 | 314 |
307 function api:add_feature(xmlns) | 315 function api:add_feature(xmlns) |