aboutsummaryrefslogtreecommitdiffstats
path: root/core/hostmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-03 18:55:42 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-03 18:55:42 +0000
commit4b75f2857c55522da732ee0c62303c592e591b72 (patch)
treefe4928a426745f670469a4f4b8676705c0841bfb /core/hostmanager.lua
parentcddb59f5420bf9b9a7db1b62749eed71606a0476 (diff)
downloadprosody-4b75f2857c55522da732ee0c62303c592e591b72.tar.gz
prosody-4b75f2857c55522da732ee0c62303c592e591b72.zip
s2smanager, hostmanager: Make dialback secrets per-host
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r--core/hostmanager.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index 713788dd..b3493e67 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -14,6 +14,8 @@ local eventmanager = require "core.eventmanager";
local modulemanager = require "core.modulemanager";
local events_new = require "util.events".new;
+local uuid_gen = require "util.uuid".generate;
+
if not _G.prosody.incoming_s2s then
require "core.s2smanager";
end
@@ -47,10 +49,11 @@ 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(),
- disallow_s2s = configmanager.get(host, "core", "disallow_s2s")
- or (configmanager.get(host, "core", "anonymous_login")
- and (configmanager.get(host, "core", "disallow_s2s") ~= false))
+ 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));
+ dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen();
};
for option_name in pairs(host_config.core) do
if option_name:match("_ports$") then