Commit graph

17 commits

Author SHA1 Message Date
Kim Alvefur
1987a7411f plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
2023-07-16 20:49:33 +02:00
Kim Alvefur
98922d54b1 plugins: Prefix module imports with prosody namespace 2023-03-24 13:15:28 +01:00
Kim Alvefur
9dd9cb4392 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.
2021-07-29 20:16:11 +02:00
Kim Alvefur
5d73586b4f mod_limits: Factor out function for disabling limits allowing use from shell
Also enables reuse for s2s, which we will add next.
2021-07-29 20:11:48 +02:00
Matthew Wild
5bc8b2a379 Merge 0.11->trunk 2021-05-13 11:17:13 +01:00
Matthew Wild
6f6c807bdf mod_limits: Use default limits if none configured 2021-05-11 14:22:59 +01:00
Matthew Wild
08f721a072 mod_limits: Don't emit error when no burst period is configured 2021-05-11 14:10:26 +01:00
Kim Alvefur
7c8ad7bede mod_limits: Remove an unused variable
Hope this isn't meant to be used. 'outstanding' seems to be the more
useful value anyways?
2019-12-23 22:24:31 +01:00
Kim Alvefur
40b1e3e0ed plugins: Remove tostring call from logging
Taken care of by loggingmanager now

Mass-rewrite using lua pattern like `tostring%b()`
2019-07-30 02:29:36 +02:00
Kim Alvefur
9df663276b mod_limits: Use rate limiting in net.server if provided
This should be simpler and more efficient, as well avoid problems caused
by using filters.
2019-03-29 00:58:22 +01:00
Kim Alvefur
7537a96433 mod_limits: Rename variable to avoid name clash [luacheck]
FIXME better name, s_throttle doesn't seem nice
2018-05-02 13:58:28 +02:00
Kim Alvefur
337c4dea6f mod_limits: Fix typo in comment 2017-12-05 11:12:58 +01:00
Matthew Wild
14304764d8 mod_limits: Handle fractional outstanding balance values (caused by e3f7b6fa46ba)
Fractional values were passed to string.sub() when doing buffer manipulations, and
caused random bytes to be skipped in the stream.
2017-09-26 17:48:33 +01:00
Matthew Wild
9f73fcbf8a mod_limits: Import from prosody-modules 2c59f2f0c37d (fixes #129) 2017-09-23 13:29:54 +01:00
Kim Alvefur
e632119ffa mod_limits: Fix typo 2019-04-02 21:22:20 +02:00
Kim Alvefur
1b534392de mod_limits: Allow configuring a list of unrestricted JIDs (fixes #1323) 2019-04-02 20:38:51 +02:00
Kim Alvefur
a6571e3ef3 mod_limits: Fix indentation
Appears to have been messed up in 60e113f3682f
2019-04-02 21:17:28 +02:00