core/modulemanager.lua

changeset 1987
94ecd3e7be87
parent 1986
d4ba9d94eb74
child 1988
a6e7fe0fc3dd
--- a/core/modulemanager.lua	Sat Oct 17 23:48:30 2009 +0500
+++ b/core/modulemanager.lua	Sat Oct 17 23:50:09 2009 +0500
@@ -104,7 +104,6 @@
 	
 	if not modulemap[host] then
 		modulemap[host] = {};
-		hosts[host].modules = modulemap[host];
 	end
 	
 	if modulemap[host][module_name] then
@@ -128,6 +127,7 @@
 	
 	setfenv(mod, pluginenv);
 	if not hosts[host] then hosts[host] = { type = "component", host = host, connected = false, s2sout = {} }; end
+	hosts[host].modules = modulemap[host];
 	
 	local success, ret = pcall(mod);
 	if not success then

mercurial