diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-29 13:44:33 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-29 13:44:33 +0000 |
commit | 676dd61e6b0bea5f506d064039a685944aefd6fb (patch) | |
tree | 60fa1936a11a67d6412f9db28532d623aabed5d1 /data/rbot/plugins/rot13.rb | |
parent | 438d56ceb82755961229d222d82a1c22ce04ab1d (diff) |
Fri Jul 29 13:07:56 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
* Moved some stuff out of util.rb into the plugins that actually need
them. Those methods didn't belong in util as they were plugin-specific.
* moved a few more plugins to use map() where appropriate
* made the url plugin only store unique urls
Diffstat (limited to 'data/rbot/plugins/rot13.rb')
-rw-r--r-- | data/rbot/plugins/rot13.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/data/rbot/plugins/rot13.rb b/data/rbot/plugins/rot13.rb index 1f367dbd..28e9243f 100644 --- a/data/rbot/plugins/rot13.rb +++ b/data/rbot/plugins/rot13.rb @@ -2,13 +2,9 @@ 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"); + def rot13(m, params) + m.reply params[:string].tr("A-Za-z", "N-ZA-Mn-za-m"); end end plugin = RotPlugin.new -plugin.register("rot13") +plugin.map 'rot13 :string' |