Example #1
0
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()
Example #2
0
def isBotAlive(bot):
    for b in current_bots:
        if b.getName() == bot.getName():
            return True

    return False