a ruby eval bot for irc: kirby

Kirby bolts together _why’s tryruby interface with a minimal IRC listener, giving you a sandboxed irb-style read-eval-print loop, and a few other things.

update

See the latest documentation here.

demo

  <evn> >> a = %w(big bad bob)
<kirby> => ["big", "bad", "bob"]
  <evn> >> 3.times {puts a[rand(a.size)]}
<kirby> bob
<kirby> bad
<kirby> bad
<kirby> => 3
  <evn> reset_irb
<kirby> Began new irb session
  <evn> >> a
<kirby> NameError: undefined local variable or method `a' for main:Object

If you have an IRC channel for your local Ruby users group or your company, put Kirby in it for instant collaborative learning (otherwise known as futzing around).

features

  • irb-like interface
  • safe, sandboxed environment
  • svn repository commit watching
  • silent del.icio.us link saving
  • tolerable channel fault recovery

download

Download all 95 lines of version 3 from the Snax Fauna, or check out the project from svn with:

svn co svn://rubyforge.org/var/svn/fauna/kirby/kirby

Kirby is now feature-locked.

usage

You need Rubygems, the daemons and hpricot gems, and OpenSSL support compiled into Ruby.

Run kirby.rb [nick] [channel] [server]. Alternatively, you can add a line like the following to your crontab to start Kirby in daemon mode and keep it started through reboots and high water:

 * * * * * /path/to/kirby.rb [-d | -no-d] nick chan server \
  delicious_user delicious_pass [--silent] 2&>1 > /dev/null

If you set up the cron task on a server somewhere, you can just forget about it and Kirby will always be around. The code is pretty clear if you are unsure of a command-line switch, or need to hack a different feature.

license

Kirby is copyright 2007 Cloudburst, LLC, and licensed as AFL 3. Kirby is based on Matzbot, an unreleased ball of mud. Matzbot is partially based on public domain code from here and there.

Follow

Get every new post delivered to your Inbox.

Join 436 other followers