Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Many receive advice, few profit by it. -- Publilius Syrus


dovenet / Synchronet Javascript / DDMsgReader - MCI Color Code Conversion

SubjectAuthor
* DDMsgReader - MCI Color Code ConversionCodefenix
`* DDMsgReader - MCI Color Code ConversionNightfox
 `* DDMsgReader - MCI Color Code ConversionCodefenix
  +- DDMsgReader - MCI Color Code ConversionNightfox
  `- DDMsgReader - MCI Color Code ConversionMRO

1
DDMsgReader - MCI Color Code Conversion

<63BAFDEE.710.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=834&group=DOVE-Net.Synchronet_Javascript#834

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Nightfox
Subject: DDMsgReader - MCI Color Code Conversion
Message-ID: <63BAFDEE.710.dove-net2012@conchaos.synchro.net>
Date: Sun, 8 Jan 2023 05:31:26 -0500
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20230108093204-0800 41e0
WhenExported: 20230108101827-0800 41e0
ExportedFrom: VERT sync-js 3771
WhenImported: 20230108123126-0500 412c
WhenExported: 20230108123137-0500 412c
ExportedFrom: CONCHAOS dove-net2012 710
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Sun, 8 Jan 2023 10:31 UTC

Hi Nightfox,

I made a local modification to DDMsgReader yesterday to convert Y-style MCI color codes on Amiga systems to CTRL-A codes.

function convertYStyleMciCodesToCtrlA (str) {
if (/\x19c/.test(str)) {
return str.replace(/\x19c0/g, "\x01n\x01k" // Normal Black
).replace(/\x19c1/g, "\x01n\x01r" // Normal Red
).replace(/\x19c2/g, "\x01n\x01g" // Normal Green
).replace(/\x19c3/g, "\x01n\x01y" // Brown
).replace(/\x19c4/g, "\x01n\x01b" // Normal Blue
).replace(/\x19c5/g, "\x01n\x01m" // Normal Magenta
).replace(/\x19c6/g, "\x01n\x01c" // Normal Cyan
).replace(/\x19c7/g, "\x01n\x01w" // Normal White
).replace(/\x19c8/g, "\x01k\x01h" // High Intensity Black
).replace(/\x19c9/g, "\x01r\x01h" // High Intensity Red
).replace(/\x19c[Aa]/g, "\x01g\x01h" // High Intensity Green
).replace(/\x19c[Bb]/g, "\x01y\x01h" // Yellow
).replace(/\x19c[Cc]/g, "\x01b\x01h" // High Intensity Blue
).replace(/\x19c[Dd]/g, "\x01m\x01h" // High Intensity Magenta
).replace(/\x19c[Ee]/g, "\x01c\x01h" // High Intensity Cyan
).replace(/\x19c[Ff]/g, "\x01w\x01h" // High Intensity White
).replace(/\x19z0/g, "\x010" // Background Black
).replace(/\x19z1/g, "\x011" // Background Red
).replace(/\x19z2/g, "\x012" // Background Green
).replace(/\x19z3/g, "\x013" // Background Brown
).replace(/\x19z4/g, "\x014" // Background Blue
).replace(/\x19z5/g, "\x015" // Background Magenta
).replace(/\x19z6/g, "\x016" // Background Cyan
).replace(/\x19z7/g, "\x017"); // Background White
} else {
return str; // Just return the original string if no "Y" MCI codes found.
}
}

Right now I'm just calling it everywhere msgbase.get_msg_body gets called, but realized today it might make more sense if it were added to attr_conv.js where the rest of the conversion functions live. :)

There are also Q-style codes, which I didn't bother converting yet. I think they're older and less often seen.

There are a handful of Amiga boards on ArakNet and I think fsxNet and FidoNet too, so thought it might be worth converting the Y-style codes. Hope you find it useful.

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

DDMsgReader - MCI Color Code Conversion

<63BC5BCD.3706.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=836&group=DOVE-Net.Synchronet_Javascript#836

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Codefenix
Subject: DDMsgReader - MCI Color Code Conversion
Message-ID: <63BC5BCD.3706.dove_sync_js@digitaldistortionbbs.com>
Date: Mon, 9 Jan 2023 03:24:13 -0800
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <63BAFDEE.710.dove-net2012@conchaos.synchro.net>
References: <63BAFDEE.710.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/dbc10c0f6 Jan 4 2023 GCC 11.3.0
X-FTN-CHRS: CP437 2
WhenImported: 20230109103257-0800 41e0
WhenExported: 20230109161821-0800 41e0
ExportedFrom: VERT sync-js 3773
WhenImported: 20230109102413-0800 41e0
WhenExported: 20230109103256-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3706
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Mon, 9 Jan 2023 11:24 UTC

Re: DDMsgReader - MCI Color Code Conversion
By: Codefenix to Nightfox on Sun Jan 08 2023 12:31 pm

Co> I made a local modification to DDMsgReader yesterday to convert Y-style
Co> MCI color codes on Amiga systems to CTRL-A codes.

Co> function convertYStyleMciCodesToCtrlA (str) {

Co> There are a handful of Amiga boards on ArakNet and I think fsxNet and
Co> FidoNet too, so thought it might be worth converting the Y-style codes.
Co> Hope you find it useful.

I'm not familiar with Y-style MCI color codes. I didn't know there were message boards where people were using those, but it would be good to support converting them. The only issue is if someone wants to use one of the character combinations in their message and don't intend for it to be a color code, it could be converted and then it would change the color but the person's message would not appear as intended.

Co> Right now I'm just calling it everywhere msgbase.get_msg_body gets called,
Co> but realized today it might make more sense if it were added to
Co> attr_conv.js where the rest of the conversion functions live. :)

Yes, attr_conv.js would be the best place for that. :)
Most of the conversion functions in attr_conv.js are there to support Synchronet's settings for extra attribute codes (SCFG > Message Options > Extra Attribute Codes), where you can toggle whether those other attribute codes should be converted and used as color codes in messages. Currently, Y-style MCI color codes are not in there, but I suppose DDMsgReader could just go ahead and convert them by default (or maybe there could be a setting in DDMsgReader.cfg for whether or not to convert those).

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

DDMsgReader - MCI Color Code Conversion

<63D68543.732.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=855&group=DOVE-Net.Synchronet_Javascript#855

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Nightfox
Subject: DDMsgReader - MCI Color Code Conversion
Message-ID: <63D68543.732.dove-net2012@conchaos.synchro.net>
Date: Sun, 29 Jan 2023 02:40:03 -0500
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <63BC5BCD.3706.dove_sync_js@digitaldistortionbbs.com>
References: <63BC5BCD.3706.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.20a-Win32 master/adb05e50f Jan 28 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230129064121-0800 41e0
WhenExported: 20230129101822-0800 41e0
ExportedFrom: VERT sync-js 3793
WhenImported: 20230129094003-0500 412c
WhenExported: 20230129094113-0500 412c
ExportedFrom: CONCHAOS dove-net2012 732
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Sun, 29 Jan 2023 07:40 UTC

Re: DDMsgReader - MCI Color Code Conversion
By: Nightfox to Codefenix on Mon Jan 09 2023 10:24 am

Ni> codes should be converted and used as color codes in messages. Currently,
Ni> Y-style MCI color codes are not in there, but I suppose DDMsgReader could
Ni> just go ahead and convert them by default (or maybe there could be a
Ni> setting in DDMsgReader.cfg for whether or not to convert those).

Turns out the person whose system uses those color codes decided to go in another direction, and translate them himself before the message goes out over the network. Makes much more sense now that I think about it. :)

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

DDMsgReader - MCI Color Code Conversion

<63D80C8F.3727.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=856&group=DOVE-Net.Synchronet_Javascript#856

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Codefenix
Subject: DDMsgReader - MCI Color Code Conversion
Message-ID: <63D80C8F.3727.dove_sync_js@digitaldistortionbbs.com>
Date: Mon, 30 Jan 2023 03:29:35 -0800
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <63D68543.732.dove-net2012@conchaos.synchro.net>
References: <63D68543.732.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/54aec8bf7 Jan 30 2023 GCC 11.3.0
X-FTN-CHRS: CP437 2
WhenImported: 20230130105217-0800 41e0
WhenExported: 20230130161822-0800 41e0
ExportedFrom: VERT sync-js 3794
WhenImported: 20230130102935-0800 41e0
WhenExported: 20230130105216-0800 41e0
ExportedFrom: DIGDIST dove_sync_js 3727
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Mon, 30 Jan 2023 11:29 UTC

Re: DDMsgReader - MCI Color Code Conversion
By: Codefenix to Nightfox on Sun Jan 29 2023 09:40 am

Ni>> codes should be converted and used as color codes in messages.
Ni>> Currently, Y-style MCI color codes are not in there, but I suppose
Ni>> DDMsgReader could just go ahead and convert them by default (or
Ni>> maybe there could be a setting in DDMsgReader.cfg for whether or not
Ni>> to convert those).

Co> Turns out the person whose system uses those color codes decided to go in
Co> another direction, and translate them himself before the message goes out
Co> over the network. Makes much more sense now that I think about it. :)

:) I've already added that feature to DDMsgReacer recently, which I suppose isn't hurting anything.

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

DDMsgReader - MCI Color Code Conversion

<63D8672B.3306.sync_js@bbses.info>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=857&group=DOVE-Net.Synchronet_Javascript#857

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: Codefenix
Subject: DDMsgReader - MCI Color Code Conversion
Message-ID: <63D8672B.3306.sync_js@bbses.info>
Date: Mon, 30 Jan 2023 11:56:11 -0600
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <63D68543.732.dove-net2012@conchaos.synchro.net>
References: <63D68543.732.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.19b-Win32 master/a2a9dc027 Jan 2 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20230130171746-0800 41e0
WhenExported: 20230130221827-0800 41e0
ExportedFrom: VERT sync-js 3795
WhenImported: 20230130185611-0600 4168
WhenExported: 20230130191742-0600 4168
ExportedFrom: BBSESINF sync_js 3306
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Mon, 30 Jan 2023 17:56 UTC

Re: DDMsgReader - MCI Color Code Conversion
By: Codefenix to Nightfox on Sun Jan 29 2023 09:40 am

> Re: DDMsgReader - MCI Color Code Conversion
> By: Nightfox to Codefenix on Mon Jan 09 2023 10:24 am
>
> Ni> codes should be converted and used as color codes in messages.
> Ni> Currently, Y-style MCI color codes are not in there, but I suppose
> Ni> DDMsgReader could just go ahead and convert them by default (or maybe
> Ni> there could be a setting in DDMsgReader.cfg for whether or not to
> Ni> convert those).
>
> Turns out the person whose system uses those color codes decided to go in
> another direction, and translate them himself before the message goes out
> over the network. Makes much more sense now that I think about it. :)
>

that's funny. everyone was supposed to bend over and accept the color codes and code them into their bbs softwares until a few of his krad bros told him in private that it was annoying. that's how these scene guys are.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor