aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-18 23:53:02 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-18 23:53:02 +0100
commit0fe909f995ac5f6b26d4eb9bcbc84aa069e33e9e (patch)
tree4b152687bf60b9bb1ea1730f4a09e40a07840d23 /core/modulemanager.lua
parent72ff00a1cd8de2a7a8fea79fea223c85194d4c66 (diff)
downloadprosody-0fe909f995ac5f6b26d4eb9bcbc84aa069e33e9e.tar.gz
prosody-0fe909f995ac5f6b26d4eb9bcbc84aa069e33e9e.zip
moduleapi, modulemanager: Re-structure module.event_handlers so that the same handler can harmlessly handle multiple events (thanks Zash)
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index b9f221c8..417dedbe 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -91,8 +91,8 @@ local function do_unload_module(host, name)
end
end
- for handler, event in pairs(mod.module.event_handlers) do
- event.object.remove_handler(event.name, handler);
+ for event, data in pairs(mod.module.event_handlers) do
+ data.object.remove_handler(event, data.handler);
end
if mod.module.items then -- remove items