aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar dngfx2018-09-09 06:34:50 +0100
committerGravatar dongfix2018-09-09 06:34:50 +0100
commitc626a9d047a01473d62a0e2835c0d156751629a2 (patch)
treea9d4f66d84db17291bdcef8dd6aa6f5c27915ef2 /modules
parentFONT_RESET should be FONT_COLOR, also more string wizardry in ducks.py! (diff)
signature
A shakespear insult generator, with optional target. Because why not?
Diffstat (limited to 'modules')
-rw-r--r--modules/shakespeare.py74
1 files changed, 74 insertions, 0 deletions
diff --git a/modules/shakespeare.py b/modules/shakespeare.py
new file mode 100644
index 00000000..db512337
--- /dev/null
+++ b/modules/shakespeare.py
@@ -0,0 +1,74 @@
+import random
+import Utils
+
+INSULT_INTRO = ["Thou art", "Ye", "Thou", "Thy", "Thee"]
+
+INSULT_PART_1 = ["artless", "bawdy", "beslubbering", "bootless", "churlish",
+ "cockered", "clouted", "craven", "currish", "dankish",
+ "dissembling",
+ "droning", "errant", "fawning", "fobbing", "forward", "frothy",
+ "gleeking", "goatish", "gorbellied", "impertinent",
+ "infectious",
+ "jarring", "loggerheaded", "lumpish", "mammering", "mangled",
+ "mewling", "paunchy", "pribbling", "puking", "puny",
+ "qualling",
+ "rank", "reeky", "roguish", "ruttish", "saucy", "spleeny",
+ "spongy",
+ "surly", "tottering", "unmuzzled", "vain", "venomed",
+ "villainous",
+ "warped", "wayward", "weedy", "yeast"]
+
+INSULT_PART_2 = ["base-court", "bat-fowling", "beef-witted", "beetle-headed",
+ "boil-brained", "clapper-clawed", "clay-brained",
+ "common-kissing",
+ "crook-pated", "dismal-dreaming", "dizzy-eyed", "doghearted",
+ "dread-bolted", "earth-vexing", "elf-skinned", "fat-kidneyed",
+ "fen-sucked", "flap-mouthed", "fly-bitten", "folly-fallen",
+ "fool-born", "full-gorged", "guts-griping", "half-faced",
+ "hasty-witted", "hedge-born", "hell-hated", "idle-headed",
+ "ill-breeding", "ill-nurtured", "knotty-pated", "milk-livered",
+ "motley-minded", "onion-eyed", "plume-plucked", "pottle-deep",
+ "pox-marked", "reeling-ripe", "rough-hewn", "rude-growing",
+ "rump-fed", "shard-borne", "sheep-biting", "spur-galled",
+ "swag-bellied", "tardy-gaited", "tickle-brained",
+ "toad-spotted",
+ "unchin-snouted", "weather-bitten"]
+
+INSULT_PART_3 = ["apple-john", "baggage", "barnacle", "bladder", "boar-pig",
+ "bugbear", "bum-bailey", "canker-blossom", "clack-dish",
+ "clotpole",
+ "coxcomb", "codpiece", "death-token", "dewberry",
+ "flap-dragon",
+ "flax-wench", "flirt-gill", "foot-licker", "fustilarian",
+ "giglet",
+ "gudgeon", "haggard", "harpy", "hedge-pig", "horn-beast",
+ "hugger-mugger", "joithead", "lewdster", "lout", "maggot-pie",
+ "malt-worm", "mammet", "measle", "minnow", "miscreant",
+ "moldwarp",
+ "mumble-news", "nut-hook", "pigeon-egg", "pignut", "puttock",
+ "pumpion", "ratsbane", "scut", "skainsmate", "strumpet",
+ "varlot",
+ "vassal", "whey-face", "wagtail"]
+
+
+class Module(object):
+
+ def __init__(self, bot, events, exports):
+ self.bot = bot
+ self.events = events
+
+ events.on("received").on("command").on("insult").hook(
+ self.dispense_insult)
+
+ def dispense_insult(self, event):
+ insult = [random.choice(INSULT_INTRO), random.choice(INSULT_PART_1),
+ random.choice(INSULT_PART_2), random.choice(INSULT_PART_3)]
+
+ insult = " ".join(insult)
+ target = ""
+
+ if event["args_split"]:
+ target = Utils.bold(event["server"].get_user(
+ event["args_split"][0]).nickname) + ", "
+
+ event["stdout"].write(target + insult)