summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/rot13.rb
blob: 28e9243f5fc0a779401fe1d72bf54aae211a3507 (plain)
1
2
3
4
5
6
7
8
9
10
class RotPlugin < Plugin
  def help(plugin, topic="")
    "rot13 <string> => encode <string> to rot13 or back"
  end
  def rot13(m, params)
    m.reply params[:string].tr("A-Za-z", "N-ZA-Mn-za-m");
  end
end
plugin = RotPlugin.new
plugin.map 'rot13 :string'