diff --git a/README.md b/README.md index 7ad2d01..8fb924c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,46 @@ # mt-matrix -Matrix-Minetest bridge \ No newline at end of file +This repository serves as a bridge between Matrix and Minetest servers. + +## Setup + +1. Clone this repository into your Minetest mods folder: + +```sh +git clone --recursive https://git.noordstar.me/Bram/mt-matrix.git +``` + +2. To access the Matrix homeserver, this mod needs access to HTTP calls. Add this mod to your `minetest.conf` settings at the field `secure.http_mods`: + +``` +# Comma-separated list of mods that are allowed to access HTTP APIs, which +# allow them to upload and download data to/from the internet. +# type: string +secure.http_mods=mt_matrix +``` + +3. Fill in the values in `config.lua`: + +```lua +config = { + + -- The user one expects to log in as + user = "@minetest:matrix.directory", + + -- The URL where the user communicates with the Matrix homeserver + url = "https://synapse.matrix.directory", + + -- Room ID that the Minetest server bridges to + room_id = "!fePhSRwZXgzmREGqFV:matrix.directory", + + -- Access token to access the Matrix homeserver + access_token = "syt_bWluZXRlc3Q_TafRsEjsCwVaCxFYCIkT_2iChoq", + + -- Average timeout duration + sync_timeout = 30 +} +``` + +4. Add the mod to your world configuration. + +Now you're good to go! Feel free to create issues or send me a message. \ No newline at end of file diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..bd0f1b7 --- /dev/null +++ b/mod.conf @@ -0,0 +1,2 @@ +name = mt_matrix +description = This mod creates a bridge between a Matrix room and the in-game Minetest chat.