• js script?

    From Bill McGarrity@VERT/TEQUILAM to All on Mon Apr 2 20:55:37 2018
    Hello gang!

    Was wondering if there was a src or js script that will requst a raw ansi file over http and then do a console.printfile within an external program or to display a hotlink?

    Thanks..

    Bill




    ---
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Bill McGarrity on Mon Apr 2 22:11:28 2018
    Re: js script?
    By: Bill McGarrity to All on Mon Apr 02 2018 20:55:37

    Was wondering if there was a src or js script that will requst a raw ansi file over http and then do a console.printfile within an external program or to display a hotlink?

    It's doable. I host an ANSI archive on my BBS, which is viewable remotely via the ansiview external program. The files are fetched via HTTP.

    There's no simple script just to fetch and display a .ans file that I'm aware of, but it would be easy to do. I can make it for you, but I might need a few more details.

    One gotcha is that if the file is hosted on a Synchronet webserver, the server might convert it to an HTML rendering of the graphic before sending it to the client. (See ctrl/web_handler.ini, and whether asc_handler.js is set up to serve .ans files.) There are ways around that, starting with just giving the file something other than a .ans extension.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Tue Apr 3 06:18:00 2018
    echicken wrote to Bill McGarrity on 04-02-18 22:11 <=-

    Re: js script?
    By: Bill McGarrity to All on Mon Apr 02 2018 20:55:37

    Was wondering if there was a src or js script that will requst a raw ansi file over http and then do a console.printfile within an external program or to display a hotlink?

    It's doable. I host an ANSI archive on my BBS, which is viewable
    remotely via the ansiview external program. The files are fetched via HTTP.

    There's two ways I can do this. Fetch a raw ansi from the following:

    http://games.bbslink.net/score.php?door=lord&type=ansi

    or... do a hotlink to the following:

    http://games.bbslink.net/score.php?door=lord&type=image



    There's no simple script just to fetch and display a .ans file that I'm aware of, but it would be easy to do. I can make it for you, but I
    might need a few more details.

    Let me know... :)

    One gotcha is that if the file is hosted on a Synchronet webserver, the server might convert it to an HTML rendering of the graphic before
    sending it to the client. (See ctrl/web_handler.ini, and whether asc_handler.js is set up to serve .ans files.) There are ways around that, starting with just giving the file something other than a .ans extension.

    As you can see above, they're using php.

    I'll await your reply to see what else you'll need.

    Thanks!!


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Bill McGarrity on Tue Apr 3 08:26:36 2018
    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 06:18:00

    There's two ways I can do this. Fetch a raw ansi from the following:

    http://games.bbslink.net/score.php?door=lord&type=ansi
    or... do a hotlink to the following:

    http://games.bbslink.net/score.php?door=lord&type=image

    Displaying the ANSI should be easy enough. I could include a link to the file at the bottom, not sure if that's worthwhile.

    I'll await your reply to see what else you'll need.

    Should be enough to go on. This could be a script that you call from xtrn_sec.js after a user exits an external program, or it could be a menu-based thing where a user picks from a list of score files to view, or both. How do you want to invoke it?

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to Bill McGarrity on Tue Apr 3 11:49:54 2018
    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 06:18:00

    There's two ways I can do this. Fetch a raw ansi from the following:

    http://games.bbslink.net/score.php?door=lord&type=ansi

    Give this a shot:

    https://github.com/echicken/bbslink-things

    The 'scores.js' module has two modes:

    - clear the screen, display a particular score file, pause, then exit
    - launch as a full-screen lightbar score browser

    Execute it with an argument (eg. 'lord') to run it in the first mode, or without arguments to run it in the other mode. Valid arguments can be found in settings.ini. If new score files are added to the site at some point, they can be added to settings.ini.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Tue Apr 3 13:49:00 2018
    echicken wrote to Bill McGarrity on 04-03-18 11:49 <=-

    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 06:18:00

    There's two ways I can do this. Fetch a raw ansi from the following:

    http://games.bbslink.net/score.php?door=lord&type=ansi

    Give this a shot:

    https://github.com/echicken/bbslink-things

    The 'scores.js' module has two modes:

    - clear the screen, display a particular score file, pause, then exit
    - launch as a full-screen lightbar score browser

    Execute it with an argument (eg. 'lord') to run it in the first mode,
    or without arguments to run it in the other mode. Valid arguments can
    be found in settings.ini. If new score files are added to the site at some point, they can be added to settings.ini.

    You nailed it!!

    Thank you so much!!


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Tue Apr 3 15:06:34 2018
    Re: js script?
    By: echicken to Bill McGarrity on Tue Apr 03 2018 11:49:54

    Hiya echicken..

    Give this a shot:

    https://github.com/echicken/bbslink-things

    The 'scores.js' module has two modes:

    As I previously stated, it works perfectl but just a thought. The line in
    the code: console.putmsg(bbs.text(563)); really isn't needed. It gives a
    double Hit a Key at the end of the file.

    Thanks again...

    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: 6697
    Radio: radio.tequilamockingbirdonline.net:8010/live

    ---
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Bill McGarrity on Tue Apr 3 15:30:10 2018
    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 15:06:34

    As I previously stated, it works perfectl but just a thought. The line in the code: console.putmsg(bbs.text(563)); really isn't needed. It gives a double Hit a Key at the end of the file.

    Okay, I've removed that.

    Also I should point out that this thing caches the .ans files locally. The 'cache_ttl' setting in 'settings.ini' controls how long a cached file remains valid for, in seconds. The default value is 86400 (one day). You can turn caching off by setting that to 0.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Tue Apr 3 20:10:00 2018
    echicken wrote to Bill McGarrity on 04-03-18 15:30 <=-

    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 15:06:34

    As I previously stated, it works perfectl but just a thought. The line in the code: console.putmsg(bbs.text(563)); really isn't needed. It gives a double Hit a Key at the end of the file.

    Okay, I've removed that.

    Great!!

    Also I should point out that this thing caches the .ans files locally.
    The 'cache_ttl' setting in 'settings.ini' controls how long a cached
    file remains valid for, in seconds. The default value is 86400 (one
    day). You can turn caching off by setting that to 0.

    Good to know. I'll play with it. :)

    Thanks again...

    PS...

    Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one that does it. Possible 'print' command snuck in there? For now I just removed it as it's not that popular of a game.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Bill McGarrity on Tue Apr 3 21:55:06 2018
    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00

    Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one

    To ... your actual ... printer? That's interesting.

    that does it. Possible 'print' command snuck in there? For now I just removed it as it's not that popular of a game.

    I guess there could be something strange in that particular file that's causing this. The script just downloads the file (or reads the cached copy from disk) and writes it to the terminal. It does use the JS console.putmsg() method, which interprets various special codes (ctrl-A, at-symbol, pipe, etc.) - not sure if anything funky could be happening there.

    Are you using SyncTERM when this happens? Something else?

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to Bill McGarrity on Tue Apr 3 22:12:20 2018
    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00

    Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one

    The last (non-empty) line in that file is a bit odd and appears to contain an esc[i sequence (among others), which seems to mean 'print screen' if your terminal supports it. Something funny going on with that player's name
    perhaps - 'ASSasin' followed by some junk, with 'sin' mixed in; botched attempt at fixing a typo? I dunno. Maybe the BBSLink operator can correct it.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Wed Apr 4 00:20:00 2018
    echicken wrote to Bill McGarrity on 04-03-18 21:55 <=-

    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00

    Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one

    To ... your actual ... printer? That's interesting.

    Yes... I had a 'wtf' moment.. lol!


    that does it. Possible 'print' command snuck in there? For now I just removed it as it's not that popular of a game.

    I guess there could be something strange in that particular file that's causing this. The script just downloads the file (or reads the cached copy from disk) and writes it to the terminal. It does use the JS console.putmsg() method, which interprets various special codes
    (ctrl-A, at-symbol, pipe, etc.) - not sure if anything funky could be happening there.

    Quite possible but as I said, I removed it being the game isn't that popular and I'm not sure I want to purchase a ream of paper every week. :)

    Are you using SyncTERM when this happens? Something else?

    PC+

    No biggie... I just found it curiously strange...

    Thanks again...


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Wed Apr 4 00:22:00 2018
    echicken wrote to Bill McGarrity on 04-03-18 22:12 <=-

    Re: js script?
    By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00

    Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one

    The last (non-empty) line in that file is a bit odd and appears to
    contain an esc[i sequence (among others), which seems to mean 'print screen' if your terminal supports it. Something funny going on with
    that player's name perhaps - 'ASSasin' followed by some junk, with
    'sin' mixed in; botched attempt at fixing a typo? I dunno. Maybe the BBSLink operator can correct it.

    I'll drop him a line but I doubt it. He just uses the ansi files created by the game itself but I'll let him know.

    Thanks..


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From echicken@VERT/ECBBS to Bill McGarrity on Wed Apr 4 10:52:37 2018
    Re: js script?
    By: Bill McGarrity to echicken on Wed Apr 04 2018 00:20:00

    Are you using SyncTERM when this happens? Something else?

    PC+

    I'm going to guess it interprets "print screen" very literally, then. Interesting quirk with this particular file, but it probably won't affect many people.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Bill McGarrity@VERT/TEQUILAM to echicken on Wed Apr 4 13:13:00 2018
    echicken wrote to Bill McGarrity on 04-04-18 10:52 <=-

    Re: js script?
    By: Bill McGarrity to echicken on Wed Apr 04 2018 00:20:00

    Are you using SyncTERM when this happens? Something else?

    PC+

    I'm going to guess it interprets "print screen" very literally, then. Interesting quirk with this particular file, but it probably won't
    affect many people.

    Most likely that's why it's gone. I hope not. Your work is impeccable.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    ■ Synchronet ■ TequilaMockingbird Online - Toms River, NJ
  • From Android8675@VERT/SHODAN to echicken on Tue Apr 10 11:13:34 2018
    Re: js script?
    By: echicken to Bill McGarrity on Tue Apr 03 2018 11:49 am

    Give this a shot:
    https://github.com/echicken/bbslink-things

    *Yoink!*


    ... History tends to exaggerate.

    ---
    ■ Synchronet ■ Shodan's Core @ ShodansCore.com