public
Description: Birch is a plugin that allows you to broadcast events from your rails project into an IRC channel.
Homepage:
Clone URL: git://github.com/heavysixer/birch.git
Click here to lend your support to: birch and make a donation at www.pledgie.com !
Mark Daggett (author)
Sun Feb 08 12:32:26 -0800 2009
birch /
name age message
file MIT-LICENSE Fri Oct 24 19:41:14 -0700 2008 Adding a method to quit leave the IRC channel g... [heavysixer]
file README.markdown Thu Oct 23 13:08:58 -0700 2008 Added Birch to the Rails ActionController and a... [heavysixer]
file Rakefile Fri Oct 17 07:31:00 -0700 2008 updating the install file to not bomb now that ... [heavysixer]
file birch.yml Fri Jan 02 19:30:07 -0800 2009 formatting. [Mark Daggett]
file init.rb Loading commit data...
file install.rb Fri Oct 17 07:31:00 -0700 2008 updating the install file to not bomb now that ... [heavysixer]
directory lib/ Fri Oct 24 20:11:54 -0700 2008 quitting when the nick is already in use by som... [heavysixer]
directory tasks/ Fri Oct 17 07:31:00 -0700 2008 updating the install file to not bomb now that ... [heavysixer]
directory test/ Sun Oct 12 20:47:20 -0700 2008 Adding a very raw first implementation of the B... [heavysixer]
file uninstall.rb Sun Oct 12 20:47:20 -0700 2008 Adding a very raw first implementation of the B... [heavysixer]
README.markdown

Birch - Broadcastable IRC Helper

Birch is a plugin that allows you to broadcast events from your rails project into the IRC channel(s) of your choice.

There are many different ways to use Birch, and we've provided a couple of examples in this README. What is unique about Birch is that it adds a DRB server / client to your existing Rails application. This means if you so choose you can completely decouple Birch IRC server from the rails loading process and still easily make announcements into the channel with no change to the existing code.

Installation

Run install.rb

This will copy a default birch.yaml file into your config folder. Modify the yaml file with your specific requirements.

Birch will start automatically if you run the server in production mode. To start your server in any environment other than production use this environment variable:

BIRCH=true ruby script/server

Example Usage

Say you want you want announce account signups into your private IRC channel.

Suppose you already have a UserObserver class which sends an email to a user when they first sign up. This is an ideal place to insert a call to Birch.

  class AccountObserver < ActiveRecord::Observer
    def after_create(account)
      BircBot.instance.say("#{account.display_name} just created an account!")
    end
  end

Then somewhere in your channel you'll get a notice from your Birchbot.

Other Possible Uses

Notify the channel when:

  1. exceptions occur
  2. signups happen
  3. a widget was sold
  4. a comment was made etc. etc. etc.

Credits

Birch was developed by Locus Focus Inc., please feel free to let us know how you like the software and if you hit any snags, while trying to use it.

Copyright (c) 2008 Locus Focus Inc., released under the MIT license