Skip to content

relaymsg: store relayed messages in +H history#143

Open
matheusfillipe wants to merge 2 commits into
unrealircd:unreal6from
matheusfillipe:relaymsg-chathistory
Open

relaymsg: store relayed messages in +H history#143
matheusfillipe wants to merge 2 commits into
unrealircd:unreal6from
matheusfillipe:relaymsg-chathistory

Conversation

@matheusfillipe

Copy link
Copy Markdown

RELAYMSG delivers messages with sendto_channel(), which skips the HOOKTYPE_CHANMSG hook that the history module uses to record into +H channel history. So relayed (bridge) messages were never stored — they're missing from CHATHISTORY playback 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 local RELAYMSG and the server-to-server RRELAYMSG paths. The draft/relaymsg tag is carried through so clients still render it as a relay on playback.

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.
@syzop

syzop commented Jun 8, 2026

Copy link
Copy Markdown
Member

As this is Valware's module, @ValwareIRC will have to approve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants