#NEWLINE# def player_logout( self , broken_pipe = False ) : #NEWLINE# #INDENT# if self . dbid : #NEWLINE# #INDENT# self . save ( ) #NEWLINE# if ( not broken_pipe ) : #NEWLINE# #INDENT# self . world . play_log . info ( ( '%s has exited.' % self . fancy_name ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . world . play_log . info ( ( '%s has been disconnected (broken pipe).' % self . fancy_name ( ) ) ) #NEWLINE# #UNINDENT# self . conn . close ( ) #NEWLINE# if ( hasattr ( self , 'location' ) and self . location ) : #NEWLINE# #INDENT# self . location . remove_char ( self ) #NEWLINE# #UNINDENT# self . world . player_remove ( self . name ) #NEWLINE# self . world . tell_players ( ( '%s has left the world.' % self . fancy_name ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . conn . close ( ) #NEWLINE# self . world . player_remove ( self . name ) #NEWLINE# self . world . log . debug ( 'Logging out an unnamed player.' )