public
Description: Easy, fresh, feature-rich IRC bots in Ruby
Home | Edit | New

Tutorial: Your first launch

Before you can run Autumn and try out the example leaves, you’ll need to set up
a few things. Here are the steps:

Requirements

Autumn requires RubyGems and the Daemons and Facets
gems. Install RubyGems then run sudo gem install daemons facets in a command
line in order to run Autumn.

If you wish to use a database backend for your bot, you will need the DataMapper
gem. To install, see the DataMapper website.

The included example bot Scorekeeper requires the DataMapper gem. It can
optionally use the Chronic gem to enhance its textual date parsing. The other
example bot, Insulter, is much simpler and can run under any Autumn
configuration.

Configure Your Testing Season

In Autumn, your leaves run in an environment, called a “season.” Each season has
different leaves and different settings for those leaves. By default, Autumn
comes with a season called “testing” already set up for you. You can edit that
season or create a new one with script/generate season [season name]. The files for your season are stored in the config/seasons directory.

First, edit the stems.yml file. This file stores information about your
IRC connection. Edit it to connect to an IRC server of your choosing. For more
information, see the README.

Next, edit the database.yml file. As mentioned previously, Scorekeeper
requires the DataMapper gem because it uses a persistent store. By default it’s
set up to use a MySQL database, but you can use PostgreSQL or SQLite 3 if you’d
like. If you’d prefer not to install any of these database solutions, delete the
database.yml file and remove the Scorekeeper leaf from the
leaves.yml and stems.yml files.

Lastly, view the leaves.yml file. You shouldn’t have to make any
changes to this file, but it’s a good idea to look at it to see how leaves are
configured. You can do the same with the season.yml file. See the README for more.

Starting the Server

Run the shell command script/server to start the server. After a short
while, your leaf should appear in the channel you specified. You can type
“!points Coolguy +5” and then “!points” to get started using Scorekeeper, or
“!insult” to play with Insulter. Have some fun, and when you’re satisfied, stop
the server by typing “!quit”.

If you’d like to daemonize your server, you can use the shell commands
rake app:start and rake app:stop. For more information, see the README.

Last edited by RISCfuture, Sat Jul 05 00:23:55 -0700 2008
Home | Edit | New
Versions: