Software /
code /
prosody-modules
Diff
mod_firewall/mod_firewall.lua @ 4608:4e8fa75cc678
mod_firewall: Remove reliance on full_sessions being a global
While it exists as a global now, we want to move away from these globals
eventually.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 30 Jun 2021 14:48:59 +0200 |
parent | 4582:cc20493018f6 |
child | 5002:84997bc3f92e |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Wed Jun 30 14:33:06 2021 +0200 +++ b/mod_firewall/mod_firewall.lua Wed Jun 30 14:48:59 2021 +0200 @@ -216,6 +216,9 @@ return ("local multi_throttle_%s = rates.%s:multi();"):format(throttle, throttle); end; }; + full_sessions = { + global_code = [[local full_sessions = prosody.full_sessions;]]; + }; rostermanager = { global_code = [[local rostermanager = require "core.rostermanager";]]; };