Re: nodesync is changing the cursor color
By: deon to Digital Man on Fri Apr 17 2026 10:52 pm
> Hi DM,
>
> I've noticed that when setting colors with ANSI ESC does, eg: ESC[1;32;40m
> and then calling bbs.nodesync(), that colors are being reset back to low
> intensity white.
>
> Why isnt the color sticking?
>
> eg:
>
> -+- test.js
> require("sbbsdefs.js", "K_NONE");
>
> write('current white:');
> write(' \x1b[1;32;40mXX BRIGHT GREEN:');
> //write(' \1g\1hXX BRIGHT GREEN AGAIN:');
> bbs.nodesync();
> write('YY BRIGHT GREEN?:');
> read = console.inkey(K_NONE,10000);
> -+-
>
> If I ";EXEC ?test", it shows XX BRIGHT GREEN correctly, but YY BRIGHT GREEN
> is not green.
>
> If I uncomment the line using \1\g codes, it does stay green.
This is "not the way". You should use Ctrl-A codes (or set console.attributes pr
operty) so that:
1. Synchronet knows what attributes you intended to set for the client and can r
estore them if/when needed
2. The code will work with non-ANSI terminals
--
digital man (rob)
Breaking Bad quote #3:
Please tell me: how much is enough? How big does this pile have to be? - Skyler
Norco, CA WX: 76.7°F, 16.0% humidity, 1 mph W wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
|