diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-27 18:34:40 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-27 18:34:40 +0100 |
commit | ba7525b97ad5d49f0f3c0d6ee8777e00774e7e62 (patch) | |
tree | e77ea427a4c12b4b8e2995a19539e776b757a3b9 | |
parent | fad0359e7520355813c6775c788c2ac952db434f (diff) | |
download | prosody-ba7525b97ad5d49f0f3c0d6ee8777e00774e7e62.tar.gz prosody-ba7525b97ad5d49f0f3c0d6ee8777e00774e7e62.zip |
moduleapi: get_host_type(): Return nil for global modules (no host)
-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 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() |