From 98fd5887366ff8cebec56e3c556f6301b0afc0f7 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Thu, 18 Oct 2012 10:03:17 +1300 Subject: [PATCH] Finished updating violence.py --- plugins/data/kill_bodyparts.txt | 9 -- plugins/data/larts.txt | 210 ++++++++++++++++---------------- plugins/violence.py | 27 ++-- 3 files changed, 114 insertions(+), 132 deletions(-) delete mode 100755 plugins/data/kill_bodyparts.txt diff --git a/plugins/data/kill_bodyparts.txt b/plugins/data/kill_bodyparts.txt deleted file mode 100755 index 8477e68..0000000 --- a/plugins/data/kill_bodyparts.txt +++ /dev/null @@ -1,9 +0,0 @@ -head -arms -legs -arm -leg -toes -fingers -"special parts" -"man bits" diff --git a/plugins/data/larts.txt b/plugins/data/larts.txt index b4a831c..6746b52 100755 --- a/plugins/data/larts.txt +++ b/plugins/data/larts.txt @@ -1,105 +1,105 @@ -swaps 's shampoo with glue. -installs Windows on 's computer. -forces to use perl for 3 weeks. -registers 's name with 50 known spammers. -resizes 's console to 40x24. -takes 's drink. -dispenses 's email address to a few hundred 'bulk mailing services'. -pokes in the eye. -beats senseless with a 50lb Linux manual. -cats /dev/random into 's ear. -signs up for AOL. -downvotes on Reddit. -enrolls in Visual Basic 101. -sporks . -drops a truckload of support tickets on . -judo chops . -sets 's resolution to 800x600. -formats 's harddrive to fat12. -rm -rf's . -stabs . -makes learn C++. -steals 's mojo. -strangles with a doohicky mouse cord. -whacks with the cluebat. -sells on EBay. -drops creepers on 's house. -throws all of 's diamond gear into lava. -uses as a biological warfare study. -uses the 'Customer Appreciation Bat' on . -puts in the Total Perspective Vortex. -casts into the fires of Mt. Doom. -gives a melvin. -turns over to the Fun Police. -turns over to Agent Smith to be 'bugged'. -takes away 's internet connection. -pushes past the Shoe Event Horizon. -counts '1, 2, 5... er... 3!' and hurls the Holy Handgrenade Of Antioch at . -puts in a nest of camel spiders. -makes read slashdot at -1. -puts 'alias vim=emacs' in 's /etc/profile. -uninstalls every web browser from 's system. -locks in the Chateau d'If. -signs up for getting hit on the head lessons. -makes try to set up a Lexmark printer. -fills 's eyedrop bottle with lime juice. -casts into the fires of Mt. Doom. -gives a Flying Dutchman. -rips off 's arm, and uses it to beat them to death. -pierces 's nose with a rusty paper hole puncher. -pokes with a rusty nail. -puts sugar between 's bedsheets. -pours sand into 's breakfast. -mixes epoxy into 's toothpaste. -puts Icy-Hot in 's lube container. -straps to a chair, and plays a endless low bitrate MP3 loop of \"the world's most annoying sound\" from \"Dumb and Dumber\". -tells Dr. Dre that was talking smack. -forces to use a Commodore 64 for all their word processing. -smacks in the face with a burlap sack full of broken glass. -puts in a room with several heavily armed manic depressives. -makes watch reruns of \"Blue's Clues\". -puts lye in 's coffee. -introduces to the clue-by-four. -tattoos the Windows symbol on 's ass. -lets Borg have his way with . -signs up for line dancing classes at the local senior center. -wakes out of a sound sleep with some brand new nipple piercings. -gives a 2 gauge Prince Albert. -forces to eat all their veggies. -covers 's toilet paper with lemon-pepper. -fills 's ketchup bottle with Dave's Insanity sauce. -forces to stare at an incredibly frustrating and seemingly never-ending IRC political debate. -knocks two of 's teeth out with a 2x4. -removes Debian from 's system. -switches over to CentOS. -uses 's iPod for skeet shooting practice. -gives 's phone number to Borg. -posts 's IP, username(s), and password(s) on 4chan. -forces to use words like 'irregardless' and 'administrate' (thereby sounding like a real dumbass). -tickles until they wet their pants and pass out. -replaces 's KY with elmer's clear wood glue. -replaces 's TUMS with alka-seltzer tablets. -squeezes habanero pepper juice into 's tub of vaseline. -forces to learn the Win32 API. -gives an atomic wedgie. -ties to a chair and forces them to listen to 'N Sync at full blast. -forces to use notepad for text editing. -frowns at really, really hard. -jabs a hot lighter into 's eye sockets. -forces to browse the web with IE6. -takes out at the knees with a broken pool cue. -forces to listen to emo music. -lets a few creepers into 's house. -signs up for the Iowa State Ferret Legging Championship. -attempts to hotswap 's RAM. -dragon punches . -puts railroad spikes into 's side. -replaces 's Astroglide with JB Weld. -replaces 's stress pills with rat poison pellets. -replaces 's crotch itch cream with Nair. -does the Australian Death Grip on . -dances upon the grave of 's ancestors. -farts in 's general direction. -flogs with stinging nettle. -intoduces to the Knights who say Ni. -hands a poison ivy joint. +smacks {user} in the face with a burlap sack full of broken glass. +swaps {user}'s shampoo with glue. +installs Windows on {user}'s computer. +forces {user} to use perl for 3 weeks. +registers {user}'s name with 50 known spammers. +resizes {user}'s console to 40x24. +takes {user}'s drink. +dispenses {user}'s email address to a few hundred 'bulk mailing services'. +pokes {user} in the eye. +beats {user} senseless with a 50lb Linux manual. +cats /dev/random into {user}'s ear. +signs {user} up for AOL. +downvotes {user} on Reddit. +enrolls {user} in Visual Basic 101. +sporks {user}. +drops a truckload of support tickets on {user}. +judo chops {user}. +sets {user}'s resolution to 800x600. +formats {user}'s harddrive to fat12. +rm -rf's {user}. +stabs {user}. +makes {user} learn C++. +steals {user}'s mojo. +strangles {user} with a doohicky mouse cord. +whacks {user} with the cluebat. +sells {user} on EBay. +drops creepers on {user}'s house. +throws all of {user}'s diamond gear into lava. +uses {user} as a biological warfare study. +uses the 'Customer Appreciation Bat' on {user}. +puts {user} in the Total Perspective Vortex. +casts {user} into the fires of Mt. Doom. +gives {user} a melvin. +turns {user} over to the Fun Police. +turns over {user} to Agent Smith to be 'bugged'. +takes away {user}'s internet connection. +pushes {user} past the Shoe Event Horizon. +counts '1, 2, 5... er... 3!' and hurls the Holy Handgrenade Of Antioch at {user}. +puts {user} in a nest of camel spiders. +makes {user} read slashdot at -1. +puts 'alias vim=emacs' in {user}'s /etc/profile. +uninstalls every web browser from {user}'s system. +locks {user} in the Chateau d'If. +signs {user} up for getting hit on the head lessons. +makes {user} try to set up a Lexmark printer. +fills {user}'s eyedrop bottle with lime juice. +casts {user} into the fires of Mt. Doom. +gives {user} a Flying Dutchman. +rips off {user}'s arm, and uses it to beat them to death. +pierces {user}'s nose with a rusty paper hole puncher. +pokes {user} with a rusty nail. +puts sugar between {user}'s bedsheets. +pours sand into {user}'s breakfast. +mixes epoxy into {user}'s toothpaste. +puts Icy-Hot in {user}'s lube container. +straps {user} to a chair, and plays a endless low bitrate MP3 loop of \"the world's most annoying sound\" from \"Dumb and Dumber\". +tells Dr. Dre that {user} was talking smack. +forces {user} to use a Commodore 64 for all their word processing. +puts {user} in a room with several heavily armed manic depressives. +makes {user} watch reruns of \"Blue's Clues\". +puts lye in {user}'s coffee. +introduces {user} to the clue-by-four. +tattoos the Windows symbol on {user}'s ass. +lets Borg have his way with {user}. +signs {user} up for line dancing classes at the local senior center. +wakes {user} out of a sound sleep with some brand new nipple piercings. +gives {user} a 2 gauge Prince Albert. +forces {user} to eat all their veggies. +covers {user}'s toilet paper with lemon-pepper. +fills {user}'s ketchup bottle with Dave's Insanity sauce. +forces {user} to stare at an incredibly frustrating and seemingly never-ending IRC political debate. +knocks two of {user}'s teeth out with a 2x4. +removes Debian from {user}'s system. +switches {user} over to CentOS. +uses {user}'s iPod for skeet shooting practice. +gives {user}'s phone number to Borg. +posts {user}'s IP, username(s), and password(s) on 4chan. +forces {user} to use words like 'irregardless' and 'administrate' (thereby sounding like a real dumbass). +tickles {user} until they wet their pants and pass out. +replaces {user}'s KY with elmer's clear wood glue. +replaces {user}'s TUMS with alka-seltzer tablets. +squeezes habanero pepper juice into {user}'s tub of vaseline. +forces {user} to learn the Win32 API. +gives {user} an atomic wedgie. +ties {user} to a chair and forces them to listen to 'N Sync at full blast. +forces {user} to use notepad for text editing. +frowns at {user} really, really hard. +jabs a hot lighter into {user}'s eye sockets. +forces {user} to browse the web with IE6. +takes {user} out at the knees with a broken pool cue. +forces {user} to listen to emo music. +lets a few creepers into {user}'s house. +signs {user} up for the Iowa State Ferret Legging Championship. +attempts to hotswap {user}'s RAM. +dragon punches {user}. +puts railroad spikes into {user}'s side. +replaces {user}'s Astroglide with JB Weld. +replaces {user}'s stress pills with rat poison pellets. +replaces {user}'s crotch itch cream with Nair. +does the Australian Death Grip on {user}. +dances upon the grave of {user}'s ancestors. +farts in {user}'s general direction. +flogs {user} with stinging nettle. +intoduces {user} to the Knights who say Ni. +hands {user} a poison ivy joint. diff --git a/plugins/violence.py b/plugins/violence.py index 76395ff..6100bec 100755 --- a/plugins/violence.py +++ b/plugins/violence.py @@ -1,10 +1,6 @@ from util import hook -import re import random -nick_re = re.compile(r"^[A-Za-z0-9_|\.\-\]\[]*$") - - with open("plugins/data/larts.txt") as f: larts = [line.strip() for line in f.readlines() if not line.startswith("//")] @@ -21,15 +17,10 @@ with open("plugins/data/kills.txt") as f: kills = [line.strip() for line in f.readlines() if not line.startswith("//")] -with open("plugins/data/kill_bodyparts.txt") as f: - parts = [line.strip() for line in f.readlines() - if not line.startswith("//")] - @hook.command def slap(inp, me=None, nick=None, conn=None, notice=None): "slap -- Makes the bot slap ." - target = inp.strip() if " " in target: @@ -50,21 +41,21 @@ def slap(inp, me=None, nick=None, conn=None, notice=None): @hook.command def lart(inp, me=None, nick=None, conn=None, notice=None): "lart -- LARTs ." - target = inp.lower() + target = inp.strip() - if not re.match(nick_re, target): + if " " in target: notice("Invalid username!") return - if target == conn.nick.lower() or target == "itself": + # 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 - else: - target = inp - out = random.choice(larts) - out = out.replace('', target) - out = out.replace('', random.choice(items)) - me(out) + values = {"user": target} + phrase = random.choice(larts) + + # act out the message + me(phrase.format(**values)) @hook.command