comparison plugins/muc/lock.lib.lua @ 11120:b2331f3dfeea

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2020 09:50:33 +0100
parents c1edeb9fe337
children 74b9e05af71e
comparison
equal deleted inserted replaced
11119:68df52bf08d5 11120:b2331f3dfeea
41 41
42 -- Don't let users into room while it is locked 42 -- Don't let users into room while it is locked
43 module:hook("muc-occupant-pre-join", function(event) 43 module:hook("muc-occupant-pre-join", function(event)
44 if not event.is_new_room and is_locked(event.room) then -- Deny entry 44 if not event.is_new_room and is_locked(event.room) then -- Deny entry
45 module:log("debug", "Room is locked, denying entry"); 45 module:log("debug", "Room is locked, denying entry");
46 event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found")); 46 event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found", nil, module.host));
47 return true; 47 return true;
48 end 48 end
49 end, -30); 49 end, -30);
50 50
51 -- When config is submitted; unlock the room 51 -- When config is submitted; unlock the room