• Replacing a text string to execute JS code directly

    From Nightfox@VERT/DIGDIST to Digital Man on Sat Feb 8 10:02:35 2025
    Re: Replacing a text string to execute JS code directly
    By: Digital Man to Nightfox on Fri Feb 07 2025 09:26 pm

    If the getter is returning an empty string, I'm not sure what's causing
    the display to become messy. This does not happen if I replace
    AreYouThere with a simple empty string as follows:

    bbs.replace_text(AreYouThere, "");

    Probably because of this logic in the getkey():

    if ((sys_status & SS_USERON) && *text[AreYouThere] != '\0') {
    attr(LIGHTGRAY);
    carriage_return();
    cleartoeol();
    restoreline();
    }

    So you'll probably want to bbs.replaceText(AreYouThere, "") in the getter, so you don't have this carriage-return, CLR-TO-EOL and restore line stuff going on.

    That works. Thanks!

    Nightfox

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