Skip to content

Instantly share code, notes, and snippets.

@hone
Created December 7, 2010 00:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hone/731249 to your computer and use it in GitHub Desktop.
Save hone/731249 to your computer and use it in GitHub Desktop.
heroku_status_irc_bot.rb
require 'rubygems'
require 'bundler'
Bundler.setup
require 'cinch'
require 'feedzirra'
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.freenode.org"
c.channels = ["#norbauer"]
end
on :message, "!status" do |m|
feed = Feedzirra::Feed.fetch_and_parse("http://status.heroku.com/feed")
m.reply "STATUS: #{feed.entries.first.title}"
end
end
if $0 == __FILE__
bot.start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment