Software /
code /
prosody
Comparison
core/moduleapi.lua @ 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 |
parent | 5530:d83482fc4a81 |
child | 5776:bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
5770:7722372aa087 | 5771:c4ed6680bf8d |
---|---|
42 function api:get_host() | 42 function api:get_host() |
43 return self.host; | 43 return self.host; |
44 end | 44 end |
45 | 45 |
46 function api:get_host_type() | 46 function api:get_host_type() |
47 return self.host ~= "*" and hosts[self.host].type or nil; | 47 return (self.host == "*" and "global") or hosts[self.host].type or "local"; |
48 end | 48 end |
49 | 49 |
50 function api:set_global() | 50 function api:set_global() |
51 self.host = "*"; | 51 self.host = "*"; |
52 -- Update the logger | 52 -- Update the logger |