Skip to content

Commit

Permalink
Added a simple help method
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanth committed Nov 5, 2010
1 parent 1ca5ddf commit f37fcc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rgbot.rb
Expand Up @@ -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())
Expand Down

0 comments on commit f37fcc3

Please sign in to comment.