def setUp(self): #Net queues are the queues going into the bot #from the "network" #net_write is what you write to when simulating #data going into the bot. #net_read is what the bot outputs to self.net_write = Queue(10) self.net_read = Queue(10) self.bot = Bot((self.net_read, self.net_write)) self.bot_process = Thread(target=self.bot.run) self.bot_process.start()
connect_port = int(config["connection"]["port"]) nick = config["bot"]["nick"] name = config["bot"]["name"] net = None if len(sys.argv) == 2: if sys.argv[1] == "record": conn = simple_connect((connect_host, connect_port)) net = record(conn, "RECORD") if sys.argv[1] == "replay": net = replay("RECORD") else: net = simple_connect((connect_host, connect_port)) b = Bot(net) b.nick = nick b.real_name = name plugins = """alias alarm chance colorize date fortune gayify google.define google.search google.youtube invite joiner m528