Mercurial > prosody-modules
changeset 5274:8cfbcbc0fb89
mod_muc_rtbl: Handle node purge
Prevents the module from going out of sync with the node in case this
event ever happens.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 22:29:55 +0100 |
parents | 40be37652d70 |
children | 3e30799deec2 |
files | mod_muc_rtbl/mod_muc_rtbl.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_rtbl/mod_muc_rtbl.lua Fri Mar 24 00:07:58 2023 +0100 +++ b/mod_muc_rtbl/mod_muc_rtbl.lua Fri Mar 17 22:29:55 2023 +0100 @@ -38,6 +38,13 @@ module:log("debug", "Retracted hash: %s", hash); banned_hashes[hash] = nil; end; + + purge = function() + module:log("debug", "Purge all hashes"); + for hash in pairs(banned_hashes) do + banned_hashes[hash] = nil; + end + end; }); function request_list()