Beispiel #1
0
def backflip(e, bot):
    if bot.bfcounter < 12:
        bot.reply(e, irc.action("does "+" ".join(adjective())+" backflip and lands on its "+bodypart()))
        bot.bflast = time.time()
        bot.bfcounter += 1
        if bot.bflast + 60 < time.time():
            bot.bfcounter = 1
    elif bot.bfcounter == 12:
        bot.bfcounter = 13
        bot.reply(e, irc.action("is too tired to backflip right now"))
        time.sleep(60)
        bot.bfcounter = 0
Beispiel #2
0
def do(e, bot):
    words = e.msg.split()
    if len(words) < 3:
        bot.reply(e, "Usage : !do #channel action")
        if auth(e.source) >= HOP:
            bot.reply(e, "        !do nick action")
        return
    if auth(e.source) >= HOP or e.args[0][0] in "#&":
        bot.sendMsg(words[1], irc.action(" ".join(words[2:])))
Beispiel #3
0
def violence(e, bot): # never the answer
    if(e.type == irc.ACTION and re.search("(hits|kicks|slaps|punches|crushes|maims|harms|shoots|stabs) " + i.nick, e.msg, re.I)):
        if e.channel == "#eqbeats" and random.random() < 0.1:
            bot.reply(e, "You thought you could abuse old EqBot, that pushover. Well, new EqBot is not going to have any of that!")
            time.sleep(0.5)
            bot.sendMsg("ChanServ", "kick #eqbeats " + e.sourceNick)
        else:
            bot.reply(e, random.choice((
                "Ow!",
                "Stop that!",
                "HALP!",
                ":(",
                "You broke my " + bodypart() + "!",
                "I don't like you. :(",
                irc.action("cries"),
                irc.action("flails"),
                irc.action("whimpers"),
                irc.action("whines"),
                irc.action("flees"))
            ))
Beispiel #4
0
def flip(e, bot, flip="flip"):
    if len(e.args) == 0:
        e.reply(irc.action(random.choice((
            flip + "s a table (╯°□°)╯︵ ┻━┻",
            flip + "s a table (╯°□°)╯︵ ┻━┻",
            flip + "s a table ┻━┻ ︵╰(°□°╰)",
            flip + "s a table ┻━┻ ︵╰(°□°╰)",
            flip + "s some tables ┻━┻ ︵╰(°□°)╯︵ ┻━┻",
            flip + "s a chair (╯°□°)╯︵ =|_",
            flip + "s a chair _|= ︵╰(°□°╰)",
            flip + "s some chairs _|= ︵╰(°□°)╯︵ =|_"
            ))))
    elif e.args[0] == "table":
        e.reply(irc.action(random.choice((
            flip + "s a table (╯°□°)╯︵ ┻━┻",
            flip + "s a table ┻━┻ ︵╰(°□°╰)",
            ))))
    elif e.args[0] == "tables":
        e.reply(irc.action(
            flip + "s some tables ┻━┻ ︵╰(°□°)╯︵ ┻━┻"
            ))
    elif e.args[0] == "chair":
        e.reply(irc.action(random.choice((
            flip + "s a chair (╯°□°)╯︵ =|_",
            flip + "s a chair _|= ︵╰(°□°╰)",
            ))))
    elif e.args[0] == "chairs":
        e.reply(irc.action(
            flip + "s some chairs _|= ︵╰(°□°)╯︵ =|_"
            ))
    elif e.args[0] == "back":
        if flip == "flop":
            backflop(e, bot)
        else:
            backflip(e, bot)
    else:
        flipped = list(" ".join(e.args).lower().translate(flipmap))
        flipped.reverse()
        flipped = "".join(flipped)
        e.reply(irc.action(
            flip + "s " +
            ("an" if e.args[0][0] in "aeiouAEIOU" else "a") + " " +
            " ".join(e.args) + " " +
            "(╯°□°)╯︵ " + flipped
            ))
Beispiel #5
0
 def react(self, e, act):
     msg = irc.action(act)
     dest = e.sourceNick
     if e.channel:
         dest = e.channel
     self.sendMsg(dest, msg)
Beispiel #6
0
Datei: bot.py Projekt: codl/eqbot
 def react(self, e, act):
     msg = irc.action(act)
     dest = e.sourceNick
     if e.channel:
         dest = e.channel
     self.sendMsg(dest, msg)
Beispiel #7
0
def backflop(e, bot):
    e.reply(irc.action("flops around on its back"))