require 'cinch' require_relative '../classes/Util.rb' class Help include Cinch::Plugin include Util::PluginHelper @clist = %w{help} @@commands["help"] = ":help [] - produce help for " set :prefix, /^:/ match /help( .+)?/, method: :gethelp def gethelp(m, mdl = nil) case mdl when nil m.reply("try :help to get help for a command, or :commands for a list of commands.") else mdl.strip! cmds = self.class.class_eval { @@commands } m.reply(cmds[mdl]) end end end