projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.sasl_cyrus: Automatically initialize Cyrus SASL with the first used service...
[prosody.git]
/
core
/
modulemanager.lua
diff --git
a/core/modulemanager.lua
b/core/modulemanager.lua
index 65a38ccb258b002876b6e7c32902c75dec22a8b8..032cab8404f8e1234890cafc67ec421a2cf1bbb9 100644
(file)
--- a/
core/modulemanager.lua
+++ b/
core/modulemanager.lua
@@
-200,6
+200,15
@@
function unload(host, name, ...)
end
end
hooks:remove(host, name);
end
end
hooks:remove(host, name);
+ if mod.module.items then -- remove items
+ for key,t in pairs(mod.module.items) do
+ for i = #t,1,-1 do
+ local value = t[i];
+ t[i] = nil;
+ hosts[host].events.fire_event("item-removed/"..key, {source = self, item = value});
+ end
+ end
+ end
modulemap[host][name] = nil;
hosts[host].events.fire_event("module-unloaded", { module = name, host = host });
return true;
modulemap[host][name] = nil;
hosts[host].events.fire_event("module-unloaded", { module = name, host = host });
return true;
@@
-404,8
+413,8
@@
function api:get_option(name, default_value)
return value;
end
return value;
end
-function api:get_option_string(
...
)
- local value = self:get_option(
...
);
+function api:get_option_string(
name, default_value
)
+ local value = self:get_option(
name, default_value
);
if type(value) == "table" then
if #value > 1 then
self:log("error", "Config option '%s' does not take a list, using just the first item", name);
if type(value) == "table" then
if #value > 1 then
self:log("error", "Config option '%s' does not take a list, using just the first item", name);