Mercurial > xib
changeset 256:f14b32e7fdb5
(muc) auto_reconnect must be set in join() not in __init__() because we turn it to False in leave()
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sat, 13 Mar 2010 14:25:34 +0100 |
parents | 38dd27098fef |
children | 1a8401d6bc93 |
files | muc.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/muc.py +++ b/muc.py @@ -32,10 +32,9 @@ class muc: class RemoteServerNotFound(Exception): pass class NotConnected(Exception): pass - def __init__(self, room_jid, auto_reconnect=True): + def __init__(self, room_jid): self.room_jid = room_jid self.connected = False - self.auto_reconnect = auto_reconnect self.participants = {} @@ -65,11 +64,12 @@ class muc: self.xmpp_c.send(stanza) - def join(self, xmpp_c, nickname, status=None, callback=None): + def join(self, xmpp_c, nickname, status=None, callback=None, auto_reconnect=True): """Join room on xmpp_c connection using nickname""" self.jid = self.room_jid+'/'+nickname self.nickname = nickname self.status = status + self.auto_reconnect = auto_reconnect self.xmpp_c = xmpp_c self.xmpp_c.mucs.append(self) self._join(callback=callback)