Changeset

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
parents 877:0bababc930dd
children 879:2189baddedb8
files core/modulemanager.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/modulemanager.lua	Wed Mar 04 22:22:40 2009 +0500
+++ b/core/modulemanager.lua	Wed Mar 04 22:23:41 2009 +0500
@@ -300,6 +300,14 @@
 				end
 			end
 		end
+		for module, features in pairs(features_table:get("*") or NULL) do -- for each module
+			for feature in pairs(features) do
+				if not done[feature] then
+					reply:tag("feature", {var = feature}):up(); -- TODO cache
+					done[feature] = true;
+				end
+			end
+		end
 		return next(done) ~= nil;
 	end
 end);