summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
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):