#NEWLINE# def logOn( self , chatui ) : #NEWLINE# #INDENT# 'Log on to this account.\n\n        Takes care to not start a connection if a connection is\n        already in progress.  You will need to implement\n        L{_startLogOn} for this to work, and it would be a good idea\n        to override L{_loginFailed} too.\n\n        @returntype: Deferred L{interfaces.IClient}\n        ' #NEWLINE# if ( ( not self . _isConnecting ) and ( not self . _isOnline ) ) : #NEWLINE# #INDENT# self . _isConnecting = 1 #NEWLINE# d = self . _startLogOn ( chatui ) #NEWLINE# d . addCallback ( self . _cb_logOn ) #NEWLINE# d . addCallback ( chatui . registerAccountClient ) #NEWLINE# d . addErrback ( self . _loginFailed ) #NEWLINE# return d #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise error . ConnectError ( 'Connection in progress' )