aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-07 18:04:56 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-07 18:04:56 +0500
commit1878c499486efa5ae29fb3b4fb9b5bcfbc047a57 (patch)
tree780a6b687469db7988c81e674540a8825575314a /core/modulemanager.lua
parentc1a43bf7a8ba5858ac4d13d1ad6544e22f02efd1 (diff)
downloadprosody-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/modulemanager.lua')
-rw-r--r--core/modulemanager.lua4
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
--------------------------------------------------------------------