Software /
code /
prosody
Diff
core/modulemanager.lua @ 1987:94ecd3e7be87
modulemanager: Fixed traceback on loading modules on unknown hosts.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 17 Oct 2009 23:50:09 +0500 |
parent | 1986:d4ba9d94eb74 |
child | 1988:a6e7fe0fc3dd |
line wrap: on
line diff
--- 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