comparison src/sat.tac @ 324:b069055320b1

core: fixed bad profile check in connect method
author Goffi <goffi@goffi.org>
date Tue, 10 May 2011 15:46:20 +0200
parents cc8ffbfe938c
children 608a4a2ba94e
comparison
equal deleted inserted replaced
323:7bc1b3401ecb 324:b069055320b1
446 446
447 def connect(self, profile_key = '@DEFAULT@'): 447 def connect(self, profile_key = '@DEFAULT@'):
448 """Connect to jabber server""" 448 """Connect to jabber server"""
449 449
450 profile = self.memory.getProfileName(profile_key) 450 profile = self.memory.getProfileName(profile_key)
451 if not profile_key: 451 if not profile:
452 error (_('Trying to connect a non-exsitant profile')) 452 error (_('Trying to connect a non-exsitant profile'))
453 return 453 return
454 454
455 if (self.isConnected(profile)): 455 if (self.isConnected(profile)):
456 info(_("already connected !")) 456 info(_("already connected !"))
457 return 457 return
458 current = self.profiles[profile] = SatXMPPClient(self, profile, 458 current = self.profiles[profile] = SatXMPPClient(self, profile,
459 jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key = profile_key), profile), 459 jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key = profile), profile),
460 self.memory.getParamA("Password", "Connection", profile_key = profile_key), 460 self.memory.getParamA("Password", "Connection", profile_key = profile),
461 self.memory.getParamA("Server", "Connection", profile_key = profile_key), 5222) 461 self.memory.getParamA("Server", "Connection", profile_key = profile), 5222)
462 462
463 current.messageProt = SatMessageProtocol(self) 463 current.messageProt = SatMessageProtocol(self)
464 current.messageProt.setHandlerParent(current) 464 current.messageProt.setHandlerParent(current)
465 465
466 current.roster = SatRosterProtocol(self) 466 current.roster = SatRosterProtocol(self)