Updated so that server mode can reject incoming XMPP connections.