Number of Users in a chat and on the server

I’m a programmer (i dont know Java) and I was wondering…

in a chat app I’m developing… in the room menu/list I want to display the number of people in each room beside the room name.

Also, I want to also list the amount of people on the server in total when they start the app up.

Is there any way to achieve this off of OpenFire or get this info in a method that isn’t resource intense and efficient?

I’m really curious and I’m thankful to whoever helps.

We can see on number of user and user info of all user in Openfire server at Admin console. We can also see total online user and user info.

Is you asking about server. May be it will help you.

Are you devloping client for Openfire server ?

Hi,

you can query all rooms with

<iq id="1" to="conference.example.org" type="get">
  <query xmlns="http://jabber.org/protocol/disco#items"></query>
</iq>

. This will return a list of rooms and then you can query the number of online people for each room with

<iq id="2" to="roomname@conference.example.org" type="get">
  <query xmlns="http://jabber.org/protocol/disco#info"></query>
</iq>

.

To return the number of all users you could search all users with pattern "". This may miss some users (@example.com) but it’s nearly right.

LG

they’ll be limited to standard alphabet characters and numbers during registration so that shouldn’t be a problem… plus now i can get the list of rooms killing another problem that would’ve popped up… thanks a lot I really appreciate it.