From 0f3e302547363ea237454dda891ddb5de1be4476 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Sat, 9 Oct 2004 01:51:05 +0000 Subject: initial import of rbot --- rbot/plugins/rot13.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 rbot/plugins/rot13.rb (limited to 'rbot/plugins/rot13.rb') diff --git a/rbot/plugins/rot13.rb b/rbot/plugins/rot13.rb new file mode 100644 index 00000000..1f367dbd --- /dev/null +++ b/rbot/plugins/rot13.rb @@ -0,0 +1,14 @@ +class RotPlugin < Plugin + def help(plugin, topic="") + "rot13 => encode to rot13 or back" + end + def privmsg(m) + unless(m.params && m.params =~ /^.+$/) + m.reply "incorrect usage: " + help(m.plugin) + return + end + m.reply m.params.tr("A-Za-z", "N-ZA-Mn-za-m"); + end +end +plugin = RotPlugin.new +plugin.register("rot13") -- cgit v1.2.3