aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-27 18:34:40 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-27 18:34:40 +0100
commitf51b8f32b0f9031bf30ced4fd4c3f0ad6f6213e8 (patch)
treee77ea427a4c12b4b8e2995a19539e776b757a3b9 /core/moduleapi.lua
parent25e1f9296a7543a976155556752ed397b6add7f4 (diff)
downloadprosody-f51b8f32b0f9031bf30ced4fd4c3f0ad6f6213e8.tar.gz
prosody-f51b8f32b0f9031bf30ced4fd4c3f0ad6f6213e8.zip
moduleapi: get_host_type(): Return nil for global modules (no host)
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 8e76a247..8c57e301 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -42,7 +42,7 @@ function api:get_host()
end
function api:get_host_type()
- return hosts[self.host].type;
+ return self.host ~= "*" and hosts[self.host].type or nil;
end
function api:set_global()