Chapter 2. Configuration

This chapter covers how to configure your Wollabot.

2.1. The config file

The configuration of Wollabot takes place using a simple configuration file. The file is called wollabot.ini and is placed in the root-directory of your Wollabot installation. Here's a sample configuration file:

    
[main]

; IRC preferences
server          = "irc.quakenet.org"
port            = "6667"
nickname        = "wollabot"
username        = "w0114"

[modules]

; Base module - DO NOT remove those unless you know what you're doing
loadmodule	= "Wollabot_Base.php"

; User modules - Put your own modules here
loadmodule      = "google.php"
loadmodule	= "phpfunctions.php"
loadmodule	= "nickometer.php";

[channel]

name            = "#wollabot"
on_join		= "PRIVMSG #wollabot :Hello, I'm a Wollabot\PRIVMSG #wollabot :Visit my website at http://wollabot.sourceforge.net"
key		= ""

[channel]

name            = "#quux"
on_join		= ""
key		= "foobar"

    

The main philosophy behind the configuration file is for it to be mostly self-explanatory. However we will provide you with an overview here. It consists of configuration categories defined using square brackets ([category]). Each configuration category has it's own different configuration properties. These i will go through here:

2.1.1. 'main' configuration category

  • server - This is the IRC server the bot should connect to. For QuakeNet it could be 'irc.quakenet.org'.

  • port - The port to connect to. Usually '6667'.

  • nickname - The nickname of the bot. The name other users on IRC would recognize it as.

  • username - If not running some sort of ident server on your connection, this will be the username (eg. the part before the '@' in your 'user@host' string.

2.1.2. 'modules' configuration category

  • loadmodule - This setting indicates which modules should be loaded. Supply one module for each directive.

2.1.3. 'channel' configuration category

  • name - This is a channel name, which Wollabot will join when connected (eg. '#wollabot').

  • on_join - A raw IRC message sent after the join. Multiple messages can be specified using '\' (backslash) as a seperator.

  • key - This is the password (key) for a given channel. Used if the channel has '+k' channel mode.