Commit a0db468f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Process that cleans up idle occupants also removes MUCUsers that are not...

Process that cleans up idle occupants also removes MUCUsers that are not present in any room. JM-529

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3321 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6154ae05
...@@ -296,6 +296,12 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha ...@@ -296,6 +296,12 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
if (user.getLastPacketTime() < deadline) { if (user.getLastPacketTime() < deadline) {
// Kick the user from all the rooms that he/she had previuosly joined // Kick the user from all the rooms that he/she had previuosly joined
Iterator<MUCRole> roles = user.getRoles(); Iterator<MUCRole> roles = user.getRoles();
// If user is not present in any room then remove the user from
// the list of users
if (!roles.hasNext()) {
removeUser(user.getAddress());
continue;
}
MUCRole role; MUCRole role;
MUCRoom room; MUCRoom room;
Presence kickedPresence; Presence kickedPresence;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment