#NEWLINE# def irc_command_PART( self , command , args , nick , user , host ) : #NEWLINE# #INDENT# '\n        Received whenever a user, including ourself, leaves a channel.\n        ' #NEWLINE# chan = args [ 0 ] #NEWLINE# if ( nick == self . _nick ) : #NEWLINE# #INDENT# if ( chan in self . _joining ) : #NEWLINE# #INDENT# self . _joining . remove ( chan ) #NEWLINE# #UNINDENT# if ( chan in self . _channels ) : #NEWLINE# #INDENT# del self . _channels [ chan ] #NEWLINE# #UNINDENT# #UNINDENT# if ( chan in self . _channels ) : #NEWLINE# #INDENT# name = nick #NEWLINE# while ( name [ 0 ] in '@+' ) : #NEWLINE# #INDENT# name = name [ 1 : ] #NEWLINE# #UNINDENT# if ( name in self . _channels [ chan ] . users ) : #NEWLINE# #INDENT# self . _channels [ chan ] . users . remove ( name ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( args ) < 2 ) : #NEWLINE# #INDENT# args . append ( '' ) #NEWLINE# #UNINDENT# self . irc_part ( chan , args [ 1 ] , nick , user , host )