Software /
code /
prosody
Changeset
1248:9a482f76a20a
modulemanager: Made some code more concise
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 31 May 2009 00:54:33 +0500 |
parents | 1247:4721e4124692 |
children | 1249:f22ede3e1c28 |
files | core/modulemanager.lua |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/core/modulemanager.lua Sun May 31 00:51:13 2009 +0500 +++ b/core/modulemanager.lua Sun May 31 00:54:33 2009 +0500 @@ -356,11 +356,7 @@ 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 --------------------------------------------------------------------