From 77df6feb973f93a4f3cd834322757db8e72ddf1a Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Wed, 8 Sep 2010 23:00:55 +0000 Subject: remove one more possible ncurses glitch by using a muttex. Also correctly receive the error messages. And little cleanup --- src/connection.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/connection.py') diff --git a/src/connection.py b/src/connection.py index b00bc014..797205d9 100644 --- a/src/connection.py +++ b/src/connection.py @@ -37,8 +37,19 @@ class Connection(sleekxmpp.ClientXMPP): appropriate signals """ def __init__(self): - sleekxmpp.ClientXMPP.__init__(self, None, None, ssl=True, + if config.get('jid', ''): + self.anon = False # Field used to know if we are anonymous or not. + # many features will be handled diferently + # depending on this setting + jid = config.get('jid', '') + password = config.get('password', '') + else: # anonymous auth + self.anon = True + jid = None + password = None + sleekxmpp.ClientXMPP.__init__(self, jid, password, ssl=True, resource=config.get('resource', 'poezio')) + self.registerPlugin('xep_0045') def start(self): -- cgit v1.2.3