diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-03-14 17:03:48 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-03-14 17:03:48 +0000 |
commit | aef2645ec8a90374fdb869aee40bff7c878d34d5 (patch) | |
tree | ab9200860fa8a69e96ce056c2a67e20636b8c101 /core | |
parent | a4a4365842fd701623fa72d38e9ea8068e0674ce (diff) | |
download | prosody-aef2645ec8a90374fdb869aee40bff7c878d34d5.tar.gz prosody-aef2645ec8a90374fdb869aee40bff7c878d34d5.zip |
modulemanager: Use appropriate events object for global modules when firing item-removed on unload
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 3 |
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 |