Disable bridge from ingame
This commit is contained in:
parent
604f8dc0d3
commit
679023774d
4
init.lua
4
init.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue