forget password if it's wrong and we don't want to save it. Fixes #5862

This commit is contained in:
Yann Leboulanger 2010-08-23 10:04:19 +02:00
parent d16a059168
commit d90e153477
1 changed files with 3 additions and 0 deletions

View File

@ -1320,6 +1320,9 @@ class Connection(CommonConnection, ConnectionHandlers):
self.on_connect_auth(con) self.on_connect_auth(con)
self.on_connect_auth = None self.on_connect_auth = None
else: else:
if not gajim.config.get_per('accounts', self.name, 'savepass'):
# Forget password, it's wrong
self.password = None
gajim.log.debug("Couldn't authenticate to %s" % self._hostname) gajim.log.debug("Couldn't authenticate to %s" % self._hostname)
self.disconnect(on_purpose = True) self.disconnect(on_purpose = True)
self.dispatch('STATUS', 'offline') self.dispatch('STATUS', 'offline')