Skip to content
Valter Strods edited this page Feb 27, 2012 · 3 revisions

In the page, the /config_path/ directory is mentioned. It refers to the configuration directory.`

Daemon support

To run IRC Node in the background (as daemon), it requires daemon.node inside the configuration directory. If the file is missing, you will still be able to run the bot in foreground.

Installing daemon.node is as simple as calling npm install daemon. The command download the source and builds it.

Environment variables

  • IRC_NODE_PATH -- if set, the bot will look for configuration files in this path instead of the default ~/.ircnode.
  • IRC_NODE_DEBUG -- if set to false, the bot will only output warnings and errors.
  • IRC_NODE_PREFIX -- if set, the bot will use the value given as the command prefix to listen to

/config_path/config

Base configuration file containing connection settings. A sample of this file is included in source with name config.sample.

The file contains the values:

  • "port": xxxx -- number, the port for the bot to connect to
  • "address": "irc.server.com" -- string, the server address for the bot to connect to
  • "nick": "botname" -- string, the nick for the bot to use
  • "user": "botname" -- string, the username for the bot to use
  • "chan": "#chan" or "chan": ["#chan1", "#chan2"] -- string or array, the channel or channels for the bot to join
  • "realName": "Bot Name" -- string, the real name for the bot to use
  • "prefix": "!" -- string, the command prefix for the bot to listen to

/config_path/users.json

User information and setting file. A sample of this file is included in source with name users.json.sample.

The file contains the users in the following syntax:

{
  "user": {
    "auth": "owner" -- Marks user as owner (also includes admin rights).
    Other information about user is stored here.
  },
  "secondUser": {
    "auth": "admin" -- Marks secondUser as admin.
    Other information about secondUser is stored here.
  }
}