Software /
code /
prosody
Diff
core/modulemanager.lua @ 1326:4f1994f7bd54
modulemanager: Allow setting a priority while adding an event handler via the module:hook API
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 07 Jun 2009 18:04:56 +0500 |
parent | 1309:a544e68a0989 |
child | 1328:0709c9564b1c |
line wrap: on
line diff
--- a/core/modulemanager.lua Sun Jun 07 18:04:08 2009 +0500 +++ b/core/modulemanager.lua Sun Jun 07 18:04:56 2009 +0500 @@ -368,9 +368,9 @@ return (hosts[self.host] or prosody).events.fire_event(...); end -function api:hook(event, handler) +function api:hook(event, handler, priority) hooks:set(self.host, self.name, event, handler, true); - (hosts[self.host] or prosody).events.add_handler(event, handler); + (hosts[self.host] or prosody).events.add_handler(event, handler, priority); end --------------------------------------------------------------------