From bc6092b6e243feeb4b42495c8f4d2a9c286eef61 Mon Sep 17 00:00:00 2001 From: AliasAlreadyTaken Date: Fri, 25 Feb 2022 23:04:07 +0100 Subject: [PATCH] Readme v1 --- README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/README.md b/README.md index dfe27ef..cbd6d68 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,88 @@ + # yl_matterbridge +## 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 + +## 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 + +## Usage + +### Admin + +Create a config for the API + +* https://github.com/42wim/matterbridge/wiki/How-to-create-your-config +* https://github.com/42wim/matterbridge/wiki/Api + +Example (Token disabled): + +``` +[api.mt] +BindAddress="127.0.0.1:4242" +Buffer=1000 +RemoteNickFormat="{NICK}" +#Token="abc" +``` +Gateway section: + +``` +[[gateway]] +name="default" +enable=true +[[gateway.inout]] +account="api.mt" +channel="api" +``` + +### Modmakers + +API: Overwrite these function in your chat mod, if you want to govern sending and receveiving yourself +Don't forget to add an optional dependency to yl_matterbridge + +Overwrite this function to receive something from the bridge +``` +function yl_matterbridge.publish_to_chat(user_name, message_text) + core.chat_send_all("<" .. user_name .. "@irc> " .. message_text) +end +``` + +Call this function to send soemthing to the bridge +``` +function yl_matterbridge.send_to_bridge(user_name, message_text) + send(user_name, message_text) +end +``` + +Set this function to yl_matterbridge.chat_message = function() end if you call yl_matterbridge.send_to_bridge yourself + +``` +function yl_matterbridge.chat_message(user_name, message_text) + send_to_bridge(user_name, message_text) +end +``` + +### Allied projects + +If you know of a project that uses this bridge, we will add it to the list. + +* smart_chat : https://github.com/acmgit/smart_chat/ + +## Uninstall + +Remove it from your mod folder or deactivate it in your world.mt + +Mods that depend on it will cease to work, if the mod is removed without proper replacement. + +## License + +MIT \ No newline at end of file