Updated .kill to use TextGenerator! :)

This commit is contained in:
Luke Rogers 2013-09-15 23:00:53 +12:00
parent 00f7e35a24
commit d5163a846a
3 changed files with 81 additions and 26 deletions

View file

@ -5,10 +5,6 @@ with open("plugins/data/larts.txt") as f:
larts = [line.strip() for line in f.readlines()
if not line.startswith("//")]
with open("plugins/data/kills.txt") as f:
kills = [line.strip() for line in f.readlines()
if not line.startswith("//")]
with open("plugins/data/insults.txt") as f:
insults = [line.strip() for line in f.readlines()
if not line.startswith("//")]
@ -37,26 +33,6 @@ def lart(inp, me=None, nick=None, conn=None, notice=None):
me(phrase.format(**values))
@hook.command
def kill(inp, me=None, nick=None, conn=None, notice=None):
"""kill <user> -- Makes the bot kill <user>."""
target = inp.strip()
if " " in target:
notice("Invalid username!")
return
# if the user is trying to make the bot slap itself, slap them
if target.lower() == conn.nick.lower() or target.lower() == "itself":
target = nick
values = {"user": target}
phrase = random.choice(kills)
# act out the message
me(phrase.format(**values))
@hook.command
def insult(inp, nick=None, me=None, conn=None, notice=None):
"""insult <user> -- Makes the bot insult <user>."""