Software /
code /
prosody
Comparison
core/moduleapi.lua @ 4718:a9f6088a83e3
moduleapi: get_host_type(): Return nil for global modules (no host)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 27 Apr 2012 18:34:40 +0100 |
parent | 4708:0e324923ff95 |
child | 4719:2087d42f1e77 |
comparison
equal
deleted
inserted
replaced
4717:3c0321e3fa76 | 4718:a9f6088a83e3 |
---|---|
40 function api:get_host() | 40 function api:get_host() |
41 return self.host; | 41 return self.host; |
42 end | 42 end |
43 | 43 |
44 function api:get_host_type() | 44 function api:get_host_type() |
45 return hosts[self.host].type; | 45 return self.host ~= "*" and hosts[self.host].type or nil; |
46 end | 46 end |
47 | 47 |
48 function api:set_global() | 48 function api:set_global() |
49 self.host = "*"; | 49 self.host = "*"; |
50 -- Update the logger | 50 -- Update the logger |