-
Notifications
You must be signed in to change notification settings - Fork 249
Configuration
CloudBot uses a JSON-formatted configuration file to hold settings, named config.json.
Note! This guide is still written for the old config format. It needs to be re-written for the new format.
On first run config.default.json
should be present. Rename it to config.json
and modify the settings. The default config is as follows:
{
"connections": [
{
"name": "esper",
"connection": {
"server": "irc.esper.net",
"port": 6667,
"ssl": false,
"ignore_cert": true,
"password": ""
},
"nick": "MyCloudBot",
"user": "cloudbot",
"avoid_notices": false,
"channels": [
"#cloudbot",
"#cloudbot2"
],
"disabled_commands": [],
"acls": {},
"nickserv": {
"enabled": false,
"nickserv_password": "",
"nickserv_user": "",
"nickserv_name": "nickserv",
"nickserv_command": "IDENTIFY"
},
"ratelimit": {
"max_tokens": 17.5,
"restore_rate": 2.5,
"message_cost": 5,
"strict": true
},
"permissions": {
"admins": {
"perms": [
"addfactoid",
"delfactoid",
"ignore",
"botcontrol",
"plpaste",
"permissions_users",
"op"
],
"users": [
"[email protected]",
"[email protected]"
]
},
"moderators": {
"perms": [
"addfactoid",
"delfactoid",
"ignore"
],
"users": [
"[email protected]"
]
}
},
"plugins": {},
"command_prefix": "."
}
],
"api_keys": {
"tvdb": "",
"bing_azure": "",
"wolframalpha": "",
"lastfm": "",
"rottentomatoes": "",
"soundcloud": "",
"twitter_consumer_key": "",
"twitter_consumer_secret": "",
"twitter_access_token": "",
"twitter_access_secret": "",
"imgur_client_id": "",
"imgur_client_secret": "",
"wunderground": "",
"rdio_key": "",
"rdio_secret": "",
"google_dev_key": "",
"google_cse_id": "",
"octopart": "",
"wordnik": ""
},
"database": "sqlite:///cloudbot.db",
"plugin_loading": {
"use_whitelist": false,
"blacklist": [
"update"
],
"whitelist": []
},
"web": {
"enabled": true,
"address": "0.0.0.0",
"port": 8090,
"bot_name": "CloudBot"
},
"reloading": {
"config_reloading": true,
"plugin_reloading": false
},
"logging": {
"console_debug": false,
"file_debug": true,
"show_plugin_loading": true,
"show_motd": true,
"show_server_info": true,
"raw_file_log": false
}
}
- server: The server to connect to (irc.esper.net)
- nick: The name of the bot (MyNewCloudBot)
- channels: A list of channels to join (#cloudbot)
- command_prefix: The prefix before bot commands (.)
- port: The port to connect to (6667)
- user: The bot's username (cloudbot)
- server_password: Server password (None)
- invite_join: Join channels on invite (True)
- auto_rejoin: Rejoin channels on kick (False)
- ssl: Enable/disable SSL (False)
- ignore_cert: Verify SSL certificate (True)
- nickserv_name: Name of network NickServ (nickserv)
- nickserv_command: Command used to identify to NickServ (IDENTIFY)
- nickserv_password: NickServ password (None)
- nickserv_user: Nickserv account name (None)
- keep_alive: Ping the server on a timer (False)
You can clone this section, and add a coma to make a second connection.
{
"connections":
[
{
"name": "ServerOne",
"connection": {
"server": "irc.my.net",
...
},
"nick": "MyFirstBot",
...
},
{
"name": "ServerTwo",
"connection": {
"server": "irc.other.net",
...
},
"nick": "MySecondBot",
...
}
],
...
}
An array of text, containing the names of plugins you do not want to use
An array of text, containing the names of commands you do not want to use
A collection of various API keys to be used with various plugins
A collection of settings to be used with various plugins
- prefix: Display a prefix ([factoidname]: ) when saying a factoid (False)
- ignored: A list of ignored channels/nicks/hosts ([])
A collection of phrases that will be censored ([censored]) in the output
CloudBot uses a permission node based system. Extrapolating from the example is straightforward.
If you need help with anything on this page, head on over to #CloudBot!