Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Bots in your Campfires!

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 campfire_bot.gemspec

Campfire Bot

This is a Campfire bot heavily inspired by

How To Install

sudo gem install campfire_bot

How To Use

require "rubygems"
require "campfire_bot"

Campfire::Bot.config do |bot|
  # Login
  bot.login do |l|
    l.username = "username"
    l.password = "password"
    l.subdomain = "subdomain" = "room"

    ## or
    # l.token = "XXX"

  # Events
  bot.on(/^How are you?/) do |room, message|
    room.speak("Im very sad thank-you")"trombone")
    room.paste("This is a paste")

Message object gives you a hash of details about the message

  "room_id" => 123456,
  "created_at" => Wed Nov 17 20:06:44 +0000 2010,
  "body" => "!go",
  "id" => 12345,
  "type" => "TextMessage",
  "user" => {
    "name" => "Red",
    "created_at" => Tue Nov 16 13:48:19 +0000 2010,
    "admin" => true,
    "id" => 1111,
    "type" => "Member",
    "email_address" => ""

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2010 Red Davis. See LICENSE for details.

Something went wrong with that request. Please try again.