2012-02-02 14:05:11 +01:00
|
|
|
from util import hook
|
|
|
|
import re
|
|
|
|
import random
|
|
|
|
|
|
|
|
kills = ["rips off <who>'s <body> and leaves them to die.",
|
|
|
|
"grabs <who>'s head and rips it clean off their body.",
|
|
|
|
"grabs a machine gun and riddles <who>'s body with bullets.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"sends The Terminator on a mission to retrieve <who>'s <body>.",
|
2012-02-02 14:05:11 +01:00
|
|
|
"gags and ties <who> then throws them off a bridge.",
|
|
|
|
"crushes <who> with a huge spiked boulder.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"glares at <who> until they die of boredom.",
|
2012-03-02 18:53:46 +01:00
|
|
|
"stuffs a few TNT blocks under <who>'s bed, and sets them off.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"shivs <who> in the <body>.",
|
2012-02-02 14:05:11 +01:00
|
|
|
"rams a rocket launcher up <who>'s ass and lets off a few rounds.",
|
2012-02-22 02:03:09 +01:00
|
|
|
"crushes <who>'s skull in with a spiked mace.",
|
2012-03-02 18:53:46 +01:00
|
|
|
"unleashes the armies of Isengard on <who>.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"packs <who> into a SVN repo.",
|
2012-03-03 23:34:21 +01:00
|
|
|
"slices <who>'s <body> off with a Katana",
|
2012-03-02 18:53:46 +01:00
|
|
|
"throws <who> to Cthulu!",
|
2012-02-22 02:03:09 +01:00
|
|
|
"feeds <who> to an owlbear.",
|
2012-03-02 18:53:46 +01:00
|
|
|
"turns <who> into a snail, and then salts them.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"snacks on <who>'s <body>.",
|
2012-02-22 02:03:09 +01:00
|
|
|
"puts <who> into a sack, throws the sack in the river, and hurls the river into space.",
|
|
|
|
"goes bowling with <who>'s head.",
|
2012-03-03 23:28:42 +01:00
|
|
|
"uses <who>'s <body> as a back-scratcher.",
|
2012-02-22 02:03:09 +01:00
|
|
|
"sends <who> to /dev/null!",
|
|
|
|
"feeds <who> coke and mentos till they pop!"]
|
2012-02-02 14:05:11 +01:00
|
|
|
|
|
|
|
body = ['head',
|
|
|
|
'arms',
|
|
|
|
'leg',
|
|
|
|
'arm',
|
|
|
|
'"special parts"']
|
|
|
|
|
|
|
|
@hook.command
|
2012-02-29 09:29:53 +01:00
|
|
|
def kill(inp, me=None, nick=None, input=None, notice=None):
|
2012-02-28 03:03:43 +01:00
|
|
|
".kill <user> -- Makes the bot kill <user>."
|
2012-02-02 14:05:11 +01:00
|
|
|
inp = inp.strip()
|
|
|
|
|
|
|
|
if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()):
|
|
|
|
notice("Invalid username!")
|
|
|
|
return
|
|
|
|
|
|
|
|
if inp == input.conn.nick.lower() or inp == "itself":
|
2012-02-29 08:31:42 +01:00
|
|
|
kill = random.choice(kills)
|
|
|
|
kill = re.sub ('<who>', nick, kill)
|
|
|
|
msg = re.sub ('<body>', random.choice(body), kill)
|
2012-02-02 14:05:11 +01:00
|
|
|
else:
|
|
|
|
kill = random.choice(kills)
|
|
|
|
kill = re.sub ('<who>', inp, kill)
|
|
|
|
msg = re.sub ('<body>', random.choice(body), kill)
|
|
|
|
|
|
|
|
me(msg)
|