138 function module.add_host(module) |
138 function module.add_host(module) |
139 if module:get_option_boolean("disallow_s2s", false) then |
139 if module:get_option_boolean("disallow_s2s", false) then |
140 module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling"); |
140 module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling"); |
141 return nil, "This host has disallow_s2s set"; |
141 return nil, "This host has disallow_s2s set"; |
142 end |
142 end |
143 module:hook("route/remote", route_to_existing_session, 200); |
143 module:hook("route/remote", route_to_existing_session, -1); |
144 module:hook("route/remote", route_to_new_session, 100); |
144 module:hook("route/remote", route_to_new_session, -10); |
145 module:hook("s2s-authenticated", make_authenticated, -1); |
145 module:hook("s2s-authenticated", make_authenticated, -1); |
146 end |
146 end |
147 |
147 |
148 -- Stream is authorised, and ready for normal stanzas |
148 -- Stream is authorised, and ready for normal stanzas |
149 function mark_connected(session) |
149 function mark_connected(session) |