diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-10 20:36:37 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-10 20:36:37 +0500 |
commit | 48b21cfa9cb0f3e6e97b205874425509c597ff05 (patch) | |
tree | 3ad0e9c3fd56a9c57246296931fb91e8e2ea5fc1 /core/hostmanager.lua | |
parent | 7016b4e0cda4ba5a8cf14597d88180f5c67fba07 (diff) | |
download | prosody-48b21cfa9cb0f3e6e97b205874425509c597ff05.tar.gz prosody-48b21cfa9cb0f3e6e97b205874425509c597ff05.zip |
hostmanager: Don't include hosts with '@' or '/' in the name in the get_children(host) result.
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r-- | core/hostmanager.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 445ef0fb..9a5b2728 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -71,7 +71,9 @@ function activate(host, host_config) host_session.type = "component"; end hosts[host] = host_session; - disco_items:set(host:match("%.(.*)") or "*", host, true); + if not host:match("[@/]") then + disco_items:set(host:match("%.(.*)") or "*", host, true); + end for option_name in pairs(host_config.core) do if option_name:match("_ports$") or option_name:match("_interface$") then log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name); @@ -122,7 +124,9 @@ function deactivate(host, reason) end hosts[host] = nil; - disco_items:remove(host:match("%.(.*)") or "*", host); + if not host:match("[@/]") then + disco_items:remove(host:match("%.(.*)") or "*", host); + end prosody_events.fire_event("host-deactivated", host); log("info", "Deactivated host: %s", host); end |