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 return "[msg]insult me|<person> => insult you or <person>. msginsult insults in private"
214 def insult(m, params)
216 who = m.sourcenick if ["me", @bot.nick].include?(who)
218 priv = params[:priv] || m.plugin == "msginsult"
222 prefix = "you are all "
226 prefix = priv ? "you are " : "#{who} is "
233 suffix = " (from #{m.sourcenick})" unless who == m.sourcenick
238 insult = generate_insult
239 @bot.say msgto, prefix + insult + suffix
246 adj2 = @@adj.pick_one
250 noun = @@noun.pick_one
252 start = "an " if ['a','e','i','o','u'].include?(adj[0,1])
253 "#{start}#{adj} #{amt} of #{adj2} #{noun}"
257 plugin = InsultPlugin.new
258 plugin.map "insult :who [:priv]", :action => :insult, :requirements => { :priv => /in private/ }
259 plugin.map "msginsult :who", :action => :insult