diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-03-03 22:05:05 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-03-03 22:05:05 +0000 |
commit | 8862e1b27eb767c99a068d13bd15c77c2c9e1471 (patch) | |
tree | 067f338a5f8e31a6b1fb6ca706562a044af80024 /core/modulemanager.lua | |
parent | 87ff54c75266ffa37f716d1c7a542e956bbe54b3 (diff) | |
parent | 5d9b9b6b30f06a3e3aa957279357dd42ae19ddf4 (diff) | |
download | prosody-8862e1b27eb767c99a068d13bd15c77c2c9e1471.tar.gz prosody-8862e1b27eb767c99a068d13bd15c77c2c9e1471.zip |
Merge 0.6.2/waqas with 0.6.2/MattJ
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r-- | core/modulemanager.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 9cd56187..ecb1bc6c 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -197,6 +197,15 @@ function unload(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; return true; end |