aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/hostmanager.lua2
-rw-r--r--plugins/mod_disco.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index 66275d96..3c90dbb9 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -84,7 +84,7 @@ function activate(host, host_config)
end
hosts[host] = host_session;
if not host:match("[@/]") then
- disco_items:set(host:match("%.(.*)") or "*", host, true);
+ disco_items:set(host:match("%.(.*)") or "*", host, host_config.core.name or true);
end
for option_name in pairs(host_config.core) do
if option_name:match("_ports$") or option_name:match("_interface$") then
diff --git a/plugins/mod_disco.lua b/plugins/mod_disco.lua
index 6587d435..72c9a34c 100644
--- a/plugins/mod_disco.lua
+++ b/plugins/mod_disco.lua
@@ -111,8 +111,8 @@ module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(eve
if node and node ~= "" then return; end -- TODO fire event?
local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
- for jid in pairs(get_children(module.host)) do
- reply:tag("item", {jid = jid}):up();
+ for jid, name in pairs(get_children(module.host)) do
+ reply:tag("item", {jid = jid, name = name~=true and name or nil}):up();
end
for _, item in ipairs(disco_items) do
reply:tag("item", {jid=item[1], name=item[2]}):up();