The IRCForever web chat (ircforever.org/chat) as a Svelte 5 component
Find a file
forgejo-actions 2afe87732c chore(release): 1.3.0 [skip ci]
# [1.3.0](https://code.ircforever.org/ircforever/chat/compare/v1.2.0...v1.3.0) (2026-11-11)

### Features

* add a network from the chat, the chat in 11 languages, custom dropdowns ([#2](#2)) ([846b017](846b01790e))
2026-11-11 13:13:55 +00:00
.forgejo/workflows feat: every IRC command, and ZNC-style bouncer commands (#1) 2026-11-10 02:23:31 +00:00
scripts feat: the IRCForever web chat as a Svelte 5 component 2026-10-26 16:33:47 -04:00
src/lib feat: add a network from the chat, the chat in 11 languages, custom dropdowns (#2) 2026-11-11 12:55:15 +00:00
test feat: add a network from the chat, the chat in 11 languages, custom dropdowns (#2) 2026-11-11 12:55:15 +00:00
.gitignore feat: the IRCForever web chat as a Svelte 5 component 2026-10-26 16:33:47 -04:00
.releaserc.json feat: the IRCForever web chat as a Svelte 5 component 2026-10-26 16:33:47 -04:00
CHANGELOG.md chore(release): 1.3.0 [skip ci] 2026-11-11 13:13:55 +00:00
LICENSE feat: the IRCForever web chat as a Svelte 5 component 2026-10-26 16:33:47 -04:00
package.json feat: add a network from the chat, the chat in 11 languages, custom dropdowns (#2) 2026-11-11 12:55:15 +00:00
pnpm-lock.yaml feat: every IRC command, and ZNC-style bouncer commands (#1) 2026-11-10 02:23:31 +00:00
README.md feat: add a network from the chat, the chat in 11 languages, custom dropdowns (#2) 2026-11-11 12:55:15 +00:00

@ircforever/chat

The IRCForever web chat (https://ircforever.org/chat/) as a Svelte 5 component.

  • Guests connect over IRC-over-WebSocket (a KiwiIRC webircgateway) with a friendly nick.
  • Signed in ("sign in with IRCForever" / /login), the chat rides the visitor's own evrd bouncer: their nick (identified with NickServ by evrd), channels, DMs and history, and a picker for their networks. They can add a network right there (one evrd knows, or any server), and an account with none is asked to: it goes on their evrd account, connected, and the chat moves to it. Needs evrd 0.55 or newer (older ones don't let a web chat add networks).
  • Every IRC command: channel, people, services, server and IRC-operator commands (/whois, /whowas, /names, /oper, /kline, /squit…); anything else is sent to the server as typed, so server-specific commands work too. Dialogs for /list, /whois, /help, /motd, /oper.
  • Bouncer commands, signed in, as on ZNC: /znc <command> (or /status, /msg *status, or typing in the *status window) goes to evrd, and its answers show in *status. Command lines go through evrd as typed, so the bouncer's aliases work.
  • Mentions, DMs, notifications, embeds through an image proxy, public-channel playback, colour schemes, a phone layout.
  • 11 languages: English, Deutsch, Español, Français, Bahasa Indonesia, Italiano, 日本語, Bahasa Melayu, Português (Brasil), Română, Türkçe. The site's lang, else the visitor's pick in settings (kept in this browser), else the browser's languages, else English. Signed in, evrd answers in the same language. What IRC and the server say stays as sent. Catalogs are in src/lib/i18n/<code>.js; English has every key, and pnpm test checks the others have the same ones.

Use

pnpm add "git+https://code.ircforever.org/ircforever/chat.git#v1.0.0"
<script>
  import { ChatApp } from '@ircforever/chat'
</script>

<ChatApp />

It fills its parent (a full-height flex column works well). Colours come from the --color-* custom properties; a page that doesn't define them can import '@ircforever/chat/tokens.css'.

Props

Prop Default
gateway wss://chat.ircforever.org/webirc/websocket/ IRC over WebSocket for guests
channels ['#IRCForever', '#IRCNow'] joined on a first visit (after that, the visitor's own)
evrd https://evrd.ircforever.org the bouncer to sign in with ('' hides sign-in); it must list your site in web_chat_origins
history https://chat.ircforever.org/history/ public-channel playback ('' off)
imgProxy https://chat.ircforever.org/img?u= image previews load through this, so linked sites don't see visitors ('' loads directly)
title Chat — IRCForever the tab title (the unread count goes in front)
signInLabel sign in with IRCForever, translated
lang '' the language (de, pt-BR…); '' lets the visitor pick, from their browser's languages at first. Set, it hides the picker

Also exported: createMultiIrcBloc (the chat state, without the UI; lang option and setLang), formatMessage, COMMANDS, THEMES, applyTheme, LANGUAGES, translator, pickLanguage.

Develop

The package ships source; pnpm check compiles every component (client and server) and imports every module. pnpm test checks what every command sends and how replies show (a pretend gateway and bouncer); pnpm test:live runs the chat against a real ngIRCd in Docker. To try changes in the website, point its dependency at your checkout ("@ircforever/chat": "link:../chat").

Releases are cut by semantic-release from Conventional Commits on main (fix: → patch, feat: → minor), as v* tags; sites pin a tag.