Compare commits
5 Commits
cd0c9c92d1
...
679023774d
Author | SHA1 | Date |
---|---|---|
AliasAlreadyTaken | 679023774d | |
AliasAlreadyTaken | 604f8dc0d3 | |
AliasAlreadyTaken | fa3d6b1589 | |
AliasAlreadyTaken | 5468229d9e | |
AliasAlreadyTaken | 9e0f1f29bc |
29
README.md
29
README.md
|
@ -16,7 +16,6 @@ This mod adds support for [matterbridge](https://github.com/42wim/matterbridge)
|
|||
|
||||
Get it from https://gitea.your-land.de/AliasAlreadyTaken/yl_matterbridge
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
copy the "yl_matterbridge" folder to your mod folder and enable it in your world.mt.
|
||||
|
@ -100,6 +99,34 @@ function yl_matterbridge.chat_message(user_name, message_text)
|
|||
end
|
||||
```
|
||||
|
||||
## Supported versions
|
||||
|
||||
If you run yl_matterbridge in one of the supported versions, but something is wrong, please [file a bug](https://gitea.your-land.de/AliasAlreadyTaken/yl_matterbridge/issues/new). PRs also welcome.
|
||||
|
||||
If you run yl_matterbridge in one of the unknown versions, like MacOS or Android or Linux, please tell us whether it works or not. We will add your findings to the readme.
|
||||
|
||||
There is no reason to believe it doesn't work anywhere, but you never know.
|
||||
|
||||
### Windows
|
||||
|
||||
MT versions 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.2.0, 5.3.0, 5.4.0 5.4.1, 5.5.0
|
||||
|
||||
### Linux
|
||||
|
||||
MT versions 5.5.0
|
||||
|
||||
### MacOS
|
||||
|
||||
unknown
|
||||
|
||||
### Android
|
||||
|
||||
unknown
|
||||
|
||||
### Misc
|
||||
|
||||
unknown
|
||||
|
||||
## Allied projects
|
||||
|
||||
If you know a project that uses this bridge tell us and we will add it to the list.
|
||||
|
|
10
init.lua
10
init.lua
|
@ -1,4 +1,4 @@
|
|||
-- Version 1.0.1
|
||||
-- Version 1.0.3
|
||||
-- Author AliasAlreadyTaken
|
||||
-- License MIT
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
|||
-- 0.0.2 Feature complete including settings
|
||||
-- 1.0.0 Ready for release
|
||||
-- 1.0.1 Bugfix https://gitea.your-land.de/your-land/bugtracker/issues/1646
|
||||
-- 1.0.2 Bugfix settingtypes: bool instead of boolean
|
||||
-- 1.0.3 Release to cdb
|
||||
|
||||
local mod_start_time = core.get_us_time()
|
||||
core.log("action", "[MOD] yl_matterbridge loading")
|
||||
|
@ -19,7 +21,7 @@ yl_matterbridge = {}
|
|||
--yl_matterbridge.worldpath = core.get_worldpath() .. DIR_DELIM
|
||||
|
||||
yl_matterbridge.information = {}
|
||||
yl_matterbridge.information.version = "1.0.1"
|
||||
yl_matterbridge.information.version = "1.0.3"
|
||||
yl_matterbridge.information.author = "AliasAlreadyTaken"
|
||||
yl_matterbridge.information.license = "MIT"
|
||||
yl_matterbridge.information.name = "yl_matterbridge"
|
||||
|
@ -27,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"
|
||||
|
@ -50,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",
|
||||
|
@ -89,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
|
||||
|
|
|
@ -6,24 +6,24 @@
|
|||
# The address or IP to the matterbridge server
|
||||
# If you run the bridge on the same machine where you run your MT, you can use the default
|
||||
# Defaults to 127.0.0.1
|
||||
yl_matterbridge.address (Bridge IP address or URL) string "127.0.0.1"
|
||||
yl_matterbridge.address (Bridge IP address or URL) string 127.0.0.1
|
||||
|
||||
# The port the matterbridge server listens to
|
||||
# You need to set this to the port of the API connection, which you configured in the toml
|
||||
# Defaults to 4242
|
||||
yl_matterbridge.port (Bridge port) string "4242"
|
||||
yl_matterbridge.port (Bridge port) string 4242
|
||||
|
||||
# The name of the gateway of the matterbridge server
|
||||
# You need to set this to the gatewayname, which you configured in the toml
|
||||
# Defaults to "default"
|
||||
yl_matterbridge.gateway (Bridge gateway) string "default"
|
||||
yl_matterbridge.gateway (Bridge gateway) string default
|
||||
|
||||
# The token the matterbridge server
|
||||
# If you don't configure this, every wellformed message to the right port will be relayed
|
||||
# Optional
|
||||
yl_matterbridge.token (Bridge token) string ""
|
||||
yl_matterbridge.token (Bridge token) string
|
||||
|
||||
# Whether or not debugging messages are enabled
|
||||
# If set to true, the mod will write every send and receive to the log, among other debug messages.
|
||||
# Optional, default false
|
||||
yl_matterbridge.debug (Debug mode) boolean false
|
||||
yl_matterbridge.debug (Debug mode) bool false
|
Loading…
Reference in New Issue