Comparison

plugins/muc/lock.lib.lua @ 7999:980606856882

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 23 Mar 2017 01:30:58 +0100
parent 7408:cf53081ce767
child 8565:301e5b82b4d8
comparison
equal deleted inserted replaced
7990:3d17b2bf0e0c 7999:980606856882
40 end 40 end
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 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"));
46 return true; 47 return true;
47 end 48 end
48 end, -30); 49 end, -30);
49 50