aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-05-31 00:51:13 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-05-31 00:51:13 +0500
commitd7084c66513d9ee6c114c55c3bdb92bffd2c68fe (patch)
treed30de06f026a2932b7312ae664aebd459b93a0d9 /core/modulemanager.lua
parentd68d7ca6827c46231839726dc4e431ee17072c69 (diff)
downloadprosody-d7084c66513d9ee6c114c55c3bdb92bffd2c68fe.tar.gz
prosody-d7084c66513d9ee6c114c55c3bdb92bffd2c68fe.zip
modulemanager: module:hook now allows global modules to hook events on the prosody.events object
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 901659f7..59a900f5 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -20,6 +20,7 @@ local register_actions = require "core.actions".register;
local st = require "util.stanza";
local hosts = hosts;
+local prosody = prosody;
local loadfile, pcall = loadfile, pcall;
local setmetatable, setfenv, getfenv = setmetatable, setfenv, getfenv;
@@ -358,7 +359,7 @@ function api:hook(event, handler)
if self.host ~= '*' then
hosts[self.host].events.add_handler(event, handler);
else
- self:log("error", "Global module attempting to hook a host-specific event: %s", event);
+ prosody.events.add_handler(event, handler);
end
end