config.docker.lua

Tue, 24 Aug 2021 11:31:38 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 24 Aug 2021 11:31:38 +0100
changeset 163
999573fb51ab
parent 161
c4df517edbc1
permissions
-rw-r--r--

plugins.eliza: Strip all trailing whitespace from responses

package.path  = "/opt/custom-plugins/?.lua;"..package.path;
package.cpath = "/opt/custom-plugins/?.lua;"..package.cpath;

local function split(s)
	local r = {};
	for t in (s or ""):gmatch("[^%s,]+") do
		r[#r+1] = t;
	end
	return r;
end

jid = os.getenv "RIDDIM_JID" or "bot@localhost"
password = os.getenv "RIDDIM_PASSWORD" or "password"
nick = os.getenv "RIDDIM_NICK" or "riddim"
autojoin = split(os.getenv "RIDDIM_ROOMS")
plugins = split(os.getenv "RIDDIM_PLUGINS" or "groupchat, commands")
debug = (os.getenv "RIDDIM_DEBUG" == "1") and true
connect_port = os.getenv "RIDDIM_CONNECT_PORT" or nil
connect_host = os.getenv "RIDDIM_CONNECT_HOST" or nil
command_prefix = os.getenv "RIDDIM_COMMAND_PREFIX" or "-"

mercurial