Software /
code /
prosody
Diff
core/hostmanager.lua @ 2420:6ccd36a95a81
s2smanager, hostmanager: Make dialback secrets per-host
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 03 Jan 2010 18:55:42 +0000 |
parent | 2321:7e7484a4e821 |
child | 2536:922e6e84d0bf |
line wrap: on
line diff
--- a/core/hostmanager.lua Sun Jan 03 18:37:03 2010 +0000 +++ b/core/hostmanager.lua Sun Jan 03 18:55:42 2010 +0000 @@ -14,6 +14,8 @@ 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 @@ 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