[ejabberd] Limiting muc participation to only allow one connection per member

Aaron Brashears aaron at stageit.com
Wed Nov 3 21:51:55 MSK 2010

Hello. I would like to set up an ejabberd instance which only allows
one connection to a room per bare jid. I would like it so that when a
member connects a second time to the same room, the old session is
dropped and the new session successfully connects and gets the
requested nick if it collided with the previous session. I have
thought of a couple of ways to potentially accomplish this:

* Modify mod_muc such that it detects bare jid collisions and kicks
the old session. I am not sure if this will allow me to easily
accomplish nick possession since the room state will contain both jids
during the kick.
* We are doing pre-negotiated bosh sessions on the server so during
that negotiation, the negotiator could ask for a room list and kick a
session it finds. This solution suffers from race conditions around
nick possession.

Is there an easier way to accomplish this? Has anyone done this?

More information about the ejabberd mailing list