feat(chatlog): public-channel logger with HTTP playback for the web chat #3

Merged
thelion merged 1 commit from feat/chatlog into main 2026-10-26 17:00:38 +00:00
Owner

Adds chatlog/, a small Go service that provides playback for https://ircforever.org/chat/ (ngircd and the websocket gateway keep no history).

  • Bot ChatLog connects to ngircd on 127.0.0.1:6667, joins public channels from LIST (busiest first, up to 280 under ngircd's MaxJoins 300), rate-limited.
  • Logs only channel PRIVMSG / ACTION / NOTICE in channels confirmed public; skips and deletes secret (+s), private and keyed (+k) channels. Private messages are never stored.
  • Ops opt out with /msg ChatLog nolog #chan (deletes stored lines, persisted); log #chan re-enables.
  • SQLite (pure Go), 7-day retention.
  • GET /history/{channel}?since=&limit= → {"channel","messages":[{time,kind,nick,text}]}, CORS for configured origins, /healthz.
  • rc.d script and deploy notes (relayd route for chat.ircforever.org/history/*) in the README.

Already deployed on irc.ircforever.org (rcctl chatlog, relayd route added, backup at /etc/relayd.conf.bak-pre-chatlog). go vet and go test -race pass; builds for openbsd/amd64 with CGO off.

🤖 Generated with Claude Code

Adds `chatlog/`, a small Go service that provides playback for https://ircforever.org/chat/ (ngircd and the websocket gateway keep no history). - Bot **ChatLog** connects to ngircd on 127.0.0.1:6667, joins public channels from LIST (busiest first, up to 280 under ngircd's MaxJoins 300), rate-limited. - Logs only channel PRIVMSG / ACTION / NOTICE in channels confirmed public; skips and deletes secret (+s), private and keyed (+k) channels. Private messages are never stored. - Ops opt out with `/msg ChatLog nolog #chan` (deletes stored lines, persisted); `log #chan` re-enables. - SQLite (pure Go), 7-day retention. - `GET /history/{channel}?since=&limit=` → `{"channel","messages":[{time,kind,nick,text}]}`, CORS for configured origins, `/healthz`. - rc.d script and deploy notes (relayd route for chat.ircforever.org/history/*) in the README. Already deployed on irc.ircforever.org (rcctl `chatlog`, relayd route added, backup at /etc/relayd.conf.bak-pre-chatlog). `go vet` and `go test -race` pass; builds for openbsd/amd64 with CGO off. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(chatlog): add public-channel logger with HTTP playback for the web chat
All checks were successful
ci / ci (pull_request) Successful in 48s
f0670f0f51
A Go bot (ChatLog) that sits in public IRCForever channels on ngircd,
stores channel PRIVMSG/ACTION/NOTICE in SQLite (pure Go, no cgo) for
7 days, and serves GET /history/{channel} as JSON for ircforever.org/chat.

- LIST every 10m, joins busiest channels first at <=1 JOIN/s, capped
  below ngircd MaxJoins; nothing is logged until MODE confirms the
  channel is not +s/+p/+k, and it parts and deletes data if such a mode
  appears later
- private messages are never stored
- channel ops can /msg ChatLog nolog|log #chan (persisted opt-out)
- hourly retention purge; CORS limited to configured origins
- README with OpenBSD build, rc.d script, relayd snippet and MaxJoins note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thelion deleted branch feat/chatlog 2026-10-26 17:00:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ircforever/website!3
No description provided.