aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 0ca37105..328224ae 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -101,11 +101,12 @@ local function do_unload_module(host, name)
end
if mod.module.items then -- remove items
+ local events = (host == "*" and prosody.events) or hosts[host].events;
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 = mod.module, item = value});
+ events.fire_event("item-removed/"..key, {source = mod.module, item = value});
end
end
end