Software / code / prosody
Comparison
core/modulemanager.lua @ 4640:645c93eaf249
modulemanager: Use modulemap rather than hosts[host] (fix for when host == "*")
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 21 Apr 2012 20:02:45 +0100 |
| parent | 4639:98a29138dec8 |
| child | 4641:2b3ee52fba32 |
comparison
equal
deleted
inserted
replaced
| 4639:98a29138dec8 | 4640:645c93eaf249 |
|---|---|
| 167 if not api_instance.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 modulemap[host][module_name] = pluginenv; |
| 173 end | 173 end |
| 174 end | 174 end |
| 175 if not ok then | 175 if not ok then |
| 176 log("error", "Error initializing module '%s' on '%s': %s", module_name, host, err or "nil"); | 176 log("error", "Error initializing module '%s' on '%s': %s", module_name, host, err or "nil"); |
| 177 end | 177 end |