summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-16 18:53:13 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-16 18:53:13 +0000
commitfe4dd60b9544e751febd069343c91005e553a1f6 (patch)
tree1f4815f77943b81cd9bdf9e4105425486c236a5d /src
parentdb27041571b6c4b2cf9b7a9567702d8dacba5e74 (diff)
downloadpoezio-fe4dd60b9544e751febd069343c91005e553a1f6.tar.gz
poezio-fe4dd60b9544e751febd069343c91005e553a1f6.tar.bz2
poezio-fe4dd60b9544e751febd069343c91005e553a1f6.tar.xz
poezio-fe4dd60b9544e751febd069343c91005e553a1f6.zip
fix how we get the domain to connect to
Diffstat (limited to 'src')
-rw-r--r--src/connection.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py
index ae480e22..5432a823 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -50,5 +50,9 @@ class Connection(sleekxmpp.ClientXMPP):
def start(self):
# TODO, try multiple servers
- if self.connect((config.get('server', 'anon.louiz.org'), config.get('port', 5222))):
+ if self.anon:
+ domain = config.get('server', 'anon.louiz.org')
+ else:
+ _, domain = config.get('jid', '').split('@', 1)
+ if self.connect((domain, config.get('port', 5222))):
self.process(threaded=True)