summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py
index 80c41ee8..f4db0816 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -34,7 +34,9 @@ class Connection(sleekxmpp.ClientXMPP):
self.anon = False # Field used to know if we are anonymous or not.
# many features will be handled diferently
# depending on this setting
- jid = '%s/%s' % (config.get('jid', ''), resource)
+ jid = '%s' % config.get('jid', '')
+ if resource:
+ jid = '%s/%s' (jid, resource)
password = config.get('password', '') or getpass.getpass()
else: # anonymous auth
self.anon = True