-
DDMsgReader - MCI Color Code Conversion
From
Codefenix@VERT/CONCHAOS to
Nightfox on Sun Jan 8 12:31:26 2023
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 ]=-ã
-
From
Nightfox@VERT/DIGDIST to
Codefenix on Mon Jan 9 10:24:13 2023
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ã
-
From
Codefenix@VERT/CONCHAOS to
Nightfox on Sun Jan 29 09:40:03 2023
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 ]=-ã
-
From
Nightfox@VERT/DIGDIST to
Codefenix on Mon Jan 30 10:29:35 2023
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ã
-
From
MRO@VERT/BBSESINF to
Codefenix on Mon Jan 30 18:56:11 2023
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 :::ã