1 class InsultPlugin < Plugin
3 ## insults courtesy of http://insulthost.colorado.edu/
173 "fat-woman's stomach-bile",
181 "waffle-house grits",
204 "craptacular carpet droppings",
210 def help(plugin, topic="")
211 if(plugin == "insult")
212 return "insult me|<person> => insult you or <person>"
213 elsif(plugin == "msginsult")
214 return "msginsult <nick> => insult <nick> via /msg"
216 return "insult module topics: msginsult, insult"
222 m.reply "incorrect usage: " + help(m.plugin)
226 if(m.plugin =~ /^msginsult$/)
228 if (m.params =~ /^#/)
232 suffix = " (from #{m.sourcenick})"
233 elsif(m.params =~ /^me$/)
237 if (who == @bot.nick)
240 prefix = "#{who} is "
242 insult = generate_insult
243 @bot.say msgto, prefix + insult + suffix
246 adj = @@adj[rand(@@adj.length)]
249 adj2 = @@adj[rand(@@adj.length)]
252 amt = @@amt[rand(@@amt.length)]
253 noun = @@noun[rand(@@noun.length)]
255 start = "an " if ['a','e','i','o','u'].include?(adj[0].chr)
256 "#{start}#{adj} #{amt} of #{adj2} #{noun}"
259 plugin = InsultPlugin.new
260 plugin.register("insult")
261 plugin.register("msginsult")