diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-11 00:56:18 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-11 00:56:18 +0100 |
commit | f73fb5fdd4a9f66a5539c33be875d4d9fe63b5d1 (patch) | |
tree | fc2779e5341c572deba0f875a624f5057c09d82e /plugins/mod_s2s/mod_s2s.lua | |
parent | 765f6f8a4c7cc0e9c11a25d4b023567abd3a14b0 (diff) | |
download | prosody-f73fb5fdd4a9f66a5539c33be875d4d9fe63b5d1.tar.gz prosody-f73fb5fdd4a9f66a5539c33be875d4d9fe63b5d1.zip |
mod_s2s, mod_auth_anonymous, hostmanager: Remove disallow_s2s flag, deprecate the config option of the same name (disable mod_s2s instead), and add 'allow_anonymous_s2s' to separately control s2s for anonymous users
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 61812a1e..e2a22738 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -125,6 +125,7 @@ end function module.add_host(module) if module:get_option_boolean("disallow_s2s", false) then + module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling"); return nil, "This host has disallow_s2s set"; end module:hook("route/remote", route_to_existing_session, 200); @@ -226,11 +227,11 @@ function stream_callbacks.streamopened(session, attr) text = "This host does not serve "..to }); return; - elseif hosts[to].disallow_s2s then + elseif not hosts[to].modules.s2s then -- Attempting to connect to a host that disallows s2s session:close({ condition = "policy-violation"; - text = "Server-to-server communication is not allowed to this host"; + text = "Server-to-server communication is disabled for this host"; }); return; end |