From 2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 31 May 2009 00:54:33 +0500 Subject: modulemanager: Made some code more concise --- core/modulemanager.lua | 6 +----- 1 file changed, 1 insertion(+), 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 -------------------------------------------------------------------- -- cgit v1.2.3