Skip to content

Configuration

Andrew Okin edited this page Apr 28, 2016 · 3 revisions

Configuring the Core

distirc's core is configured through a config.toml file. TOML's syntax is very similar to "INI" files you may have seen before, so it should be fairly intuitive, but if you would like a more in-depth description, you can find that here.

Users

To add a user to the core, simply add a table called [user.username] to the configuration file.

The following keys are required for users:

  • password -- The password clients must use when logging in as this user. Currently this is stored in plain text, but there are plans to store it more securely in the future.

The following optional keys are available:

  • alert_cmd -- If set, executes the given shell command (through /bin/sh -c <alert_cmd>) when an alert is received while no clients are connected. Any instance of %m in the string is replaced with the alert message.

Networks

IRC networks are configured in [user.username.net.netname] tables.

The following keys are required for networks:

  • nick -- Primary nick to use.
  • server -- Address of the IRC server to connect to.

The following optional keys are available:

  • port -- Port to use to connect to IRC. Defaults to 6667.
  • use_ssl -- Whether to use SSL to connect to IRC. Defaults to false for now, but may change in the future.
  • alt_nicks -- Alternative nicks to use when the primary nick is unavailable.
  • nickserv_pass -- If set, the core will attempt to authenticate with NickServ after connecting.
  • username -- Username to send to the network. Defaults to nick if not set.
  • realname -- Real name to set. Defaults to nick if not set.
  • channels -- A list of channels to join on connect.
  • password -- Password to use to connect to the server.

Configuring the Client

The terminal client's config file is located in $XDG_CONFIG_HOME/distirc-client/config.toml. It should look something like this:

[core]
user = "forkk"
pass = "hunter2"
host = "localhost"
port = 4242

Clone this wiki locally