Software / code / prosody
Comparison
core/modulemanager.lua @ 1904:0aa55a5dafde
modulemanager: Add host.modules to contain a table of modules for a host
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 05 Oct 2009 10:42:36 +0100 |
| parent | 1852:f9b58f37bc14 |
| child | 1908:27c1c6e6c583 |
comparison
equal
deleted
inserted
replaced
| 1866:cc7f212b2c48 | 1904:0aa55a5dafde |
|---|---|
| 104 return nil, "insufficient-parameters"; | 104 return nil, "insufficient-parameters"; |
| 105 end | 105 end |
| 106 | 106 |
| 107 if not modulemap[host] then | 107 if not modulemap[host] then |
| 108 modulemap[host] = {}; | 108 modulemap[host] = {}; |
| 109 hosts[host].modules = modulemap[host]; | |
| 109 end | 110 end |
| 110 | 111 |
| 111 if modulemap[host][module_name] then | 112 if modulemap[host][module_name] then |
| 112 log("warn", "%s is already loaded for %s, so not loading again", module_name, host); | 113 log("warn", "%s is already loaded for %s, so not loading again", module_name, host); |
| 113 return nil, "module-already-loaded"; | 114 return nil, "module-already-loaded"; |