From 4c2d352eccebd88cbeb309b2d26e1049ee3569c8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 11 Jul 2018 03:38:01 +0200 Subject: MUC: Allow an admin to recreate destroyed rooms --- plugins/muc/mod_muc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/muc/mod_muc.lua') diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 7704adfe..cc0c675b 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -398,8 +398,8 @@ for event_name, method in pairs { if room and room._data.destroyed then if stanza.attr.type == nil and stanza.name == "presence" then - if room._data.locked < os.time() then - -- Allow the room to be recreated after time has passed + if is_admin(stanza.attr.from) or room._data.locked < os.time() then + -- Allow the room to be recreated by admin or after time has passed delete_room(room); room = nil; else -- cgit v1.2.3