Software /
code /
prosody
Changeset
11735:7d29167bfcc3
mod_limits: Extend unlimited_jids to s2s sessions (for Ge0rG)
This makes unlimited_jids also work for s2s connections, assuming the
remote server has been identified.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 29 Jul 2021 20:16:11 +0200 |
parents | 11734:c0fc4ca74046 |
children | 11736:ddb87df3de30 |
files | plugins/mod_limits.lua |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_limits.lua Thu Jul 29 20:11:48 2021 +0200 +++ b/plugins/mod_limits.lua Thu Jul 29 20:16:11 2021 +0200 @@ -134,5 +134,20 @@ unlimited(session); end end); + + module:hook("s2sout-established", function (event) + local session = event.session; + if unlimited_jids:contains(session.to_host) then + unlimited(session); + end + end); + + module:hook("s2sin-established", function (event) + local session = event.session; + if session.from_host and unlimited_jids:contains(session.from_host) then + unlimited(session); + end + end); + end end