aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 3087ba24..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
@@ -253,11 +254,6 @@ function stream_callbacks.streamopened(session, attr)
log("debug", "Sending stream features: %s", tostring(features));
send(features);
end
-
- local host_session = hosts[to];
- session.send = function(stanza)
- host_session.events.fire_event("route/remote", { from_host = to, to_host = from, stanza = stanza})
- end;
elseif session.direction == "outgoing" then
-- If we are just using the connection for verifying dialback keys, we won't try and auth it
if not attr.id then error("stream response did not give us a streamid!!!"); end