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$/)
236 prefix = "#{m.params} is "
238 insult = generate_insult
239 @bot.say msgto, prefix + insult + suffix
242 adj = @@adj[rand(@@adj.length)]
245 adj2 = @@adj[rand(@@adj.length)]
248 amt = @@amt[rand(@@amt.length)]
249 noun = @@noun[rand(@@noun.length)]
251 start = "an " if ['a','e','i','o','u'].include?(adj[0].chr)
252 "#{start}#{adj} #{amt} of #{adj2} #{noun}"
255 plugin = InsultPlugin.new
256 plugin.register("insult")
257 plugin.register("msginsult")