]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - data/rbot/plugins/rot13.rb
Fri Jul 29 13:07:56 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / rot13.rb
1 class RotPlugin < Plugin
2   def help(plugin, topic="")
3     "rot13 <string> => encode <string> to rot13 or back"
4   end
5   def rot13(m, params)
6     m.reply params[:string].tr("A-Za-z", "N-ZA-Mn-za-m");
7   end
8 end
9 plugin = RotPlugin.new
10 plugin.map 'rot13 :string'