aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 59a900f5..464fd804 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -356,11 +356,7 @@ function api:fire_event(...)
end
function api:hook(event, handler)
- if self.host ~= '*' then
- hosts[self.host].events.add_handler(event, handler);
- else
- prosody.events.add_handler(event, handler);
- end
+ (hosts[self.host] or prosody).events.add_handler(event, handler);
end
--------------------------------------------------------------------