relaymsg: store relayed messages in +H history#143
Open
matheusfillipe wants to merge 2 commits into
Open
Conversation
RELAYMSG delivers via sendto_channel(), which skips the HOOKTYPE_CHANMSG hook that records messages into +H history. So relayed messages never got stored and were missing from CHATHISTORY playback. Record them ourselves when the channel is +H, for both RELAYMSG and RRELAYMSG.
RELAYMSG and RRELAYMSG duplicated the spoofed PRIVMSG send + history record inline. Move it into one helper. This also unifies the server-to-server RRELAYMSG path, which had its source nick and target channel swapped.
Member
|
As this is Valware's module, @ValwareIRC will have to approve this. |
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.
RELAYMSGdelivers messages withsendto_channel(), which skips theHOOKTYPE_CHANMSGhook that the history module uses to record into+Hchannel history. So relayed (bridge) messages were never stored — they're missing fromCHATHISTORYplayback and on-join history, while normal messages show up fine.This records the relayed line into history ourselves when the channel has
+H(gated so it never hits the no-limit path on non-history channels), for both the localRELAYMSGand the server-to-serverRRELAYMSGpaths. Thedraft/relaymsgtag is carried through so clients still render it as a relay on playback.