]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - data/rbot/plugins/rot13.rb
lart plugin: ensure that the lart/praise being added/removed is a string
[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].join(" ").tr("A-Za-z", "N-ZA-Mn-za-m");
7   end
8 end
9 plugin = RotPlugin.new
10 plugin.map 'rot13 *string'