[ejabberd] disconnexion if doublon?

Konstantin Khomoutov flatworm at users.sourceforge.net
Mon May 28 14:35:02 MSK 2012


On Sat, 26 May 2012 16:19:05 +0200
Bzzz <lazyvirus at gmx.com> wrote:

> > The easiest way to force the old user to logout is to use the same
> > xmpp resource for both user sessions.  Most clients let the server
> > randomly generate the resource, but if you specify it manually you
> > can get the behavior of forcing the old session to disconnect.
> 
> Hu? 
> Could you be more precise please? I'm not that advanced!
You either have to become advanced enough or have someone else solve
this problem for you.
Resource binding is an integral (and useful) part of the protocol, so
it's kind of assumed you have to possess certain basic knowledge about
the protocol to operate a network which uses it.
See http://xmpp.org/rfcs/rfc6120.html#bind for more info.

> The best way would be an automatic behavior - but AFAIK I can't do
> that with the number of connections per user as (from what I
> understood) a file transfer is also counted a a connection:(
Just set their XMPP clients to have static resource configured.
This can be (almost any) string, say, "Office" if this is a corporate
network.  Or you can educate them about how to gain advantages of the
concept of recources and their different priorities.


More information about the ejabberd mailing list