Reputation: 663
I use mod_rest module for ejabberd. And i need to add and remove users from rooms from the command line.
Please, help me. How to do it?
Upvotes: 1
Views: 1649
Reputation: 9055
You do not need mod_rest
for that. Lastest ejabberd release support mod_http_api
and can expose all ejabberd commands as API.
There is no command to kick a user from a MUC room. However, the command you should use is likely the one to change affiliation for the user.
If you set affiliation to outcast
, the user will be kicked out of the room and prevented to join again.
For example, from command-line (ejabberdctl), it would be:
ejabberdctl set_room_affiliation room conference.localhost user123@localhost outcast
Similar command can be used from mod_http_admin
.
Another option is also to use XMPP and let an admin account set the proper affiliation from a client or a bot.
Upvotes: 2