blob: 1f367dbda9933ec3881ca10b0b9efd517ec8bf95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class RotPlugin < Plugin
def help(plugin, topic="")
"rot13 <string> => encode <string> 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")
|