Software /
code /
prosody
Comparison
core/hostmanager.lua @ 5081:c0c060e450be
hostmanager, mod_disco: Show optional 'name' option from the config in disco#items queries (fixes use-case in #292) (thanks diSabler, mva)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Aug 2012 17:18:35 +0100 |
parent | 4834:878f75ccc4fb |
child | 5123:7c5c86fa552e |
comparison
equal
deleted
inserted
replaced
5077:6c2c8bf36d22 | 5081:c0c060e450be |
---|---|
82 else -- component | 82 else -- component |
83 host_session.type = "component"; | 83 host_session.type = "component"; |
84 end | 84 end |
85 hosts[host] = host_session; | 85 hosts[host] = host_session; |
86 if not host:match("[@/]") then | 86 if not host:match("[@/]") then |
87 disco_items:set(host:match("%.(.*)") or "*", host, true); | 87 disco_items:set(host:match("%.(.*)") or "*", host, host_config.core.name or true); |
88 end | 88 end |
89 for option_name in pairs(host_config.core) do | 89 for option_name in pairs(host_config.core) do |
90 if option_name:match("_ports$") or option_name:match("_interface$") then | 90 if option_name:match("_ports$") or option_name:match("_interface$") then |
91 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name); | 91 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name); |
92 end | 92 end |