Adding a server JID to a roster, to force-connect to a server
We should use the roster, to decide to which servers we want to stay connected to:
Let’s add “firstname.lastname@example.org” to our roster:
its presence indicates our connection state to this server, as it already does at the moment, but in addition, if the client sends an available presence to this JID, biboumi should connect to this server, without the need to join any channel.
Sending an unavailable presence to this JID would NOT force-disconnect the user from that server, it would just disable the force-connect to it. It’s just an additional way to stay connected to a server :
biboumi stays connected to a server as long as one, or both, of these is true:
- a channel is joined on that server
- an available presence has been received for that server (and no subsequent unavailable presence has been received)