Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 3446:9c0b3cd890e9
MUC: Fixed: Unavilable presence was not being broadcasted for banned users in some cases (thanks Zash).
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 03 Aug 2010 21:37:06 +0500 |
| parents | 2fde9cb97f76 |
| children | 0f46acca11cc b639042bb0d5 |
comparison
equal
deleted
inserted
replaced
| 3445:2fde9cb97f76 | 3446:9c0b3cd890e9 |
|---|---|
| 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 |
