equal
deleted
inserted
replaced
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 |