docs/specs | ||
src | ||
test | ||
.gitignore | ||
.tsconfig.json | ||
CHANGELOG.md | ||
config.example.json | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
reflection.js | ||
reflection.key | ||
reflection.pem |
ReflectionIRCd
ReflectionIRCd is an IRCd that bridges Matrix, allowing you to use an IRC client to chat on Matrix.
This is still in beta. There's console.log
s all over the place, an inadequate amount of testing and error/bounds checking, several bugs, etc.
That said, it is usable for basic chatting; if you use a good IRC client, you won't have many problems. See the support matrix (pun intended) below for what it can do. The issue tracker is here: https://todo.sr.ht/~emerson/reflectionircd
Highlights
- IRC first: The goal is for modern IRC clients to have feature parity with any other Matrix client
- Standalone: Uses the Client-Server API, so you can use it with any homeserver
- Multi-user: Log in to multiple Matrix users at the same time
Known issues
Encrypted channels
They don't work. You'll join the channel but won't be able to read any messages. You can send messages but they'll show up as "unencrypted" with a scary icon next to them.
Homeserver TLS
Homeservers must be available over HTTPS with a valid TLS cert. This shouldn't be an issue because you all do this anyways, right?
Joining channels
You can't right now. However, if you join a channel via Element (other clients are available), it will auto-join your IRC client to it.
PMs
You can't send a PM to individual users, since a "PM" in Matrix is just another room, and you can't join rooms from IRC yet. Also because they're just another room, they're given a channel prefix (&
) so that topics/PLs/etc work correctly.
Spaces
There's no IRC equivalent to Spaces (I'll probably write a spec for it since it's widely used elsewhere). Since they are just regular rooms, they show up in IRC as just regular rooms. You aren't supposed to send messages to them, once I implement mode handling I'll use +m
to disallow sending.
Client overload
If you're in a ton of channels, or several big ones, your IRC client/CPU might melt slightly on initial sync. I'm working on a "lazy-loading" channel list to fix that. Joining #matrix:matrix.org
using WeeChat pegs a CPU core for a good 45 seconds.
Highlighting users
In order to highlight users, you need to prefix their nick with an @
, so @emerson: hi
. Reflection automatically expands this to the user's MXID, so even though it's annoying, it's needed to stop inadvertent highlights for now.
FAQs
Who is this for?
It's for people who want to use their IRC client to chat on Matrix. It's like Bitlbee or Matterbridge, but focused specifically on IRC <-> Matrix, as well as being a reference server for IRCv3 specifications.
It's not meant for community use; if you are a homeserver admin and want to allow all your users to use IRC, you would be better off with heisenbridge.
Why are there different channel prefixes?
Because matrix room names are often long and have characters that IRC channel names can't use, Reflection attempts to find a suitable IRC equivalent
#
channels are channels that have a canonical alias to use.
&
channels are DMs.
!
channels are the room IDs of channels whose names can't be converted into IRC-friendly names.
Why do messages appear out of order?
If you have server-time
enabled on your client, you might find messages arriving late or out of order. Similarly, if you're joined to the same channel from different homeservers, you may see messages appear on one several minutes/hours before the other(s). This is called "federation", and is considered a feature of Matrix.
Does IRC actually support all of these cool new features?
In theory, yes. In reality, no. There's currently no free, standalone IRC client that supports reactions, replies, editing/deleting messages, and channel renaming. But one day they might, and when they do, Reflection will be ready to help them in their quest for world domination.
What does "Sync is lagging" mean?
The matrix sync is set with a timeout of 15 seconds. The server is supposed to return an HTTP response after 15 seconds (if not sooner). If the server doesn't respond after 20 seconds, that message is printed to the console to warn you that the homeserver is lagging.
Why is there a random JSON object in my console?
That means you were sent an event type that I didn't know existed. Please hop into the chat and tell me what the type
value is.
Running
Copy config.example.json
to config.json
, edit the values if needed, then npm run build
and then node reflection.js
to start it
Authentication
Authentication is done via SASL PLAIN
, the username is your mxid and the password is an access token from another session plus your server domain, separated by a :
(so access_token:matrix.org
if your server is matrix.org). Note this is the domain for m.server
, not necessarily the homeserver domain. You can find this value by going to https://yourhomeserver.tld/.well-known/matrix/server. If your server is using port 443, you don't need to include the port.
Support
The main chat is #reflectionircd
on Libera (webchat), which is available on Matrix at #reflectionircd:matrix.org
. Testing channels are #reflectionircd-test
on Libera, #reflectionircd-test:matrix.org
(portal to Libera), and #reflection-matrix-test:matrix.org
(not linked to IRC). Please test in the testing channels and not in the main channel.
On Libera I'm emerson
, on Matrix I'm @emersonveenstra:matrix.org
, feel free to ping me in the channel with any questions/bug reports/complaints.
Feature support
✅ - Implemented
🟨 - Partially implemented, see notes
❌ - Not implemented yet
(IRCv3) denotes IRC features that might not be available in all clients
Name | M->I | I->M | Notes |
---|---|---|---|
text, notice, emote messages | ✅ | ✅ | |
image, file, audio, video messages | 🟨 | ❌ | Show up as links on IRC |
Channel joins | ✅ | ❌ | #1 |
Channel parts | ✅ | ✅ | |
Channel kicks | ✅ | ✅ | |
Channel bans | 🟨 | ❌ | #24 Single-user bans show up on IRC as kicks, there's no banlist yet |
Channel invites | ✅ | ✅ | |
Channel topics | ✅ | ✅ | |
Channel powers | ✅ | ❌ | #6 |
Channel lists/searching | ❌ | ❌ | #30 |
Encrypted rooms | ❌ | ❌ | #20 |
Rich text | ❌ | ❌ | #31 |
Presence | ❌ | ❌ | #25 Note that not all homeservers have presence enabled |
Channel renaming (IRCv3) | ✅ | ❌ | #16 |
Message replies (IRCv3) | ✅ | ✅ | Clients without support will still receive the reply message, but it won't be marked as a reply |
Message reactions (IRCv3) | ✅ | ✅ | |
Extended invites (IRCv3) | ✅ | ✅ | |
Typing notifications (IRCv3) | ❌ | ❌ | #26 |
Chat history (IRCv3) | ❌ | ❌ | #9 |
Multiline messages (IRCv3) | ❌ | ❌ | #10 |
Global display names (IRCv3) | ❌ | ❌ | #11 |
Per-room display names (IRCv3) | ❌ | ❌ | #13 |
Message editing (IRCv3) | ❌ | ❌ | #14 |
Message deletion/redaction (IRCv3) | ✅ | ✅ |
Running
Copy config.example.json
to config.json
, edit the values if needed, then npm run build
and then node reflection.js
to start it
Authentication
Authentication is done via SASL PLAIN
, the username is your mxid and the password is an access token from another session plus your server domain, separated by a :
(so access_token:matrix.org
if your server is matrix.org). Note this is the domain for m.server
, not necessarily the homeserver domain. You can find this value by going to https://yourhomeserver.tld/.well-known/matrix/server.