Difference between revisions of "MatrixIRCBridge"

From Tmplab
(Objective 3 : allow IRC users to pose on matrix)
(Objective 3 : allow IRC "unconnected" users to post on matrix)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This document is dedicated to explaining how to connect a Matrix room with any IRC room on the libera.chat network.  
+
'''This document is dedicated to explaining how to connect a Matrix room with any IRC room on the libera.chat network.  
 
+
'''
 
As a prerequisite, you need to have the two rooms and be an admin for these two rooms, with your existing accounts on Matrix and IRC.
 
As a prerequisite, you need to have the two rooms and be an admin for these two rooms, with your existing accounts on Matrix and IRC.
  
Line 10: Line 10:
 
== Objective 1 : connect Matrix to IRC ==
 
== Objective 1 : connect Matrix to IRC ==
  
1. MATRIX: open the room info page, and head to the plugins / integrations menu.
+
1. '''MATRIX''': open the room info page, and head to the plugins / integrations menu.
  
2. MATRIX: require an IRC plugin
+
2. '''MATRIX''': require an IRC plugin
  
3. MATRIX: fill the form with IRC network/chan/user
+
3. '''MATRIX''': fill the form with IRC network/chan/user
  
 
== Objective 2 : allow bridge on IRC  ==
 
== Objective 2 : allow bridge on IRC  ==
  
4. IRC : reply "yes" to the DM discussion which has been opened by the user "matrixbridge" :  
+
4. '''IRC''' : reply "yes" to the DM discussion which has been opened by the user "matrixbridge" :  
  
 
   > @<you:your.matrix.server> has requested to bridge '<Matrix room>' (<https://matrix.to/#/room:matrix.server>) with #matrix_room on this IRC network. Respond with 'yes' or 'y' to allow, or simply ignore this message to disallow. You have 300 seconds from when this message was sent.
 
   > @<you:your.matrix.server> has requested to bridge '<Matrix room>' (<https://matrix.to/#/room:matrix.server>) with #matrix_room on this IRC network. Respond with 'yes' or 'y' to allow, or simply ignore this message to disallow. You have 300 seconds from when this message was sent.
Line 24: Line 24:
 
You should see the users being imported in the IRC room from the matrix chan, progressively.
 
You should see the users being imported in the IRC room from the matrix chan, progressively.
  
== Objective 3 : allow IRC users to pose on matrix ==
+
== Objective 3 : allow IRC "unconnected" users to post on matrix ==
  
 
5. '''MATRIX''' : type "/devtools" in the matrix room chat.
 
5. '''MATRIX''' : type "/devtools" in the matrix room chat.
Line 30: Line 30:
 
6. '''MATRIX''' : head to the "room state" page and then click on "send custom events" / "état du salon" "Envoyer des événements d’état personnalisés" in French
 
6. '''MATRIX''' : head to the "room state" page and then click on "send custom events" / "état du salon" "Envoyer des événements d’état personnalisés" in French
  
7. '''MATRIX''' : Following the documentation posted [here https://matrix-org.github.io/matrix-appservice-irc/latest/room_configuration.html#linelimit], select a "State" event (st), enter the type "", and then the event body is
+
7. '''MATRIX''' : Following [https://matrix-org.github.io/matrix-appservice-irc/latest/room_configuration.html the documentation posted here], select a "State" event (st), enter the type "org.matrix.appservice-irc.config", and then the event body as follows
  
 
   {
 
   {
Line 39: Line 39:
 
     "type": "org.matrix.appservice-irc.config",
 
     "type": "org.matrix.appservice-irc.config",
 
     "unsigned": {},
 
     "unsigned": {},
     "room_id": "<matrix room id>"
+
     "room_id": "<CHANGE ME matrix room id CHANGE ME>"
 
   }
 
   }
  

Latest revision as of 10:22, 19 October 2022

This document is dedicated to explaining how to connect a Matrix room with any IRC room on the libera.chat network. As a prerequisite, you need to have the two rooms and be an admin for these two rooms, with your existing accounts on Matrix and IRC.

Also, note that the procedure we describe is a less standard version than usual, where you connect to an existing IRC room in Matrix using the "#your_room:libera.chat" room name.

The basics of the procedure we describe are explained in this github bug comment : https://github.com/matrix-org/matrix-appservice-irc/issues/1324#issuecomment-866828587


Objective 1 : connect Matrix to IRC

1. MATRIX: open the room info page, and head to the plugins / integrations menu.

2. MATRIX: require an IRC plugin

3. MATRIX: fill the form with IRC network/chan/user

Objective 2 : allow bridge on IRC

4. IRC : reply "yes" to the DM discussion which has been opened by the user "matrixbridge" :

 > @<you:your.matrix.server> has requested to bridge '<Matrix room>' (<https://matrix.to/#/room:matrix.server>) with #matrix_room on this IRC network. Respond with 'yes' or 'y' to allow, or simply ignore this message to disallow. You have 300 seconds from when this message was sent.

You should see the users being imported in the IRC room from the matrix chan, progressively.

Objective 3 : allow IRC "unconnected" users to post on matrix

5. MATRIX : type "/devtools" in the matrix room chat.

6. MATRIX : head to the "room state" page and then click on "send custom events" / "état du salon" "Envoyer des événements d’état personnalisés" in French

7. MATRIX : Following the documentation posted here, select a "State" event (st), enter the type "org.matrix.appservice-irc.config", and then the event body as follows

 {
   "content": {
     "lineLimit": 5,
     "allowUnconnectedMatrixUsers": true
   },
   "type": "org.matrix.appservice-irc.config",
   "unsigned": {},
   "room_id": "<CHANGE ME matrix room id CHANGE ME>"
 }

Note : to get the absolute room_id (something like !iCrBRXZcTDjFbja:matrix.org) you can look at other room events.

And this is how this documention ends. Hope you liked it!