diff mod_muc_rtbl/mod_muc_rtbl.lua @ 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 f6b5f04d4b28
children f6577cdb1d91
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()