Software /
code /
prosody
Diff
core/modulemanager.lua @ 1248:9a482f76a20a
modulemanager: Made some code more concise
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 31 May 2009 00:54:33 +0500 |
parent | 1247:4721e4124692 |
child | 1250:ef053ab86f5e |
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 --------------------------------------------------------------------