aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 6e857531..65e00d41 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -113,6 +113,10 @@ function api:hook_tag(xmlns, name, handler, priority)
end
api.hook_stanza = api.hook_tag; -- COMPAT w/pre-0.9
+function api:unhook(event, handler)
+ return self:unhook_object_event((hosts[self.host] or prosody).events, event, handler);
+end
+
function api:require(lib)
local f, n = pluginloader.load_code(self.name, lib..".lib.lua", self.environment);
if not f then