diff -r 6f4c8af128e2 -r ac5e05ffc921 core/moduleapi.lua --- a/core/moduleapi.lua Fri Sep 06 10:53:04 2013 +0200 +++ b/core/moduleapi.lua Mon Sep 16 18:41:09 2013 +0100 @@ -113,6 +113,10 @@ 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