Comparison

plugins/muc/lock.lib.lua @ 6207:a5928fdeaf97

plugins/muc/lock.lib: Need to let creator into the locked room :)
author daurnimator <quae@daurnimator.com>
date Wed, 02 Apr 2014 15:56:37 -0400
parent 6206:f937bb5c83c3
child 6242:67efeadd9e77
comparison
equal deleted inserted replaced
6206:f937bb5c83c3 6207:a5928fdeaf97
43 end 43 end
44 end, 10); 44 end, 10);
45 45
46 -- Don't let users into room while it is locked 46 -- Don't let users into room while it is locked
47 module:hook("muc-occupant-pre-join", function(event) 47 module:hook("muc-occupant-pre-join", function(event)
48 if is_locked(event.room) then -- Deny entry 48 if not event.is_new_room and is_locked(event.room) then -- Deny entry
49 event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found")); 49 event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found"));
50 return true; 50 return true;
51 end 51 end
52 end, -30); 52 end, -30);
53 53