Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4990596c46
Fetching contributors…

Cannot retrieve contributors at this time

125 lines (88 sloc) 4.068 kB

Install

Installing ZenIRCBot will one day be much simpler, but for now there are a number of steps to it.

To start with, the bot is written in both JavaScript using the Node platform, and there is a version that is written in Python. Two of the services are written in or rely on Python the rest are written in JavaScript.

If you are on Ubuntu, you should probably build and install Node and npm yourself. The packages that provide binaries of each of these names are not the things that you want. apt-get install node gives you an amateur packet radio program and npm is provided by a magnetic resonence imaging program. Neither of which are what ZenIRCBot needs.

Configuring the bot

The config for the bot can be found in bot.json which is a JSON file that both the Node.js and Python bots use.

If you don't have a bot.json, copy bot.json.dist into its place like so:

$ cp bot.json{.dist,}

Then modify it and fill in the values with your own.

Note

Despite the option being servers ZenIRCBot currently only supports 1 server. It is named as such for future compatibility

Getting the node.js bot running

To start with you'll need to install Node, npm and Redis. Once you have those you'll need to use npm to install the node library for redis:

$ npm install redis

You'll also need node-irc which is installable via npm as well:

$ npm install irc

If you want to use the admin service for starting/stopping/restarting the bot and the services you'll also need to install Python, virtualenv, and tmux. Create a virtualenv and install Fabric in it (if you have virtualenvwrapper installed already feel free to use it of course):

$ virtualenv zib
$ source zib/bin/activate
$ pip install fabric

Once you've done that, if you setup Python/virtualenv/tmux you can run:

$ fab zenircbot start

Otherwise you'll just run:

$ node bot.js

Viola, your bot should connect, join the channels in the config and go forth on its merry way. It wont do anything interesting until you start up services. You can find information on starting up :doc:`services`.

Getting the python bot running

Warning

This version of the bot is less battle tested than the node version. This doesn't mean you shouldn't use it, just know that these instructions may change in the near future.

To start with you'll need to install Python, virtualenv and Redis (all three provided by your OS package manager). Once you have those you'll need to use pip to install the python library for redis as well as using virtualenv to keep your libraries you installed for ZenIRCBot (if you have virtualenvwrapper installed already feel free to use it of course):

$ virtualenv zib
$ source zib/bin/activate
$ pip install redis

You'll also need irckit which is installable via pip as well:

$ pip install irckit

If you want to use the admin service for starting/stopping/restarting the bot and the services you'll need to install Fabric and tmux (provided by your OS package manager) in it:

$ pip install fabric

In order to configure the bot at this time you have to edit the bot.py and change the values at the bottom of the file. This will be changed in the near future when the config files are all refactored into pure JSON files.

Once you're done configuring the bot:

$ python bot.py

Viola, your bot should connect, and go forth on its merry way. It wont do anything interesting until you start up services. You can find information on starting up :doc:`services`.

Jump to Line
Something went wrong with that request. Please try again.