237 self:route_stanza(pr); |
237 self:route_stanza(pr); |
238 if jid ~= new_jid then |
238 if jid ~= new_jid then |
239 pr = st.clone(occupant.sessions[new_jid]) |
239 pr = st.clone(occupant.sessions[new_jid]) |
240 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) |
240 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) |
241 :tag("item", {affiliation=occupant.affiliation, role=occupant.role}); |
241 :tag("item", {affiliation=occupant.affiliation, role=occupant.role}); |
|
242 pr.attr.from = current_nick; |
242 self:broadcast_except_nick(pr, current_nick); |
243 self:broadcast_except_nick(pr, current_nick); |
243 end |
244 end |
244 else |
245 else |
245 occupant.role = 'none'; |
246 occupant.role = 'none'; |
246 self:broadcast_presence(pr, from); |
247 self:broadcast_presence(pr, from); |