def __init__(): """ Connects to IRC """ server = input_function("Server: ") channel = input_function("Channel: ") ircsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ircsock.connect((server, 6667)) ircsock.send("USER "+ botnick +" "+ botnick +" "+ botnick +" :Connected!\n") # user authentication ircsock.send("NICK "+ botnick +"\n") # assign the nickname ircsock.send("JOIN "+ channel +"\n") # connect to channel
def get_feedback(): from chatterbot.utils.read_input import input_function text = input_function() if 'Yes' in text: return True elif 'No' in text: return False else: print('Please type either "Yes" or "No"') return get_feedback()
def process_input(self): """ Read the user's input from the terminal. """ user_input = input_function() return user_input
def process_input(self, *args, **kwargs): """ Read the user's input from the terminal. """ user_input = input_function() return user_input
def process_input(self, *args, **kwargs): """ Read the user's input from the terminal. """ user_input = input_function() return Statement(user_input)