diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-08-06 17:17:23 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-08-06 17:17:23 +0100 |
commit | c8e0c8a63bd2e0a7604c4bb5a637287e7ddffc25 (patch) | |
tree | a6bc0754b875f873c00002b328b009379cd90ed1 /core/moduleapi.lua | |
parent | 132f38d70aa6187f55474b583702e57260eee311 (diff) | |
download | prosody-c8e0c8a63bd2e0a7604c4bb5a637287e7ddffc25.tar.gz prosody-c8e0c8a63bd2e0a7604c4bb5a637287e7ddffc25.zip |
moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r-- | core/moduleapi.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index ed75669b..a4ba9bc8 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -44,7 +44,7 @@ function api:get_host() end function api:get_host_type() - return self.host ~= "*" and hosts[self.host].type or nil; + return (self.host == "*" and "global") or hosts[self.host].type or "local"; end function api:set_global() |