mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 12:43:56 +00:00
* fix(irc): chunk PRIVMSG on UTF-16 boundary to avoid lone surrogates sendPrivmsg split long messages with String.slice on a UTF-16 code-unit index, so an emoji (or other astral character) straddling the split point was cut into a lone high/low surrogate, sending broken bytes in the PRIVMSG to the IRC server. Slice each chunk with sliceUtf16Safe so a surrogate pair is never split. When the budget is too small to fit even the leading astral character, emit that character whole so chunking still makes progress. Adds a socket-level test (fake net/tls socket) asserting no PRIVMSG chunk contains a lone surrogate, including the one-code-unit budget edge case, while the existing space-preferring split is preserved. * refactor(irc): make surrogate-safe chunking direct * fix(irc): preserve one-unit chunk limits --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
IRC OpenClaw channel
Official OpenClaw channel plugin for IRC.
Install
openclaw plugins install @openclaw/irc
Docs
See docs/channels/irc.md in the OpenClaw repository, or the published docs at https://docs.openclaw.ai/channels/irc.