Software /
code /
prosody
Changeset
4695:838ad61c6b2c
moduleapi: Add module:unhook_object_event()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Apr 2012 05:39:27 +0100 |
parents | 4694:f9a091b6dfd5 |
children | 4696:4700e318add1 |
files | core/moduleapi.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Thu Apr 26 04:24:43 2012 +0100 +++ b/core/moduleapi.lua Thu Apr 26 05:39:27 2012 +0100 @@ -73,6 +73,10 @@ 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