#NEWLINE# def on_user_action( self , item ) : #NEWLINE# #INDENT# if ( item == ( - 1 ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( not ( G . AGENT and G . AGENT . is_ready ( ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# username = self . user [ 0 ] #NEWLINE# action = self . actions [ item ] #NEWLINE# if ( action == 'Kick' ) : #NEWLINE# #INDENT# for c in self . user [ 1 ] : #NEWLINE# #INDENT# G . AGENT . kick ( c [ 'user_id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( action == 'Follow' ) : #NEWLINE# #INDENT# msg . debug ( ( 'Following %s' % username ) ) #NEWLINE# G . FOLLOW_MODE = True #NEWLINE# G . FOLLOW_USERS . add ( username ) #NEWLINE# G . AGENT . highlight ( user = username ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( action == 'Unfollow' ) : #NEWLINE# #INDENT# msg . debug ( ( 'Unfollowing %s' % username ) ) #NEWLINE# G . FOLLOW_USERS . remove ( username ) #NEWLINE# if ( not G . FOLLOW_USERS ) : #NEWLINE# #INDENT# G . FOLLOW_MODE = False