lastfm plugin: overlong artisti descriptions are truncated; artist events can be...
[rbot] / data / rbot / plugins / insult.rb
1 class InsultPlugin < Plugin
2
3 ## insults courtesy of http://insulthost.colorado.edu/
4
5 ##
6 # Adjectives
7 ##
8 @@adj = [
9 "acidic",
10 "antique",
11 "contemptible",
12 "culturally-unsound",
13 "despicable",
14 "evil",
15 "fermented",
16 "festering",
17 "foul",
18 "fulminating",
19 "humid",
20 "impure",
21 "inept",
22 "inferior",
23 "industrial",
24 "left-over",
25 "low-quality",
26 "malodorous",
27 "off-color",
28 "penguin-molesting",
29 "petrified",
30 "pointy-nosed",
31 "salty",
32 "sausage-snorfling",
33 "tastless",
34 "tempestuous",
35 "tepid",
36 "tofu-nibbling",
37 "unintelligent",
38 "unoriginal",
39 "uninspiring",
40 "weasel-smelling",
41 "wretched",
42 "spam-sucking",
43 "egg-sucking",
44 "decayed",
45 "halfbaked",
46 "infected",
47 "squishy",
48 "porous",
49 "pickled",
50 "coughed-up",
51 "thick",
52 "vapid",
53 "hacked-up",
54 "unmuzzled",
55 "bawdy",
56 "vain",
57 "lumpish",
58 "churlish",
59 "fobbing",
60 "rank",
61 "craven",
62 "puking",
63 "jarring",
64 "fly-bitten",
65 "pox-marked",
66 "fen-sucked",
67 "spongy",
68 "droning",
69 "gleeking",
70 "warped",
71 "currish",
72 "milk-livered",
73 "surly",
74 "mammering",
75 "ill-borne",
76 "beef-witted",
77 "tickle-brained",
78 "half-faced",
79 "headless",
80 "wayward",
81 "rump-fed",
82 "onion-eyed",
83 "beslubbering",
84 "villainous",
85 "lewd-minded",
86 "cockered",
87 "full-gorged",
88 "rude-snouted",
89 "crook-pated",
90 "pribbling",
91 "dread-bolted",
92 "fool-born",
93 "puny",
94 "fawning",
95 "sheep-biting",
96 "dankish",
97 "goatish",
98 "weather-bitten",
99 "knotty-pated",
100 "malt-wormy",
101 "saucyspleened",
102 "motley-mind",
103 "it-fowling",
104 "vassal-willed",
105 "loggerheaded",
106 "clapper-clawed",
107 "frothy",
108 "ruttish",
109 "clouted",
110 "common-kissing",
111 "pignutted",
112 "folly-fallen",
113 "plume-plucked",
114 "flap-mouthed",
115 "swag-bellied",
116 "dizzy-eyed",
117 "gorbellied",
118 "weedy",
119 "reeky",
120 "measled",
121 "spur-galled",
122 "mangled",
123 "impertinent",
124 "bootless",
125 "toad-spotted",
126 "hasty-witted",
127 "horn-beat",
128 "yeasty",
129 "boil-brained",
130 "tottering",
131 "hedge-born",
132 "hugger-muggered",
133 "elf-skinned",
134 ]
135
136 ##
137 # Amounts 
138 ##
139 @@amt = [
140 "accumulation",
141 "bucket",
142 "coagulation",
143 "enema-bucketful",
144 "gob",
145 "half-mouthful",
146 "heap",
147 "mass",
148 "mound",
149 "petrification",
150 "pile",
151 "puddle",
152 "stack",
153 "thimbleful",
154 "tongueful",
155 "ooze",
156 "quart",
157 "bag",
158 "plate",
159 "ass-full",
160 "assload",
161 ]
162
163 ##
164 # Objects
165 ##
166 @@noun = [
167 "bat toenails",
168 "bug spit",
169 "cat hair",
170 "chicken piss",
171 "dog vomit",
172 "dung",
173 "fat-woman's stomach-bile",
174 "fish heads",
175 "guano",
176 "gunk",
177 "pond scum",
178 "rat retch",
179 "red dye number-9",
180 "Sun IPC manuals",
181 "waffle-house grits",
182 "yoo-hoo",
183 "dog balls",
184 "seagull puke",
185 "cat bladders",
186 "pus",
187 "urine samples",
188 "squirrel guts",
189 "snake assholes",
190 "snake bait",
191 "buzzard gizzards",
192 "cat-hair-balls",
193 "rat-farts",
194 "pods",
195 "armadillo snouts",
196 "entrails",
197 "snake snot",
198 "eel ooze",
199 "slurpee-backwash",
200 "toxic waste",
201 "Stimpy-drool",
202 "poopy",
203 "poop",
204 "craptacular carpet droppings",
205 "jizzum",
206 "cold sores",
207 "anal warts",
208 ]
209   
210   def help(plugin, topic="")
211     return "[msg]insult me|<person> => insult you or <person>. msginsult insults in private"
212   end
213
214   def insult(m, params)
215     who = params[:who]
216     who = m.sourcenick if ["me", @bot.nick].include?(who)
217
218     priv = params[:priv] || m.plugin == "msginsult"
219
220     case who
221     when /^#/
222       prefix = "you are all "
223     when m.sourcenick
224       prefix = "you are "
225     else
226       prefix = priv ? "you are " : "#{who} is "
227     end
228
229     suffix = ""
230
231     if priv
232       msgto = who
233       suffix = " (from #{m.sourcenick})" unless who == m.sourcenick
234     else
235       msgto = m.channel
236     end
237
238     insult = generate_insult
239     @bot.say msgto, prefix + insult + suffix
240   end
241
242   def generate_insult
243     adj = @@adj.pick_one
244     adj2 = ""
245     loop do
246       adj2 = @@adj.pick_one
247       break if adj2 != adj
248     end
249     amt = @@amt.pick_one
250     noun = @@noun.pick_one
251     start = "a "
252     start = "an " if ['a','e','i','o','u'].include?(adj[0,1])
253     "#{start}#{adj} #{amt} of #{adj2} #{noun}"
254   end
255 end
256
257 plugin = InsultPlugin.new
258 plugin.map "insult :who [:priv]", :action => :insult, :requirements => { :priv => /in private/ }
259 plugin.map "msginsult :who", :action => :insult
260