Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 9026:91b5a5667016
MUC: Use nickname from occupant object
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 12 Jul 2018 02:31:47 +0200 |
parent | 9025:0f12d46cf754 |
child | 9027:4028eb4a9f7f |
comparison
equal
deleted
inserted
replaced
9025:0f12d46cf754 | 9026: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); |