Hi to everyone,
I'm using Ejabberd as XMPP server and now I'm developing some web services related with the multi-user chat rooms. My idea is to develop a web service to list all the info about a room (participants, etc), a web service to list all the rooms on the server, a web service to list all the rooms related with a user, and some other web services like these.
As I can see, Ejabberd by default only have two DB tables related with MUCs. The "muc_registered" which is always empty and the "muc_rooms" which have partial info about the rooms.
Also I saw that there is a module to manage all the things related with the MUCs (mod_muc_admin) which works via CLI.
I think that all the info that I want to retrieve for the web services is available with the module CLI, but I think that develop a web service that calls a CLI on the server is not pretty nice and not so secure.
So my question is, there's any way to retrieve all this info without call a CLI?
I have been looking for at the BD but I can't find all the needed info.
Can anyone help me? It's possible what I want to do?
Many thanks!!!
Regarding database
Regarding database tables:
Mnesia tables (I guess can be configured to store in ODBC):
- muc_registered, keeps all the nicks that users have reserved for use in the MUC service
- muc_online_room keeps the list of all existing rooms
- muc_room keeps the configuration of persistent rooms, but not temporary ones
There's also the ETS table 'muc_online_users' (but that surely can't be stored in ODBC).
So... yes, most of the information you want isn't available in the databases.
mod_muc_admin provides webadmin pages and ejabberd commands.
ejabberd commands can be run using the shell's ejabberdctl, which is NOT recommended to perfom many calls, because it's very slow. But you can also use XMLRPC or REST calls, thanks to ejabberd_xmlrpc, or mod_rest. And if you configure access_commands properly, you can grant your script permission to only call the few commands that you really want.
Thanks mate! I'll review the
Thanks mate!
I'll review the modules xmlrpc and rest.
It sounds interesting
=)