If I uncomment the line using \1\g codes, it does stay green.
On 17 Apr 2026, deon said the following...
If I uncomment the line using \1\g codes, it does stay green.
sync likely doesn't parse the ansi and doesn't know the color
changed.
during nodesync it saves known color attributes first (in this case
that would be whatever the state was before the injected ansi) and
restores them afterwards, clobbering your changes.
the ctrl-a codes get parsed and do end up updating what sync thinks
is the current color state.
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 property) so that:
Re: nodesync is changing the cursor color
By: Digital Man to deon on Fri Apr 17 2026 01:29 pm
Howdy,
This is "not the way". You should use Ctrl-A codes (or set console.attributes property) so that:
I guess I dont understand why there "is a way"?
Nor do I understand why
nodesync needs to modify the screen back to a state, I would have expected that be a task in console.* object if it was required at all?
The jsobjs.html implies that nodesync will only do something to the terminal (clear it), if an argument is given. Why does it need to send something to the terminal anyway, no argument is given?
Does it send the color change everytime its called, even if the resulting color change is already the current color being used by the terminal?
It might be helpful to update that description to include console state, since it is doing more than clear the terminal even without an argument.
This is "not the way". You should use Ctrl-A codes (or set console.attributes property) so that:
I guess I dont understand why there "is a way"?
Because Synchronet support multiple terminal types, not just ANSI.
Does it send the color change everytime its called, even if the resulting color change is already the current color being used by the terminal?
No.
so we have to cater to those bots that have no ansi graphics support, aside from real users who are/should using/use ansi.
Re: nodesync is changing the cursor color
By: MRO to Digital Man on Fri Apr 17 2026 08:06 pm
so we have to cater to those bots that have no ansi graphics support, aside from real users who are/should using/use ansi.
For your BBS, you can obviously do whatever you like. Immediately
disconnect clients that don't support ANSI if you wish.
nodesync() can display stuff to the screen (e.g. node messags/alerts/telegrams), so it wants to restore the "current" attribute after doing that.
nodesync *can* display the messages I mentioned above in addition to time left, pending events warnings, etc.
Does it send the color change everytime its called, even if the resulting color change is already the current color being used by the terminal?
No.
Does it send the color change everytime its called, even if the resulting color change is already the current color being used by the terminal?
No.
Correction: for Synchronet versions before v3.21, the answer was "No", but with Deuce's terminal abstraction changes introduced in v3.21, that answer is unfortuantely, "Yes". So you may see a difference for your specific test between v3.20 and v3.21(e). I plan to fix that for future Synchronet builds/releases (revert to the v3.20 behavior).
| Sysop: | BiggieB |
|---|---|
| Location: | Budd Lake, NJ |
| Users: | 11 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 493479:29:06 |
| Calls: | 189 |
| Calls today: | 1 |
| Files: | 99 |
| Messages: | 38,806 |