Mercurial > prosody-hg
comparison plugins/mod_limits.lua @ 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 | c0fc4ca74046 |
| children | 74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 11734:c0fc4ca74046 | 11735:7d29167bfcc3 |
|---|---|
| 132 local jid = session.username .. "@" .. session.host; | 132 local jid = session.username .. "@" .. session.host; |
| 133 if unlimited_jids:contains(jid) then | 133 if unlimited_jids:contains(jid) then |
| 134 unlimited(session); | 134 unlimited(session); |
| 135 end | 135 end |
| 136 end); | 136 end); |
| 137 | |
| 138 module:hook("s2sout-established", function (event) | |
| 139 local session = event.session; | |
| 140 if unlimited_jids:contains(session.to_host) then | |
| 141 unlimited(session); | |
| 142 end | |
| 143 end); | |
| 144 | |
| 145 module:hook("s2sin-established", function (event) | |
| 146 local session = event.session; | |
| 147 if session.from_host and unlimited_jids:contains(session.from_host) then | |
| 148 unlimited(session); | |
| 149 end | |
| 150 end); | |
| 151 | |
| 137 end | 152 end |
| 138 end | 153 end |
