#NEWLINE# def part( self , sock , source , name , reason = 'Leaving' ) : #NEWLINE# #INDENT# user = self . users [ sock ] #NEWLINE# channel = self . channels [ name ] #NEWLINE# self . _notify ( channel . users , Message ( 'PART' , name , reason , prefix = user . prefix ) ) #NEWLINE# user . channels . remove ( name ) #NEWLINE# channel . users . remove ( user ) #NEWLINE# if ( not channel . users ) : #NEWLINE# #INDENT# del self . channels [ name ]