From fe8f9b9c375461d4b95f483b48ffdb02d0669819 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 17 Oct 2009 23:50:09 +0500 Subject: modulemanager: Fixed traceback on loading modules on unknown hosts. --- core/modulemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 9e93ffba..7c30cb37 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -104,7 +104,6 @@ function load(host, module_name, config) if not modulemap[host] then modulemap[host] = {}; - hosts[host].modules = modulemap[host]; end if modulemap[host][module_name] then @@ -128,6 +127,7 @@ function load(host, module_name, config) 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 -- cgit v1.2.3