def addBot(cmd, botname): bot = BotClient(cmd, botname) bot.setName(botname) for b in current_bots: if not b.is_alive(): current_bots.remove(b) if not isBotAlive(bot): current_bots.append(bot) bot.start() print bot.getName()
def isBotAlive(bot): for b in current_bots: if b.getName() == bot.getName(): return True return False