def nyaa(ctx, pline, ud):
    nyaa_list, last_nyaa_users = ud
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = list(set(user.name for user in mylist) -
                        set([ctx.nickname]))
        nick = random.choice(nicklist)
        while nick.lower() in last_nyaa_users:
            nick = random.choice(nicklist)
        last_nyaa_users.append(nick.lower())
        last_nyaa_users = last_nyaa_users[-min(5, len(nicklist)):]

        target = nick.decode('utf-8')
    else:
        target = u' '.join(arg.strip() for arg in args[1:]).decode('utf-8')

    while True:
        index = random.randrange(len(nyaa_list))
        if index not in last_nyaas:
            break
    last_nyaas.append(index)
    if len(last_nyaas) > 5:
        last_nyaas.pop(0)
    ctx.command(u"/me {}".format(nyaa_list[index].format(target)))
示例#2
0
def nyaa(ctx, pline, ud):
    nyaa_list, last_nyaa_users = ud
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = [user.name for user in mylist if ctx.nickname != user.name]
        nick = random.choice(nicklist)
        if len(nicklist) > len(last_nyaa_users):
            while nick.lower() in last_nyaa_users:
                nick = random.choice(nicklist)
        last_nyaa_users.append(nick.lower())
        last_nyaa_users = last_nyaa_users[-min(5, len(nicklist)):]

        target = nick.decode('utf-8')
    else:
        target = u' '.join(arg.strip() for arg in args[1:]).decode('utf-8')

    while True:
        index = random.randrange(len(nyaa_list))
        if index not in last_nyaas:
            break
    last_nyaas.append(index)
    if len(last_nyaas) > 5:
        last_nyaas.pop(0)
    ctx.command(u"/me {}".format(nyaa_list[index].format(target)))
def poo(ctx, pline, userdata):
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = list(set(user.name for user in mylist) -
                        set([ctx.nickname]))
        nick = random.choice(nicklist)
        ctx.command("/me throws 💩 at {}.".format(nick.strip()))
    else:
        ctx.command("/me throws 💩 at {}.".format(args[1].strip()))
def kill(ctx, pline, userdata):
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = list(set(user.name for user in mylist) -
                        set([ctx.nickname]))
        nick = random.choice(nicklist)
        ctx.command(u"/me makes {} disappear with her SUKIYUKI CHING CHANG SPIRIT BEAM.".format(nick.strip()))
    else:
        ctx.command(u"/me makes {} disappear with her SUKIYUKI CHING CHANG SPIRIT BEAM.".format(args[1].strip()))
示例#5
0
def poo(ctx, pline, userdata):
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = list(set(user.name for user in mylist) -
                        set([ctx.nickname]))
        nick = random.choice(nicklist)
        ctx.command("/me throws 💩 at {}.".format(nick.strip()))
    else:
        ctx.command("/me throws 💩 at {}.".format(args[1].strip()))
示例#6
0
def kill(ctx, pline, userdata):
    args = pline.trailing.split(None, 1)
    if len(args) == 1:
        mylist = infolist_get(
            "irc_nick", "{},{}".format(ctx.server, ctx.channel))
        nicklist = list(set(user.name for user in mylist) -
                        set([ctx.nickname]))
        nick = random.choice(nicklist)
        ctx.command(u"/me makes {} disappear with her SUKIYUKI CHING CHANG SPIRIT BEAM.".format(nick.strip()))
    else:
        ctx.command(u"/me makes {} disappear with her SUKIYUKI CHING CHANG SPIRIT BEAM.".format(args[1].strip()))