author | Matthew Wild <mwild1@gmail.com> |
Mon, 16 Sep 2013 18:41:09 +0100 | |
changeset 5825 | ac5e05ffc921 |
parent 5824 | 6f4c8af128e2 |
child 5827 | ae16bf17785d |
--- 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