from util import hook import re import random kills = ["rips off 's and leaves them to die.", "grabs 's head and rips it clean off their body.", "grabs a machine gun and riddles 's body with bullets.", "gags and ties then throws them off a bridge.", "crushes with a huge spiked boulder.", "rams a rocket launcher up 's ass and lets off a few rounds.", "crushes 's skull in with a spiked mace.", "feeds to an owlbear.", "puts into a sack, throws the sack in the river, and hurls the river into space.", "goes bowling with 's head.", "sends to /dev/null!", "feeds coke and mentos till they pop!"] body = ['head', 'arms', 'leg', 'arm', '"special parts"'] @hook.command def kill(inp, me = None, nick = None, input=None, notice=None): ".kill - kill a user" 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": msg = 'kills ' + nick + ' and rakes their corpse (:3)' else: kill = random.choice(kills) kill = re.sub ('', inp, kill) msg = re.sub ('', random.choice(body), kill) me(msg)