config.docker.lua

Mon, 06 Dec 2021 11:27:36 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 06 Dec 2021 11:27:36 +0000
changeset 168
1c2b8d10ceed
parent 161
c4df517edbc1
permissions
-rw-r--r--

rtbl_admin: Add access control around commands

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")
161
c4df517edbc1 config.docker.lua: Require RIDDIM_DEBUG=1 to enable debug mode
Matthew Wild <mwild1@gmail.com>
parents: 158
diff changeset
17 debug = (os.getenv "RIDDIM_DEBUG" == "1") and true
158
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