aboutsummaryrefslogtreecommitdiffstats
path: root/core/hostmanager.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-07-05 19:05:25 +0200
committerTobias Markmann <tm@ayena.de>2009-07-05 19:05:25 +0200
commitfa97be5e4dcd83cd57c51e764f6aa2a39b9833ba (patch)
tree04f1aa322632a0221c225ee6957b5863755a3b6d /core/hostmanager.lua
parent4ce313959b678592a5fe0ef30b6813d058de45af (diff)
parent2c3ccf56744975a5f5acbc66d2e917e056467965 (diff)
downloadprosody-fa97be5e4dcd83cd57c51e764f6aa2a39b9833ba.tar.gz
prosody-fa97be5e4dcd83cd57c51e764f6aa2a39b9833ba.zip
Merge with main branch.
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r--core/hostmanager.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index a72e5f61..0dd2c9d8 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -27,7 +27,12 @@ end
eventmanager.add_event_hook("server-starting", load_enabled_hosts);
function activate(host, host_config)
- hosts[host] = {type = "local", connected = true, sessions = {}, host = host, s2sout = {}, events = events_new() };
+ hosts[host] = {type = "local", connected = true, sessions = {},
+ host = host, s2sout = {}, events = events_new(),
+ disallow_s2s = configmanager.get(host, "core", "disallow_s2s")
+ or (configmanager.get(host, "core", "anonymous_login")
+ and (configmanager.get(host, "core", "disallow_s2s") ~= false))
+ };
log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host);
eventmanager.fire_event("host-activated", host, host_config);
end