This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Mike Rix Wolfe edited this page Jun 25, 2014
·
3 revisions
Gary uses a JSON configuration file to hold settings: /config
On first run this file is created with default settings:
{
"connections":
{
"local irc":
{
"server": "localhost",
"nick": "Gary ",
"channels": ["#test"]
}
}
}
Connections is an associative array of connection_name : connection_settings key/value pairs.
connection_settings:
Required:
- nick: the name of the bot.
- server: the hostname of the irc server.
- channels: channels to join. A list of strings. Can be []
Optional:
- port: defaults to 6667. The port to connect to.
- user: defaults to "Gary". (user@netmask)
- realname: defaults to "Gary" (Shown in whois)
- server_password: the server password. Omit if not needed.
- nickserv_password: defaults to "" (no login is performed)
- nickserv_name: defaults to "nickserv" (standard on most networks)
- nickserv_command: defaults to "IDENTIFY %s" (interpolated with password)
- ssl: defaults to false. Set to true to connect to the server using SSL
- ignore_cert: defaults to true. Set to false to validate the certificate that the remote host uses for the SSL connection.
A single Gary instance can have multiple connections and multiple channels:
{
"connections":
{
"public bot":
{
"server": "irc.example.org",
"nick": "publicbot",
"channels": ["#main"]
},
"private bot":
{
"server": "irc.example.org",
"nick": "privatebot",
"channels": ["#secret", "#admin"]
}
}
}
The user and realname can be set.
{
"connections":
{
"poker irc":
{
"server": "irc.poker.example.com",
"nick": "pokerbot",
"channels": ["#poker"],
"user": "pokerbot",
"realname": "Pokerbot - a fork of Gary",
}
}
}
Automatic identification is possible.
- nickserv_password: defaults to "" (no login is performed)
- nickserv_name: defaults to "nickserv" (standard on most networks)
- nickserv_command: defaults to "IDENTIFY %s" (interpolated with password)
{
"connections":
{
"poker irc":
{
"server": "irc.poker.example.com",
"nick": "pokerbot",
"nickserv_password": "aceofspades",
"channels": ["#poker"]
}
}
}