Repository navigation
Bridge replies both ways using IRCv3 reply tags - #95
Open
RustyBower wants to merge 4 commits into
Open
RustyBower wants to merge 4 commits into
RustyBower wants to merge 4 commits into
Conversation
When the IRC server supports message-tags and echo-message, Discord replies are sent with a +draft/reply tag pointing at the IRC copy of the message being replied to, so IRCv3 clients (IRCCloud, The Lounge, etc.) show them threaded. The bridge requests echo-message and records the msgid the server assigns each bridged Discord message, and records which Discord message each IRC message became when posted. Lookups use an in-memory LRU cache; replies to messages it doesn't know fall back to the existing context line. CLIENTTAGDENY is respected. New irc options: - discord-reply-tags (default true) - discord-reply-context-with-tags (default true): keep the 'Reply to' context line for clients without reply support
…nthreaded IRC messages with an IRCv3 reply tag (+draft/reply or +reply) that point at a bridged message are now sent to Discord as replies to its Discord copy. Webhooks can't reply, so these are sent by the bot. This can be turned off with discord-options.thread-irc-replies. Message ids are now remembered in both directions to support this. discord-reply-context-with-tags now defaults to false: threaded replies are sent without the 'Reply to' context line, which threaded clients already show. Replies that can't be threaded still get it. Bridge can now be created without the main Dis4IRC instance, so it can be used on its own in tests.
Adds a minimal in-process IRCv3 server so the IRC pier can be tested end to end: echo-message msgid tracking, reply tags, line splitting, the context line, and falling back when message-tags, echo-message or the reply tag (CLIENTTAGDENY) aren't available.
zachbr
self-requested a review
November 2, 2026 01:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replies are currently bridged as a
Reply to "…"context line plus the message on IRC, and as plain messages on Discord. On IRC servers that support IRCv3 message tags, this makes them real replies in both directions:+draft/replyclient tag, so clients such as IRCCloud, The Lounge and recent WeeChat show them threaded under the original.+draft/reply, or+replyas some clients also send) to a bridged message are sent as Discord replies to its Discord copy.How it works
echo-message(KICL already requestsmessage-tags). When the server echoes back a line the bridge sent, the bridge records themsgidthe server assigned it against the Discord message it came from.msgid.<nick> textwith a message reference. Everything else still goes through webhooks as before.Fallback
Nothing changes unless the server supports it:
message-tags, ordraft/replyblocked byCLIENTTAGDENY→ no tags are sentecho-message→ msgids of the bridge's own messages aren't recordedIn those cases, and for replies to messages the bridge doesn't know (e.g. from before a restart), messages are bridged exactly as before, including the context line on IRC.
New options
Bridgecan now be created without the mainDis4IRCinstance, so tests can use it on its own.Testing
message-tags, withoutecho-message, and withCLIENTTAGDENYCLIENTTAGDENY=*,-draft/reply,…, viewed in IRCCloud:The fake-server tests add about a minute to
./gradlew test, mostly KICL's send rate limit.