Log in | Back to darenet.org

DareNET IRCd Configuration/reference

/*
 * doc/reference.conf - ircd-darenet Reference configuration file.
 *
 * Copyright (C) 2010 DareNET Development Team
 *
 * The configuration format consists of various blocks, each containing
 * name-value pairs, tags and/or string data. It is designed to be
 * easily readable by both human and ircd.
 *
 * A block consists of a block name, an opening '{' brace, statements, a
 * closing '}' brace, and a ';' semicolon. A statement consists of a name
 * possibly followed by an '=' equals sign and a value, ending with a
 * semicolon. All strings are surrounded by '"' double quotes.
 *
 * A sample block:
 *
 * blockname {
 *   name = value;
 *   name = "string";
 *   name = 123;
 *   tag;
 * };
 *
 * All elements of the configuration are separated by whitespace, and can
 * be packed on one line, or broken up over several lines. Whitespace is
 * defined as space, tab or carriage return/linefeed.
 *
 * Three forms of comments are allowed:
 *  - C style multi-line
 *  - C++ style single-line
 *  - Shell style single-line
 *
 * IMPORTANT NOTES:
 *
 * When the configuration file is parsed, blocks are used in reverse order
 * than how they are listed here. This means you should start multiple
 * block definitions with the "fall through", and end with the most
 * detailed.
 *
 * class {} blocks MUST be specified before anything that uses them. That
 * means they must be defined before client {}, connect {} and operator {}.
 *
 * Times/durations are written as:
 *  - a number in seconds (e.g., 60)
 *  - 1 hours 30 minutes 10 seconds
 *  - an arithmetic expression (e.g., 1*60+20)
 *
 * Valid units of time:
 *  decades, years, months, weeks, days, hours, minutes, seconds
 *
 * Valid units of size:
 *  tbytes, gbytes, mbytes, kbytes, bytes
 *
 * All sizes and times should be specified as plural.
 */

##############################################################################
# General [REQUIRED]
#
# The General block defines information about the server itself.
# It is required for the server to start.
#
# Old conf format equivalents
#   M:name:vhost:description::numeric

general {
  /* name: the name of our server. */
  name = "test.area.zone.darenet.org";
  
  /* description: the description of our server. */
  description = "ircd-darenet test server";
  
  /* numeric: the unqiue server numeric for our server. It must be a
   * digit between 0 and 4095, and is not updated on a rehash.
   */
  numeric = 999;
  
  /* vhost: the IP to bind to when we connect outward to other servers.
   * It must contain either a * or a valid ipv4 address in dotted quad
   * notation.
   */
  vhost = "192.169.0.1";
  
  /* ssl_private_key: our ssl private key. */
  ssl_private_key = "etc/ircd.key";
  
  /* ssl_pem: file containing our ssl certificate and private key */
  ssl_pem = "etc/ircd.pem";
};

# The server name may only be changed by a server restart. The description
# can be changed on rehash, but will not propagate to other linked servers.
#
# There must be exactly one General block.
##############################################################################

##############################################################################
# Admin [SUGGESTED]
#
# The Admin block defines information that can be retrieved with
# the /ADMIN command.
#
# Old conf format equivalents
#   A:line1:line2:line3

admin {
  location = "DareNET - http://www.darenet.org";
  location = "Infrastructure Team";
  contact = "<infrastructure@darenet.org>";
};

# Not all lines are required. There may only be one Admin block.
##############################################################################

##############################################################################
# Class [RECOMMENDED]
#
# The Class blocks define connection classes. All connections to the server
# are associated with a "connection class", whether they be incoming or
# outgoing (initiated by the server), be they clients or servers.
#
# Old conf format equivalents
#   Y:class:pingfreq::maxlinks:sendq (clients)
#   Y:class:pingfreq:connectfreq:maxlinks:sendq (servers)

class {
  /* name: a name for the connection classes. */
  name = "Users";
  
  /* pingfreq: how often to PING idle connections. The time may be
   * specified as a number (in seconds), or by giving something like
   * 1 minutes 2 seconds, or 1*60+20.
   */
  pingfreq = 1 minutes 30 seconds;
  
  /* sendq: send buffer limit (e.g., the amount of data allowed in
   * a client's queue before they are dropped.
   */
  sendq = 160000;
  
  /* maxlinks: The maximum number of connections that may use this
   * class. May be between 0 and 4,000,000,000.
   */
  maxlinks = 100;
  
  /* usermode: an optional list of user modes that should be set
   * upon the user while connecting.
   */
  usermode = "+iw";
};

class {
  name = "Opers";
  pingfreq = 1 minutes 30 seconds;
  sendq = 160000;
  maxlinks = 25;
  usermode = "+iw";
  whox;
};

class {
  name = "Server";
  pingfreq = 1 minutes 30 seconds;
  
  /* connectfreq: this token applies only to servers, and specifies
   * the frequency that the server tries to auto connect. Setting this
   * to 0 will cause a server to attempt to connect repeatedly, with
   * no delay until the maxlinks condition is satisified (which is not
   * a good thing).
   */
  connectfreq = 5 minutes;
  
  /* maxlinks: for server classes, specifies the maximum number of
   * servers to autoconnect to. This should be 0 for hubs, and 1
   * for leafs.
   */
  maxlinks = 0;
  
  sendq = 9000000;
};

class {
  name = "Leaf_Server";
  pingfreq = 1 minutes 30 seconds;
  connectfreq = 5 minutes;
  maxlinks = 1;
  sendq = 9000000;
};

# For connection classes intended for operator use, you can specify
# privileges the operator should be granted when the Operator block
# names the class. The local privilege MUST be defined by either the
# Class or Operator block. It is highly recommended that most privs
# be explicityly specified in the operator's Operator block.
#
# A "default" class is created internally. This class is used when no
# other class is specified, but its settings are not useful for most
# situations. Custom classes are strongly recommended.
#
# There may be multiple Class blocks; at least one is recommended.
##############################################################################

##############################################################################
# Client [RECOMMENDED]
#
# The Client blocks define the hosts client connections are sllowed from,
# and places them into classes. While the server will start without a
# Client block, it will not be usable.
#
# Old conf format equivalents
#   I:ipmask:passwd:hostmask:port:class

client {