Accessing MUC information

Im fairly new to both ejabberd and erlang, and Im working on a (rest) module that will list all muc rooms and the number of occupants of each room. I'm using mod_rest as a starting point but I can't figure out how to get the list of muc rooms from ejabberd. I was also looking at mod_muc_admin to get clues, but I can't figure out how to do it. any help is appreciated!

maxi wrote: list all muc

maxi wrote:

list all muc rooms and the number of occupants of each room.

I'm using mod_rest as a starting point

I was also looking at mod_muc_admin

First install and enable mod_muc_admin.

Second try the new ejabberd commands. In this example I have only 1 room, and only 1 occupant in that room:

$ ejabberdctl muc_online_rooms global
room1@conference.localhost

$ ejabberdctl get_room_occupants room1 conference.localhost
badlop@localhost/tkab   badlop  moderator

Third, install mod_rest

Four, learn to execute ejabberd commands using mod_rest instead of ejabberdctl

Five, run the muc commands using mod_rest

Syndicate content