require "fortune_gem" module Cinch module Plugins class Fortune include Cinch::Plugin match /f$/ set :plugin_name, 'fortune' set :help, < max_length) fortune.gsub(/[\n]/, "").gsub(/[\t]/, " ").gsub("?A:", "? A:") end def execute(m) m.reply(fortune) end end end end