Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.

Configuration

Pupskuchen edited this page May 15, 2017 · 2 revisions

qwoti's configuration is done in a simple JSON file. It contains a per-network configuration (each network has its own object as part of the networks object) and some global settings that apply to every network the bot is connected to or are independent of networks.

global settings

As of now there are few global settings, but these might be are important for some modules.

"dbfile": "qwoti.db", // sqlite database file to be used by modules (so far, only the quotes module uses this)
"whoiscache": 360,    // maximum time to cache WHOIS data of a user (in minutes)
"httpPort": 8080,     // port of the http server that is run by qwoti
"api_keys": {         // API keys to be used when needed
    "lastfm": "...",
    "imgur": "..."
},

Most of these are pretty self-explanatory.

  • the database file will (or should, if already existing) be placed in a subdirectory named db relative to the location qwoti is run from
  • whois cache: since WHOIS requests are very expensive in terms of time, their data is cached the first time a user gets WHOIS'ed - usually, these details don't change often, so a high value will probably work fine
  • http port: qwoti runs a small web server that can be used to create an API (or just anything else, you do it!) - this is the port it's listening on
  • API keys: some modules (lastfm, urltitle …) use API requests to retrieve information from other services, this is where to store the access keys

network configuration

For networks, there's the networks object. For each network to connect to, we'll have an object in here mapped to the network name as key. This is very important: the key needs to equal the network name (case insensitive). Here's an example configuration for KeratNet:

"networks": {
    "keratnet": {            // network name
        "nickserv": {        // authenticate with services (optional)
            "pass": "test",
            "user": "kwoti"
        },
        "chans": ["#deaf"],  // channels to join
        "ident": "kwoti",    // ident
        "changenick": true,  // whether to change the nickname if it's not available
        "owners": [          // bot "owners" - they have all the privileges
            "Ditti",
            "pupskuchen",
            "lennard"
        ],
        "commandchar": ";",  // command prefix
        "ssl": true,         // connect securely
        "modules": [         // active modules that should be loaded on startup
            "topicvars",
            "reddit",
            "random",
            "networking",
            "lastfm",
            "google",
            "combocounter",
            "calc",
            "quotes",
            "urbandictionary",
            "urltitle"
        ],
        "realname": "dev-qwoti", // "real name" of the bot
        "nick": "kwoti",     // nickname to use
        "blacklisted": [],   // blacklisted users have no privileges, they're ignored whereever it's implemented
        "cap": true,         // enable/disable PircBotX's CAP handling
        "port": 6697,        // network's port
        "unprivileged": [],  // what is this?
        "host": "irc.kerat.net", // network address
        "autoreconnect": 10, // automatically reconnect when disconnected
        "trustAllCerts": true,   // trust all SSL certs, this could be a potential security risk
        "admins": []         // users with some more privileges
    }
}

To be continued …

Clone this wiki locally