If I uncomment the line using \1\g codes, it does stay green.
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.
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: | Morningstarr |
|---|---|
| Location: | Mt. Pleasant Nc |
| Users: | 35 |
| Nodes: | 250 (0 / 250) |
| Uptime: | 37:59:40 |
| Calls: | 161 |
| Calls today: | 161 |
| Files: | 613 |
| U/L today: |
614 files (5,824M bytes) |
| D/L today: |
13,064 files (168G bytes) |
| Messages: | 10,506 |
| Posted today: | 621 |