pyircbot/docs/setup/initial_config.rst

86 lines
2.5 KiB
ReStructuredText
Raw Normal View History

*********************
Initial Configuration
*********************
This is a quick-start guide for the minimal setup to run PyIRCBot.
Getting Started
===============
2015-06-19 20:23:36 -07:00
PyIRCBot is modular. The core bot files will reside whereever your system keeps
python modules. User modules and data are kept where you want. This way, setups
can be created where many unprivileged users may rely one one set of
core/module files they cannot edit, but can customize their instance.
2015-06-19 20:23:36 -07:00
Configuration is stored in 2 locations:
2015-06-19 20:23:36 -07:00
- **Instance config** - Information about one instance of the bot, such as
where module data for the instance will be stored, server address, etc.
- **Module config** - Where module configuration settings are be stored
Instance Configuration
======================
2015-06-19 20:23:36 -07:00
.. code-block:: json
{
"bot":{
"datadir":"./data/",
"rpcbind":"0.0.0.0",
2015-08-08 15:33:35 -07:00
"rpcport":1876,
"usermodules": [ "./data/modules/" ]
2015-06-19 20:23:36 -07:00
},
"connection":{
"server":"irc.freenode.net",
"ipv6":"off",
"port":6667
},
"modules":[
"PingResponder",
"Services"
]
}
In the example directory, this is stored in `config.json`. This may be
substituted for a YML file with the same data structure. This contains several
options:
.. cmdoption:: bot.datadir
2015-07-18 21:45:29 -07:00
Location where module data will be stored. This directory must contains
two directories: `config` and `data`. Config contains a config file for
each module of the same name (for example: Services.json for ``Services``
module). Data can be empty, the bot will create directories for each
module as needed.
.. cmdoption:: bot.rpcbind
2015-06-19 20:23:36 -07:00
Address on which to listen for RPC conncetions. RPC has no authentication
so using 127.0.0.1 is reccommended.
.. cmdoption:: bot.rpcport
Port on which RPC will listen
2015-08-08 15:18:58 -07:00
.. cmdoption:: bot.usermodules
Paths to directories where modules where also be included from
.. cmdoption:: connection.server
Hostname or IP of the IRC server to connection to
.. cmdoption:: connection.ipv6
Enable or disable defaulting to IPv6 using the value "off" or "on"
.. cmdoption:: connection.port
Port to connect to on the IRC server
.. cmdoption:: modules
2015-06-19 20:23:36 -07:00
A list of modules to load. Modules are loaded in the order they are listed
here. :doc:`PingResponder </api/modules/pingresponder>` and :doc:`Services </api/modules/services>` are the *bare minimum* needed to open and
maintain and IRC connection.