Fix CTCP ACTION: wrap in \x01 so /me + image shares render as '* nick …' in every client (mIRC etc.)

This commit is contained in:
Jean Chevronnet 2026-07-10 21:09:36 +00:00
parent 4f8d10c8a5
commit b1b628bdc9
No known key found for this signature in database

View file

@ -230,7 +230,9 @@ export class IrcClient {
}
action(target: string, text: string): void {
// Proper CTCP ACTION (\x01ACTION …\x01); reserve 9 bytes for the wrapper.
for (const part of this.splitForLine('PRIVMSG', target, text, 9)) this.send(`PRIVMSG ${target} :ACTION ${part}`);
// Without the \x01 delimiters other clients (mIRC, …) show a literal "ACTION"
// in a normal line instead of rendering "* nick …".
for (const part of this.splitForLine('PRIVMSG', target, text, 9)) this.send(`PRIVMSG ${target} :\x01ACTION ${part}\x01`);
}
setNick(nick: string): void { this.send(`NICK ${nick}`); }
// User modes (global, per-user). Query with no modestring → RPL_UMODEIS (221).