nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Possible bug related to color setting

Von: Nightfox (nightfox@digdist.remove-vhl-this) [Profil]
Datum: 27.03.2010 07:21
Message-ID: <4BADA3DF.16240.sync@digdist.bbsindex.com>
Newsgroup: alt.bbs.synchronet
To: Digital Man
DM -

I've noticed something small which I'm not sure is a bug or not.  In my command
shell on my BBS, on my main menu I run a Baja one-liner module that selects a
random string from a file and displays it, just under my main menu, but before
the main menu prompt.  To display my main menu prompt, I use console.putmsg()
so that I can include message @-codes.  I specify colors in there too; however,
the color of the cursor is whatever the color was from the random one-liner
file.  This is from my command shell, which is written in JavaScript (I've
changed the control characters to \1 so they will display here; underscores
represent other characters that didn't paste properly):
bbs.exec("*srumor");
console.putmsg("\1n\1w_ \1c\1h@MINLEFT@\1n\1c mins \1w_ \1b\1hMain\1w:\1n ");

srumor is Synchronet Rumors, the one-liner module that displays a random string
read from a file.  After the prompt is written by console.putmsg(), the color
of the cursor is whatever color that was last used by the srumor module.  I was
able to "fix" this by using console.print() to set the color after running the
srumor module, as in:
bbs.exec("*srumor");
console.print("\1n");
console.putmsg("\1n\1w_ \1c\1h@MINLEFT@\1n\1c mins \1w_ \1b\1hMain\1w:\1n ");

Now, the color of the cursor at my main menu prompt is the "normal" color.

I'm not sure if this is a bug or if it's the expected behavior.  I suppose
console.putmsg() does not change the color of the cursor?

Nightfox

---
þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.com
--- Synchronet 3.15a-Win32 NewsLink 1.92
*  Vertrauen - Riverside County, California - telnet://vert.synchro.net

[ Auf dieses Posting antworten ]