diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-06-07 18:04:56 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-06-07 18:04:56 +0500 |
commit | 1878c499486efa5ae29fb3b4fb9b5bcfbc047a57 (patch) | |
tree | 780a6b687469db7988c81e674540a8825575314a /core | |
parent | c1a43bf7a8ba5858ac4d13d1ad6544e22f02efd1 (diff) | |
download | prosody-1878c499486efa5ae29fb3b4fb9b5bcfbc047a57.tar.gz prosody-1878c499486efa5ae29fb3b4fb9b5bcfbc047a57.zip |
modulemanager: Allow setting a priority while adding an event handler via the module:hook API
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 18b511e6..748c7dce 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -368,9 +368,9 @@ function api:fire_event(...) 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 -------------------------------------------------------------------- |