aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-29 20:16:11 +0200
committerKim Alvefur <zash@zash.se>2021-07-29 20:16:11 +0200
commit9dd9cb43927a6d29e4df1c857b80ff3475410b3d (patch)
tree72ff53be44d4f4b41b39091de47cddcb9dc474a1 /plugins
parent5d73586b4f890014db1b0a782cfcb3037ffbb1c4 (diff)
downloadprosody-9dd9cb43927a6d29e4df1c857b80ff3475410b3d.tar.gz
prosody-9dd9cb43927a6d29e4df1c857b80ff3475410b3d.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_limits.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/mod_limits.lua b/plugins/mod_limits.lua
index 9905dded..4f1b618e 100644
--- a/plugins/mod_limits.lua
+++ b/plugins/mod_limits.lua
@@ -134,5 +134,20 @@ function module.add_host(module)
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