aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-10-17 23:50:09 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-10-17 23:50:09 +0500
commitfe8f9b9c375461d4b95f483b48ffdb02d0669819 (patch)
tree1b614f238e30cd484c18069b66960ace525e5041
parentbf059aa4558801f219c1f8ba91e070a350b3c946 (diff)
downloadprosody-fe8f9b9c375461d4b95f483b48ffdb02d0669819.tar.gz
prosody-fe8f9b9c375461d4b95f483b48ffdb02d0669819.zip
modulemanager: Fixed traceback on loading modules on unknown hosts.
-rw-r--r--core/modulemanager.lua2
1 files changed, 1 insertions, 1 deletions
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