--- a/plugins/muc/muc.lib.lua Thu Jul 12 02:31:47 2018 +0200
+++ b/plugins/muc/muc.lib.lua Thu Jul 12 02:18:46 2018 +0200
@@ -409,6 +409,13 @@
end
end, 1);
+module:hook("muc-occupant-pre-change", function(event)
+ if not jid_resource(event.dest_occupant.nick):find("%S") then
+ event.origin.send(st.error_reply(event.stanza, "modify", "not-allowed", "Invisible Nicknames are forbidden"));
+ return true;
+ end
+end, 1);
+
function room_mt:handle_first_presence(origin, stanza)
if not stanza:get_child("x", "http://jabber.org/protocol/muc") then
module:log("debug", "Room creation without <x>, possibly desynced");