matrix.md: added irc bridge section

This commit is contained in:
Vitor Gonçalves 2024-01-25 09:15:18 -03:00
parent 48882722c7
commit a34578b25a
Signed by: vitorg
GPG Key ID: B90BF113DF56EB41
1 changed files with 38 additions and 1 deletions

View File

@ -23,7 +23,7 @@ We have an instance of maubot which runs the following:
## XMPP Bridge
We also host bifrost, a XMPP bridge.
We host bifrost, a XMPP bridge.
The address syntax to access XMPP from Matrix:
@ -43,6 +43,43 @@ It also supports plumbing of existent Matrix rooms to XMPP rooms, room administr
You can also type `!bifrost help` for help on bifrost commands at any time.
## IRC Bridge
We host relixbox, an IRC bridge.
It is setup in the backend, however. The configuration is the Python script itself. This means that if you want to bridge your rooms, you need to run the script in your pubnix account.
Firstly, clone it from [the git upstream](https://git.vitali64.duckdns.org/misc/relixbot.git) [(tor alternative link)](http://fs4xhnfag3udez4qhfpyxdvnue7aebrw2kbc2tcvnbrsecxlpcscgxyd.onion/misc/relixbot.git). Then, you can edit the following variables:
```python
server = [ ['irc.libera.chat', 'libera'], ['mtrx.vern.cc', 'matrix'] ]
# Use the internal matrix room address.
relayedChannels = [ [ '#chan1', '!aBCrdDeRfG:matrix.org' ], [ '##chan2', '!xgwAUWHbwWUG:vern.cc' ] ]
nick = 'TestRelay'
debug = True
channels = [ 0, 1 ] # Multiple channels
join_leave_msgs = False # Relay Join/Left messages.
```
They should be self-explanatory, apart from the `channels` variable, that should contain the indexes of how many channels you are bridging. For example, if you have `relayedChannels = [ ["#chan1", "!idk:matrix.org"] ]` set, it should contain `[ 0 ]`. If you have `relayedChannels = [ [ '#chan1', '!aBCrdDeRfG:matrix.org' ], [ '##chan2', '!xgwAUWHbwWUG:vern.cc' ], [ '#chan3', '!edwfsiofn:vern.cc' ] ]`, it should contain `[ 0, 1, 2 ]` and so on.
After editing the configuration to your liking, you should be able to create a SystemD user unit, following this example:
```ini
[Unit]
Description=IRC to Matrix Bridge
[Service]
ExecStart=/run/current-system/sw/bin/python3 /home/<your username>/irc-bridge.py
[Install]
WantedBy=default.target
```
Write the file to `~/.config/systemd/user/irc-bridge.service`, then enable the service by running `systemctl --user enable --now irc-bridge.service`.
Done! You should have a working IRC bridge hosted at your pubnix account.
## Message Retention
We currently do not have a message retention policy set, but its possible to delete all your messages when you deactivate your user by setting `erase=true` option in json.