comparison bot.py @ 90:965dd6f5fcc3

Tried to improve XMPP disconnections handling Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 20 Sep 2009 11:56:03 +0200
parents 8b071629558e
children 69e4fc0f015c
comparison
equal deleted inserted replaced
89:94fc538cdf65 90:965dd6f5fcc3
558 c.lock = threading.RLock() 558 c.lock = threading.RLock()
559 c.lock.acquire() 559 c.lock.acquire()
560 self.xmpp_connections[nickname] = c 560 self.xmpp_connections[nickname] = c
561 c.used_by = 1 561 c.used_by = 1
562 c.nickname = nickname 562 c.nickname = nickname
563 c.mucs = []
563 c.pings = [] 564 c.pings = []
564 c.connect() 565 c.connect()
565 c.auth(self.bare_jid.getNode(), self.password) 566 c.auth(self.bare_jid.getNode(), self.password)
566 c.RegisterHandler('presence', self._xmpp_presence_handler) 567 c.RegisterHandler('presence', self._xmpp_presence_handler)
567 c.RegisterHandler('iq', self._xmpp_iq_handler) 568 c.RegisterHandler('iq', self._xmpp_iq_handler)