restructure, reword and typos. first draft

This commit is contained in:
Bla 2022-02-26 00:49:05 +01:00
parent 2f0baa5379
commit 83481049e2
1 changed files with 22 additions and 14 deletions

View File

@ -3,39 +3,47 @@
## Purpose
This mod sends ingame chat messages from Minetest to matterbridge and receives matterbridge messages via their swagger API.
See Matterbridge here: https://github.com/42wim/matterbridge
This mod adds support for [matterbridge](https://github.com/42wim/matterbridge) to handle chat messages between Minetest and other chat protocols like
- Discord
- IRC
- Matrix
- Telegram
- Twitch
- WhatsApp
- and more
## Download
Get it from https://gitea.your-land.de/AliasAlreadyTaken/yl_matterbridge
## Installation
Add it to your mod folder and activate it in your world.mt and add yl_matterbridge to secure.http_mods
copy the "yl_matterbridge" folder to your mod folder and enable it in your world.mt.
add yl_matterbridge to secure.http_mods in your minetest.conf
```
secure.http_mods = yl_matterbridge
```
## Usage
Download and install [matterbridge](https://github.com/42wim/matterbridge)
### Admin
## Configuration
Create a config for the API
Create a config for [matterbridge](https://github.com/42wim/matterbridge) and the chat protocols you want to use.
* https://github.com/42wim/matterbridge/wiki/How-to-create-your-config
* https://github.com/42wim/matterbridge/wiki/Api
Example (Token disabled):
An example config for minetest looks like this
```
[api.mt]
BindAddress="127.0.0.1:4242"
Buffer=1000
RemoteNickFormat="{NICK}"
#Token="abc"
#Token="DISABLED, NOT YET SUPPORTED"
```
Gateway section:
@ -48,9 +56,9 @@ account="api.mt"
channel="api"
```
### Modmakers
## Modmakers
API: Overwrite these function in your chat mod, if you want to govern sending and receveiving yourself
API: Overwrite these function in your chat mod, if you want to handle messages yourself
Don't forget to add an optional dependency to yl_matterbridge
Overwrite this function to receive something from the bridge
@ -60,7 +68,7 @@ function yl_matterbridge.publish_to_chat(user_name, message_text)
end
```
Call this function to send soemthing to the bridge
Call this function to send something to the bridge
```
function yl_matterbridge.send_to_bridge(user_name, message_text)
send(user_name, message_text)
@ -75,9 +83,9 @@ function yl_matterbridge.chat_message(user_name, message_text)
end
```
### Allied projects
## Allied projects
If you know of a project that uses this bridge, we will add it to the list.
If you know a project that uses this bridge tell us and we will add it to the list.
* smart_chat : https://github.com/acmgit/smart_chat/