plugins/muc/muc.lib.lua
changeset 9029 91b5a5667016
parent 9028 0f12d46cf754
child 9030 4028eb4a9f7f
equal deleted inserted replaced
9028:0f12d46cf754 9029:91b5a5667016
   400 		return true;
   400 		return true;
   401 	end
   401 	end
   402 end, -10);
   402 end, -10);
   403 
   403 
   404 module:hook("muc-occupant-pre-join", function(event)
   404 module:hook("muc-occupant-pre-join", function(event)
   405 	local nick = jid_resource(event.stanza.attr.from);
   405 	local nick = jid_resource(event.occupant.nick);
   406 	if not nick:find("%S") then
   406 	if not nick:find("%S") then
   407 		event.origin.send(st.error_reply(event.stanza, "modify", "not-allowed", "Invisible Nicknames are forbidden"));
   407 		event.origin.send(st.error_reply(event.stanza, "modify", "not-allowed", "Invisible Nicknames are forbidden"));
   408 		return true;
   408 		return true;
   409 	end
   409 	end
   410 end, 1);
   410 end, 1);