1 class CalPlugin < Plugin
2 def help(plugin, topic="")
3 "cal [month year] => show current calendar [optionally specify month and year]"
6 if params.has_key?(:month)
7 m.reply Utils.safe_exec("cal", params[:month], params[:year])
9 m.reply Utils.safe_exec("cal")
13 plugin = CalPlugin.new
14 plugin.map 'cal :month :year', :requirements => {:month => /^\d+$/, :year => /^\d+$/}