summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-08 23:00:55 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-08 23:00:55 +0000
commit77df6feb973f93a4f3cd834322757db8e72ddf1a (patch)
tree3b32fbf23dd0d47980a9a6327a1c0d133eedb85a /src/connection.py
parent007466f6aa080539484870359fbd0a4590020099 (diff)
downloadpoezio-77df6feb973f93a4f3cd834322757db8e72ddf1a.tar.gz
poezio-77df6feb973f93a4f3cd834322757db8e72ddf1a.tar.bz2
poezio-77df6feb973f93a4f3cd834322757db8e72ddf1a.tar.xz
poezio-77df6feb973f93a4f3cd834322757db8e72ddf1a.zip
remove one more possible ncurses glitch by using a muttex. Also correctly receive the error messages. And little cleanup
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py13
1 files changed, 12 insertions, 1 deletions
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):