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"
225 m.reply "incorrect usage: " + help(m.plugin)
229 if(m.plugin =~ /^msginsult$/)
231 if (m.params =~ /^#/)
235 suffix = " (from #{m.sourcenick})"
236 elsif(m.params =~ /^me$/)
240 if (who == @bot.nick)
243 prefix = "#{who} is "
245 insult = generate_insult
246 @bot.say msgto, prefix + insult + suffix
249 adj = @@adj[rand(@@adj.length)]
252 adj2 = @@adj[rand(@@adj.length)]
255 amt = @@amt[rand(@@amt.length)]
256 noun = @@noun[rand(@@noun.length)]
258 start = "an " if ['a','e','i','o','u'].include?(adj[0].chr)
259 "#{start}#{adj} #{amt} of #{adj2} #{noun}"
262 plugin = InsultPlugin.new
263 plugin.register("insult")
264 plugin.register("msginsult")