From: Bryan O. <bry...@gm...> - 2010-12-21 17:00:11
|
I've got a simple client working that connects to a group chat. Now I want to implement the ability to set the status to 'away' and/or log out of the server. My first attempts don't seem to work -- if I call the disconnect() method on the client that works, but then I'm not able to reconnect. This makes me wonder if there's a more proper way to leave a chatroom. My initialization code looks like this: self.client = xmpp.Client(jid.getdomain(), debug=[]) self.client.connect() self.client.auth(jid.getNode(), password) self.client.sendpresence("%s/%s" % (room, nick)) That all works great and I'm able to chat with people in the room. What must I do to log out of that room (ie: set my status to 'away'), yet be able to log back in later? Thanks! |