Annotated Example Config

From Botnix
Jump to: navigation, search

A network block represents a network to connect to. You can have as many of these as you like, within reason of course.

network "ChatSpike" {

There may be multiple servers to try on a network. You can have as many of these as you like, again within sensible reason.

       address "stitch.chatspike.net/6667"
       address "dexter.chatspike.net/6667"

The bot will think of an alternate nickname itself if its primary nickname is not available for use. Each network may have only one of each of these.

       nickname "neuron_nix"
       ident "nix"
       fullname "botnix test bot"

If you want to use a vhost, put the IP of the vhost you want to use here. Remember you cannot just make this up, the host has to be bound to an IP on the machine. If you want to use a vhost but do not know its IP, the easiest way to find this out is to /DNS the vhost from your IRC client. If you are using IPv6, you must use an IPv6 IP address here if you define the value. Abbreviated IPv6 addresses (e.g. with a :: in place of many :0's) are acceptable.

       bind "1.2.3.4"

If you want to use SSL for this connection, set this value to yes, true or 1. IRC servers which allow SSL connections often do not allow SSL on port 6667, please make sure you use the correct port. SSL is usable on both IPv4 and IPv6 connections and is transparent to modules. If you do not define this value at all, the default is to not enable SSL.

       usessl "yes"

To use a HTTP proxy for connecting your bot to IRC, define one or both of these instructions. The proxyauth instruction is optional and not required if you do not require authentication to use the proxy server. The proxyaddress instruction must be in hostname/port format as shown below. You may connect to either an IPv6 or an IPv4 proxy, as defined by which protocols your machine supports, and may then tunnel to another protocol version if you wish, e.g. an IPv4 proxy which tunnels to IPv6, or vice versa. You may also enable both SSL and Proxy at once, in which case SSL is initialized after the proxy connection is made (this is untested, and not recommended!!! - Instead consider using an SSL proxy). In the case of the proxyauth statement, the first quoted item is the username (usually case sensitive) and the second quoted item is the password (also usually case sensitive).

       proxyaddress "proxy.lan/8080"
       proxyauth "student" "0penSeseme"

Define the password for the server, if one is used, by using this instruction. Remember passwords are usually case sensitive.

       password "letmein"

Define a nickserv password if your bot's nickname is registered and you have the modules/irc/nickserv.pm module loaded.

       nickservpass "openseseme"

Maximum number of modes we can queue and send at once on this network. this value is optional, and if omitted defaults to the ircnet default of three modes maximum per line.

       maxmodes "10"

Maximum amount of bytes that may be sent per second to this network. This value is optional and if omitted the default is 256, or 0.25kb/sec. This is an approximation and depending on traffic the maximum may temporarily exceed this value or short amounts of time. If you randomly get excess flood quits, lower this value. If your bot appears slow, first try increasing this value.

       throttlebps "512"

This optional value indicates how many seconds to wait before reconnecting to the network, if it becomes disconnected for some reason. Be aware that setting this too low can cause IRC servers to ban you with klines or worse!

       reconnect "60"

A channel block inside a network block exists only on that network. Botnix does not place a limit of how many channel blocks you may have, however your IRC networks will probably limit you, usually to 10, 15 or 20 channels at a time.

       channel "#botnix" {

Rejoin on kick. This is implemented by the core. When the bot is kicked and this option is set on a channel, it will automatically rejoin.

               rejoin

Auto voice everybody who joins. This is to be implemented in a module.

               autovoice

Cycle the channel if there are no ops. This is to be implemented in the core. If the bot is the only user on a channel, and the channel is opless, the bot will attempt to cycle to get ops back.

               cycle

This command is implemented by the modules/log/file.pm module. If you define a log file for a channel, then this logfile captures all log output targetted at this channel.

               logfile "../botnix.log"

Use this command if you want timestamps in your logs. This applies only to the current channel/network context.

               timestamps "yes"
       }

These commands are read by the ctcp module (modules/irc/ctcp.pm). There are four usable configuration commands for this module, each settable on a per-network basis.


This command indicates that ctcp ping should be answered on this network. The default is not to answer ctcp ping, for security. Botnix will not answer 'malformed' CTCP pings (for example ones which are altered to have a milliseconds part or do not contain a number).

       ctcpping

This command indicates that ctcp time requests should be answered on this network. The default is not to answer any time requests. If time requests are answered, the local time is used.

       ctcptime

This command indicates a change to the standard version reply. Botnix will always return a version reply when the ctcp module is loaded, however this instruction allows you to change it however you wish. If you do not want botnix to answer version requests, do not load the ctcp module.

       versionreply "Got botnix?"

This command indicates a change to the standard finger reply. Botnix will always return a finger reply when the ctcp module is loaded, however this instruction allows you to change it however you wish. If you do not want botnix to answer finger requests, do not load the ctcp module.

       fingerreply "Get your finger out of my socket."

Use this command to enable support for the ERRMSG ctcpreply. this is not recommended as it can be used to flood the bot.

       answererror
}

A channel block outside of a network block is global to all networks this is an example of such a channel block. Channels outside of network blocks in this manner are similar in operation to the way WinBot handles channels, with shared settings across all networks.

channel "#logcabin" {
       rejoin
       autovoice

The channel modelock option will enforce these modes at all times while the bot is opped. It requires you to load the modules/irc/chanmode.pm module. Please note that this feature only allows static modes to be set such as +t or +n, if you want to do such things as floating limits,this is best done through other modules.

       modelock "+ntlk-si 69 secret"

The channel floatinglimit option will enforce a 'floating' limit. The floating limit is a simple but effective way to stop mass join floods. Every time a user joins or leaves the channel, a counter (the float) is updated, which always remains a certain number above the actual user count. Every 60 seconds, a mode +l is sent to the channel which sets the limit to the float value. The number specified in the config option indicates how far above the user count you want the limit to be. To use this option you must load the modules/irc/floatinglimit.pm module.

       floatinglimit "5"

The nocommands token is implemented by the module modules/irc/cli.pm, and if specified will disallow commands being issued in the channel, even if the global settings enable on-channel commands (see the allowcommands directive below).

       nocommands
}

This command is implemented by the modules/log/file.pm module. If you are using the file logger module you *must* define this logfile directive outside of all channels and networks, as this 'main' logfile will capture all log messages not directed at a channel or server which has its own log. If you define a logfile for a server, but do not put it within a channel, channel messages will NOT appear in that log, they will most likely appear here.

NB: If you do not load a logging module of any kind, all log output will be sent to STDOUT which means it will appear on your terminal. If you do not want to log at all, load the modules/log/null.pm module which creates no output.

logfile "../servers.log"
timestamps "yes"

This instruction defines the filename for the userfile. If you do not specify a name for your userfile, then the default 'botnix.uf' is used.

userfile "botnix.uf"

This instruction defines the filename used for the storefile. If you do not specify a name for the storefile, then the default of 'botnix.store' is used. The storefile holds all persistent settings for the bot and any modules it loads, except for the user data, such as auto kicks, etc.

storefile "botnix.store"

This command is implemented by the modules/irc/cli.pm module. If you do not load this module and define this instruction, you will not be able to give your bot ANY commands via message or on a channel. To specify where you can issue commands, put either or both of message and channel into the paremeter as shown below. Use the mnemonic 'message' to allow commands in private message, and 'channel' to allow commands on channels. Please note that other mnemonics may be added to this instruction in the future as more methods of issuing commands to the bot become available.

NB: If you specify the 'channel' option here, the default is to reply to the channel with a public channel notice. If you'd rather the bot reply in person to you EVEN WHEN IT IS COMMANDED ON CHANNEL, then use the token channelprivate instead of channel. You may not use both channel and channelprivate at the same time.


allowcommands "message,channel"


You must load modules into your bot to make it function on more than just a primative level. The modules shown below should be self explainitory and will add support for various IRC features considered 'normal' for an IRC client.


CTCP support. Adds CTCP requests/replies to the bot and allows you to change VERSION and FINGER.

module "modules/irc/ctcp.pm"

DCC support (not dependent on CTCP support). Allows login via DCC and issuing commands over a DCC connection.

module "modules/irc/dcc.pm"

Speech (.ACT and .SAY commands) - Use with caution if your network has services! Users may abuse these commands to for example drop your bot's nick by messaging nickserv, or obtain ops without the operator flag by messaging chanserv or X!

module "modules/irc/speech.pm"

File logger (for logging to text files). Use the null log module if you do not wish to log.

module "modules/log/file.pm"

Channel Operator actions, .OP, .DEOP, ban management etc.

module "modules/irc/chanop.pm"

Channel mode actions - .INVITE, channel key management etc.

module "modules/irc/chanmode.pm"

Floating limits (e.g. MODE +l <number of users +x>)

module "modules/irc/floatinglimit.pm"

This module adds support for private message and on-channel commands. You cannot issue commands to the bot in private message or on channel unless you load this module.

module "modules/irc/cli.pm"

This Optional module adds support for relaying channel activity between two networks. See: Relay Module

module "modules/irc/relay.pm"

This Optional module adds support for identifying to NickServ on networks which have it. See: NickServ Module

module "modules/irc/nickserv.pm"

This module adds support for protection against channel flooding, please see Flood Module

module "modules/irc/flood.pm"
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox