Skip to content
An IRC bot with a RESTful HTTP interface, built on Ruby and EventMachine.
Find file
Latest commit 29e60bf Sep 17, 2013 @pda Merge pull request #22 from richo/patch-1
Fix richo's username

IRC Machine

An IRC bot with a RESTful HTTP interface, built on Ruby and EventMachine.

Design philosophy: simple to the point of under-engineered, make it work for the 90% case.

# something like this might work
git clone git://
cd irc_machine
cp example.json irc_machine.json

# run it
./bin/irc_machined run
# ctrl+c

# daemonize it
./bin/irc_machined start
# stop the daemon
./bin/irc_machined stop

# or maybe even this (chances aren't good, though)
gem install irc_machine
irc_machined run


Plugins are objects which respond to #receive_line, and would will receive a reference to the IrcMachine::Session when instantiated. It should use that reference to send IRC commands.

Plugins may also implement the RESTful HTTP API by creating routes. The pattern for this would look something like:

def initialize(*args)
  route(:get, "/endpoint", :endpoint)

def endpoint(request, match)


You should copy example.json to irc_machine.json, or set IRC_MACHINE_CONF to the name of the config file.

Plugins are enabled by their class name specified in the plugins array, everything under irc_machine/plugin will be loaded at boot time, however.

Default Plugin

IrcMachine ships with a plugin to demonstrate the REST API. It listens on port 8421 by default. And you can't change the default.

  • GET /channels returns a JSON list of channels the bot is probably in.
  • PUT /channels/{name} joins a channel.
  • DELETE /channels/{name} parts a channel.
  • POST /channels/{name} sends a text/plain message to a channel, auto-joins if required.
  • POST /channels/{name}/github accepts GitHub post-receive hook notifications, notifies channel.



© Paul Annesley, 2011, MIT license

Something went wrong with that request. Please try again.