aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-26 05:39:27 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-26 05:39:27 +0100
commita7a312881838cbf9ed374907de2231636df37629 (patch)
tree0d8baf5372f9addfceb03b23ae4ae6d15981032a /core/moduleapi.lua
parent37840f043cbe439e89ea82dbb34c208f47845ce0 (diff)
downloadprosody-a7a312881838cbf9ed374907de2231636df37629.tar.gz
prosody-a7a312881838cbf9ed374907de2231636df37629.zip
moduleapi: Add module:unhook_object_event()
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index d16ee410..1f8c492d 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -73,6 +73,10 @@ function api:hook_object_event(object, event, handler, priority)
return object.add_handler(event, handler, priority);
end
+function api:unhook_object_event(event, handler)
+ return object.remove_handler(event, handler);
+end
+
function api:hook(event, handler, priority)
return self:hook_object_event((hosts[self.host] or prosody).events, event, handler, priority);
end