diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-05-31 00:54:33 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-05-31 00:54:33 +0500 |
commit | 2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac (patch) | |
tree | 68989bd1379c4923aae46cd753a7b87bf6ca7045 /core/modulemanager.lua | |
parent | d7084c66513d9ee6c114c55c3bdb92bffd2c68fe (diff) | |
download | prosody-2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac.tar.gz prosody-2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac.zip |
modulemanager: Made some code more concise
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r-- | core/modulemanager.lua | 6 |
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 -------------------------------------------------------------------- |