Software /
code /
prosody
Changeset
5771:c4ed6680bf8d
moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 06 Aug 2013 17:17:23 +0100 |
parents | 5770:7722372aa087 |
children | 5772:9cef4b5c2fe3 |
files | core/moduleapi.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Tue Aug 06 14:35:03 2013 +0200 +++ b/core/moduleapi.lua Tue Aug 06 17:17:23 2013 +0100 @@ -44,7 +44,7 @@ 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()