config.docker.lua

Tue, 22 Sep 2020 14:59:25 +0200

author
Seve Ferrer <seve@delape.net>
date
Tue, 22 Sep 2020 14:59:25 +0200
changeset 159
7ca948b157df
parent 158
57ee70718ecc
child 161
c4df517edbc1
permissions
-rw-r--r--

plugins/commands.lua: The default command_prefix value is set on config.docker.lua.

156
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 package.path = "/opt/custom-plugins/?.lua;"..package.path;
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 package.cpath = "/opt/custom-plugins/?.lua;"..package.cpath;
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 local function split(s)
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 local r = {};
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 for t in (s or ""):gmatch("[^%s,]+") do
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 r[#r+1] = t;
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 end
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 return r;
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 end
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 jid = os.getenv "RIDDIM_JID" or "bot@localhost"
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 password = os.getenv "RIDDIM_PASSWORD" or "password"
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 nick = os.getenv "RIDDIM_NICK" or "riddim"
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 autojoin = split(os.getenv "RIDDIM_ROOMS")
619b1b9c16bc config.docker.lua: Add to repo, used by default for Docker images
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 plugins = split(os.getenv "RIDDIM_PLUGINS" or "groupchat, commands")
158
57ee70718ecc config.docker.lua: Expose more settings as environment variables
Seve Ferrer <seve@delape.net>
parents: 156
diff changeset
17 debug = os.getenv "RIDDIM_DEBUG" or true
57ee70718ecc config.docker.lua: Expose more settings as environment variables
Seve Ferrer <seve@delape.net>
parents: 156
diff changeset
18 connect_port = os.getenv "RIDDIM_CONNECT_PORT" or nil
57ee70718ecc config.docker.lua: Expose more settings as environment variables
Seve Ferrer <seve@delape.net>
parents: 156
diff changeset
19 connect_host = os.getenv "RIDDIM_CONNECT_HOST" or nil
57ee70718ecc config.docker.lua: Expose more settings as environment variables
Seve Ferrer <seve@delape.net>
parents: 156
diff changeset
20 command_prefix = os.getenv "RIDDIM_COMMAND_PREFIX" or "-"

mercurial