aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-05-31 00:54:33 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-05-31 00:54:33 +0500
commit2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac (patch)
tree68989bd1379c4923aae46cd753a7b87bf6ca7045
parentd7084c66513d9ee6c114c55c3bdb92bffd2c68fe (diff)
downloadprosody-2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac.tar.gz
prosody-2d5433f130f680fbead3ee4e6e5509bfc9e7f9ac.zip
modulemanager: Made some code more concise
-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
--------------------------------------------------------------------