powered by Jive Software

Openfire get online only

have one doubt. I am using Openfire XMPP server.

How to get Online members only?
i want get online members only from openfire server.So. i have decided alter the openfire source code.
please give me the details ,where to change the code in openfire source?

server.getUserManager().getInstance().getUsers() //<----get all user

Collection userList=userManager.getUsers();
for (User user : userList) {
Presence presence=presenceManager.getPresence(user);
if(presence!=null){

presence.getStatus() //<–this is user status
}

}

Can you expand on this @gznofeng?