Software / code / prosody
Comparison
plugins/mod_auth_anonymous.lua @ 4838:661752889535
mod_auth_anonymous: add disallow_s2s to the host object if s2s communication is disallowed.
| author | Marco Cirillo <maranda@lightwitch.org> |
|---|---|
| date | Thu, 10 May 2012 12:54:37 +0000 |
| parent | 4821:deec69fc33e5 |
| child | 4844:3d1ca811eee3 |
comparison
equal
deleted
inserted
replaced
| 4837:9f1fb34cd7f8 | 4838:661752889535 |
|---|---|
| 50 end | 50 end |
| 51 return username, host, datastore, data; | 51 return username, host, datastore, data; |
| 52 end | 52 end |
| 53 | 53 |
| 54 if module:get_option_boolean("disallow_s2s", true) then | 54 if module:get_option_boolean("disallow_s2s", true) then |
| 55 hosts[module.host].disallow_s2s = true; | |
| 55 module:hook("route/remote", function (event) | 56 module:hook("route/remote", function (event) |
| 56 return false; -- Block outgoing s2s from anonymous users | 57 return false; -- Block outgoing s2s from anonymous users |
| 57 end, 300); | 58 end, 300); |
| 58 end | 59 end |
| 59 | 60 |