Comparison

core/modulemanager.lua @ 4639:98a29138dec8

modulemanager: Use api_instance rather than pluginenv.module (same thing)
author Matthew Wild <mwild1@gmail.com>
date Sat, 21 Apr 2012 20:01:40 +0100
parent 4638:352cd61e2682
child 4640:645c93eaf249
comparison
equal deleted inserted replaced
4638:352cd61e2682 4639:98a29138dec8
160 if not ok then 160 if not ok then
161 log("warn", "Error loading module '%s' on '%s': %s", module_name, host, err or "nil"); 161 log("warn", "Error loading module '%s' on '%s': %s", module_name, host, err or "nil");
162 end 162 end
163 end 163 end
164 164
165 modulemap[pluginenv.module.host][module_name] = pluginenv; 165 modulemap[api_instance.host][module_name] = pluginenv;
166 if pluginenv.module.host == "*" then 166 if api_instance.host == "*" then
167 if not pluginenv.module.global then -- COMPAT w/pre-0.9 167 if not api_instance.global then -- COMPAT w/pre-0.9
168 log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name); 168 log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name);
169 api_instance:set_global(); 169 api_instance:set_global();
170 end 170 end
171 else 171 else
172 hosts[host].modules[module_name] = pluginenv; 172 hosts[host].modules[module_name] = pluginenv;