plugins/muc/password.lib.lua
changeset 9458 c62c983b8be3
parent 9038 173c0e16e704
child 10451 b5fd1637f15c
--- a/plugins/muc/password.lib.lua	Tue Oct 09 15:02:44 2018 +0100
+++ b/plugins/muc/password.lib.lua	Tue Oct 09 18:42:19 2018 +0200
@@ -42,6 +42,7 @@
 -- Don't allow anyone to join room unless they provide the password
 module:hook("muc-occupant-pre-join", function(event)
 	local room, stanza = event.room, event.stanza;
+	if not get_password(room) then return end
 	local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc");
 	if not muc_x then return end
 	local password = muc_x:get_child_text("password", "http://jabber.org/protocol/muc");