# HG changeset patch # User Kim Alvefur # Date 1502018867 -7200 # Node ID d43012448c1ff7d0dc65eab0c406cdf2859c66bd # Parent 331caee0c774f4d2cece96a8d0aae47288058922 MUC: Use variable that actually exists (thanks Martin) diff -r 331caee0c774 -r d43012448c1f plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Fri Aug 04 20:27:43 2017 +0200 +++ b/plugins/muc/muc.lib.lua Sun Aug 06 13:27:47 2017 +0200 @@ -437,7 +437,7 @@ else -- change nick -- a MUC service MUST NOT allow empty or invisible Room Nicknames -- (i.e., Room Nicknames that consist only of one or more space characters). - if not select(3, jid_split(nick)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 + if not select(3, jid_split(to)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 module:log("debug", "Rejecting invisible nickname"); origin.send(st.error_reply(stanza, "cancel", "not-allowed")); return; @@ -476,7 +476,7 @@ else -- enter room -- a MUC service MUST NOT allow empty or invisible Room Nicknames -- (i.e., Room Nicknames that consist only of one or more space characters). - if not select(3, jid_split(nick)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 + if not select(3, jid_split(to)):find("[^ ]") then -- resourceprep turns all whitespace into 0x20 module:log("debug", "Rejecting invisible nickname"); origin.send(st.error_reply(stanza, "cancel", "not-allowed")); return;