equal
deleted
inserted
replaced
860 end |
860 end |
861 end |
861 end |
862 local modified_nicks = {}; |
862 local modified_nicks = {}; |
863 for nick, occupant in pairs(self._occupants) do |
863 for nick, occupant in pairs(self._occupants) do |
864 if jid_bare(occupant.jid) == jid then |
864 if jid_bare(occupant.jid) == jid then |
|
865 t_insert(modified_nicks, nick); |
865 if not role then -- getting kicked |
866 if not role then -- getting kicked |
866 self._occupants[nick] = nil; |
867 self._occupants[nick] = nil; |
867 else |
868 else |
868 t_insert(modified_nicks, nick); |
|
869 occupant.affiliation, occupant.role = affiliation, role; |
869 occupant.affiliation, occupant.role = affiliation, role; |
870 end |
870 end |
871 p.attr.from = nick; |
871 p.attr.from = nick; |
872 for jid in pairs(occupant.sessions) do -- remove for all sessions of the nick |
872 for jid in pairs(occupant.sessions) do -- remove for all sessions of the nick |
873 if not role then self._jid_nick[jid] = nil; end |
873 if not role then self._jid_nick[jid] = nil; end |