Permalink
Browse files

Added a simple help method

  • Loading branch information...
1 parent 1ca5ddf commit f37fcc3ebe7947c7412705d3d5b46c728aaa81f4 @hemanth committed Nov 5, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 rgbot.rb
View
@@ -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 <str>,goog <str>, 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())

0 comments on commit f37fcc3

Please sign in to comment.