Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 7958:47cb54a08336
MUC: Split long line [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 06 Mar 2017 15:35:02 +0100 |
parent | 7706:d92e186c2a1c |
child | 8169:a6574fdf8734 |
comparison
equal
deleted
inserted
replaced
7957:083c062c2fb7 | 7958:47cb54a08336 |
---|---|
515 if module:fire_event(event_name, event) then return true; end | 515 if module:fire_event(event_name, event) then return true; end |
516 | 516 |
517 local nick_changed = dest_occupant and orig_nick ~= dest_occupant.nick; | 517 local nick_changed = dest_occupant and orig_nick ~= dest_occupant.nick; |
518 | 518 |
519 -- Check for nick conflicts | 519 -- Check for nick conflicts |
520 if dest_occupant ~= nil and not is_first_dest_session and bare_jid ~= jid_bare(dest_occupant.bare_jid) then -- new nick or has different bare real jid | 520 if dest_occupant ~= nil and not is_first_dest_session |
521 and bare_jid ~= jid_bare(dest_occupant.bare_jid) then | |
522 -- new nick or has different bare real jid | |
521 log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick); | 523 log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick); |
522 local reply = st.error_reply(stanza, "cancel", "conflict"):up(); | 524 local reply = st.error_reply(stanza, "cancel", "conflict"):up(); |
523 reply.tags[1].attr.code = "409"; | 525 reply.tags[1].attr.code = "409"; |
524 origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); | 526 origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); |
525 return true; | 527 return true; |