Changeset

778:0d94b4903cc7

modulemanager initializes hosts[host] if it isn't already initialized when loading a module.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 11 Feb 2009 17:57:48 +0500
parents 777:f7a87acea220
children 779:ec0eadf4e9ff
files core/modulemanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/modulemanager.lua	Wed Feb 11 17:56:42 2009 +0500
+++ b/core/modulemanager.lua	Wed Feb 11 17:57:48 2009 +0500
@@ -112,6 +112,7 @@
 	local pluginenv = setmetatable({ module = api_instance }, { __index = _G });
 	
 	setfenv(mod, pluginenv);
+	if not hosts[host] then hosts[host] = { type = "component", host = host, connected = false, s2sout = {} }; end
 	
 	local success, ret = pcall(mod);
 	if not success then