Mercurial > prosody-hg
comparison plugins/mod_s2s/mod_s2s.lua @ 5454:5f69fddf6fb9
mod_s2s: Adjust priority of route/remote hooks to negative values (like most other internal hooks)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 08 Apr 2013 22:42:38 +0200 |
| parents | 4acc1598f391 |
| children | 11f08a27c417 |
comparison
equal
deleted
inserted
replaced
| 5452:edf3db386a19 | 5454:5f69fddf6fb9 |
|---|---|
| 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) |
