Disable bridge from ingame

This commit is contained in:
AliasAlreadyTaken 2022-04-26 07:59:47 +02:00
parent 604f8dc0d3
commit 679023774d
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,8 @@ yl_matterbridge.information.source = "https://gitea.your-land.de/AliasAlreadyTak
yl_matterbridge.information.additional =
"Sends and receives ingame chat to and from matterbridge https://github.com/42wim/matterbridge"
yl_matterbridge.enabled = true
local settings = {}
settings.address = core.settings:get("yl_matterbridge.address") or "127.0.0.1"
settings.port = core.settings:get("yl_matterbridge.port") or "4242"
@ -52,6 +54,7 @@ local url_send = "http://" .. settings.address .. ":" .. settings.port .. "/api/
local url_receive = "http://" .. settings.address .. ":" .. settings.port .. "/api/messages"
function send(user_name, message_text)
if yl_matterbridge.enabled == false then return false end
if settings.debug then
core.log(
"action",
@ -91,6 +94,7 @@ function send(user_name, message_text)
end
local function receive()
if yl_matterbridge.enabled == false then return false end
if settings.debug then
core.log("action", "[MOD] yl_matterbridge : receive")
end