From f37fcc3ebe7947c7412705d3d5b46c728aaa81f4 Mon Sep 17 00:00:00 2001 From: hemanth Date: Fri, 5 Nov 2010 15:06:14 +0530 Subject: [PATCH] Added a simple help method --- rgbot.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rgbot.rb b/rgbot.rb index c6eb1cd..3c6c5c5 100644 --- a/rgbot.rb +++ b/rgbot.rb @@ -27,6 +27,9 @@ def deliver(msg,res) @jabber.deliver(@msg.from.node+"@gmail.com",res) end + def help(msg) + self.deliver(@msg,"Try l33t ,goog , xkcd, flip, flop, roll, fortune, karma nick++/--") + end def l33t(msg) puts URI.escape(@msg.body, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) self.deliver(@msg,open('http://nyhacker.org/~hemanth.hm/hacks/t.php?'+ URI.escape(@msg.body, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))).read())