• About Logoff Adverts Idea in Mystic

    From bcw142@21:1/145 to All on Monday, October 16, 2017 10:20:54
    OK, you should all have seen the post from RiPuk (Dave Stephens) about
    Logoff Adverts Idea (search on that if not to find original post) in the FSX_GEN (FSXNet General message base).
    external links:
    https://github.com/blog/1557-github-flow-in-the-browser https://github.com/davestephens/bbs-ansi-adverts
    Origin: fORCE9 BBS - London, UK - bbs.force9.org (21:1/136)

    Anyway, went to implement it in Mystic Pi BBS and did get logoff.ans
    to work as G00r00 had intended, display at '2400' baud, with the random
    file thing as documented:
    + Mystic's random display file system now also will include letters a-z,
    allowing up to 36 randomly selected display files per filename, up from
    11. It works the same as before. If myansi.an1 exists, then Mystic
    will randomly select any file that exists in the myansi.an0-myansi.an9
    range and myansi.ana-myansi.anz range. For OSes with case sensitive
    filenames, the extensions are always lowercased. They do not have to be
    in any order, just .an1 has to exist to "trigger" the random system:

    myansi.ans
    myansi.an1
    myansi.anz
    myansi.an5

    So, renaming the files logoff.anX should do it, but had to rewrite the
    goodbye menu as G00r00 had intened with the '2400' baud view: +------------------- Menu Settings (goodbye) ------------------------+
    | |
    | Description | Logoff menu |
    | Access | s10 |
    | Fallback | |
    | Menu Type | Standard |
    | Input Type | User Defined |
    | Input Chars | Uppercase |
    | Use Global | Yes |
    | Node Status | |
    | Display File | |
    | Display Cols | 1 |
    | Menu Header | ||CL||CRDo you want to log off?||CR |
    | Menu Prompt | ||CRCommand -> |
    | X | 0 |
    | Y | 0 | +--------------------------------------------------------------------+
    <The next one stays the same>
    |------------------- Command list (goodbye) -------------------+
    | HotKey Text ID Exe |
    | ------------------------------------------------------------ |
    | Y (Y)es - Disconnect Me 1 1 |
    | N (N)o - Return to Main Menu 2 1 |
    | C (C)omment - Send Comment to SysOp 3 1 |
    | |
    | |
    | |
    | |
    | |
    | |
    | |
    | ------------------------------------------------------------ |
    | Press / for command list | +--------------------------------------------------------------+
    <The Y command changes to:>
    |--------------------------- Command #1 (goodbye) ---------------------------+ | Display Text | (Y)es - Disconnect Me | | LightBar Low | | | LightBar High | | | Hot Key | Y | | Access | Up | 0 Escape | 0 | | Display Type | Access Down | 0 Tab | 0 | | X Y | 0 0 Left | 0 PageUp | 0 | | Timer | 0 Right | 0 PageDn | 0 | | Timer Type | Interval Redraw | Yes Home | 0 End | 0 | | Command ------------------ Access ----- Data ----------------------------- | | (GD) Display a file @2400@true@logoff | | (GI) Hangup immediately | | | | | | | +----------------------- (TAB) to edit menu commands ------------------------+

    Now it shows the logoff.anX scrolling at '2400'baud I put the Adverts in
    text as:
    text/logoff.ans text/logoff.an2 text/logoff.an4
    text/logoff.an1 text/logoff.an3
    You download the ANSIs from Github and rename them, change the menus and it will work in Mystic.

    at the [ ] More: (Y)es, (N)o, (C)ontinueous? prompt type c for best result.

    Note that (GI) Hangup immediately replaces (GH) Hangup. There was a bug with (GH) Hangup that caused two Advents to try to display and also the 2400
    baud scrolling didn't work as well. This is a work-around.
    So, Mystic Pi BBS has the logoff Advents implemented and you can to. ;)

    ...This is setup for Mystic and my look odd on other systems ;)

    --- Mystic BBS v1.12 A35 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org (21:1/145)
  • From xqtr@21:1/111 to bcw142 on Monday, October 16, 2017 18:23:27
    Anyway, went to implement it in Mystic Pi BBS and did get logoff.ans
    to work as G00r00 had intended, display at '2400' baud, with the random file thing as documented:
    + Mystic's random display file system now also will include letters a-z,
    allowing up to 36 randomly selected display files per filename, up

    With this solution, after a while you will run out of letters :) Also its
    some work to do the renaming, specially when you will refresh the GitHub directory, it will download the files with the old names... maybe a conflict
    in there... perhaps.

    A better approach is to make a BASH/Batch file that will get all files listed in the directory, choose one randomly and then copy it to the Text directory
    of the Theme, with the name logoff.ans. This way you don't have to do the renaming even the folder (someday) gets hundreds of adverts.

    In my BBS i have a logoff folder where i put ANSIs that i like and make the thing described. I will also put the adverts there so it can choose also
    them. If someone wants the BASH script i can share, its nothing complicated.

    .----- --- -- -
    | Another Droid BBS
    : Telnet : andr01d.zapto.org:9999 [UTC 11:00 - 20:00]
    . Contact : xqtr.xqtr@gmail.com

    --- Mystic BBS v1.12 A34 (Raspberry Pi/32)
    * Origin: Another Droid BBS (21:1/111)
  • From bcw142@21:1/145 to xqtr on Monday, October 16, 2017 17:51:16
    On 10/16/17, xqtr said the following...
    With this solution, after a while you will run out of letters :) Also its some work to do the renaming, specially when you will refresh the GitHub directory, it will download the files with the old names... maybe a conflict in there... perhaps.

    A better approach is to make a BASH/Batch file that will get all files listed in the directory, choose one randomly and then copy it to the
    Text directory of the Theme, with the name logoff.ans. This way you
    don't have to do the renaming even the folder (someday) gets hundreds of adverts.

    I hadn't thought about over 36 yet. Ny first thought would be make a
    directory for the ANSIs like you say and just looping the next 36 in to text daily until all have been through and back around. That would only be 36 possible a day, but would work through all of them. I haven't tried to do random selection of files with bash as yet (or MPL).

    --- Mystic BBS v1.12 A35 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org (21:1/145)
  • From NuSkooler@21:1/121 to xqtr on Monday, October 16, 2017 20:15:07

    On Monday, October 16th xqtr muttered...
    A better approach is to make a BASH/Batch file that will get all files listed in the directory, choose one randomly and then copy it to the Text directory of the Theme, with the name logoff.ans. This way you don't have to do the renaming even the folder (someday) gets hundreds of adverts.

    I threw together a VERY simple shell script that AFAIK got pulled in to take all the advert ANSI's and put them in a directory fiel files named BBSAD###.ans. I realize e.g. Mystic wants a different format, but the general idea is there: A script could have a couple params, e.g. pattern for filename such as "AD###.ANS" or "BBSAD.###"... so on, and the script could do the rest.

    Differnet systems do it differently, but it's not rocket science :D





    --- ENiGMA 1/2 v0.0.8-alpha (linux; x64; 6.11.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From xqtr@21:1/111 to NuSkooler on Tuesday, October 17, 2017 00:27:00
    I threw together a VERY simple shell script that AFAIK got pulled in to take all the advert ANSI's and put them in a directory fiel files named BBSAD###.ans. I realize e.g. Mystic wants a different format, but the general idea is there: A script could have a couple params, e.g. pattern for filename such as "AD###.ANS" or "BBSAD.###"... so on, and the script could do the rest.

    With a BASH script you don't have to rename any files. The good with this is that you can know which file, belongs to which BBS... by renaming them you loose that convenience... just in case ;)

    This is my BASH script in a simplistic implementation:

    #!/bin/bash
    DIR="/home/user/mystic/adverts/"
    PIC=$(find $DIR -type f -iname "*.ans" | shuf -n1)
    cp "$PIC"/home/user/mystic/text/logoff.ans

    .----- --- -- -
    | Another Droid BBS
    : Telnet : andr01d.zapto.org:9999 [UTC 11:00 - 20:00]
    . Contact : xqtr.xqtr@gmail.com

    --- Mystic BBS v1.12 A34 (Raspberry Pi/32)
    * Origin: Another Droid BBS (21:1/111)
  • From NuSkooler@21:1/121 to xqtr on Tuesday, October 17, 2017 21:38:15

    On Tuesday, October 17th xqtr was heard saying...
    With a BASH script you don't have to rename any files. The good with this is that you can know which file, belongs to which BBS... by renaming them you loose that convenience... just in case ;)

    When I say rename, I really mean't copy (e.g. to where your board expects them)

    Sure, you can do a bash script to shuffle -> single file, but then you need to run this on a cron/schedule/event/whatever. It sounds like for some systems this may be required though.

    Here is my suggestion: Come up with the 'best' way to handle it per BBS type/family and let's get some dirs into the repo, e.g.:

    enigma/prep.sh
    mystic/prep.sh
    ...



    --- ENiGMA 1/2 v0.0.8-alpha (linux; x64; 6.11.3)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From xqtr@21:1/111 to NuSkooler on Wednesday, October 18, 2017 17:42:21
    Sure, you can do a bash script to shuffle -> single file, but then you need to run this on a cron/schedule/event/whatever. It sounds like for some systems this may be required though.

    The script i posted, in my system, i run it when a user logs in. So by the
    time he logs off, the random file has been copied as logoff.ans. So there is
    no need for Cron jobs, just a command inside a BBS menu.

    .----- --- -- -
    | Another Droid BBS
    : Telnet : andr01d.zapto.org:9999 [UTC 11:00 - 20:00]
    . Contact : xqtr.xqtr@gmail.com

    --- Mystic BBS v1.12 A34 (Raspberry Pi/32)
    * Origin: Another Droid BBS (21:1/111)
  • From Tiny@21:1/130.4 to xqtr on Wednesday, October 18, 2017 13:01:22
    there is no need for Cron jobs, just a command inside a BBS menu.

    On MagickaBBS I just have a daily cron job to git pull for any updates
    to the ansi files, and use the .lua script apam wrote. It just
    randomly displays a file on logoff.

    I had to learn a bit about github to understand the instructions, but
    now that I did I'm moving my own source code to it. Seems like a much
    easier way to keep track of things. So.... Thank you. ;)

    Shawn


    --- MagickaBBS v0.7alpha (Linux/armv7l)
    * Origin: Smells like raspberry pi in here. (21:1/130.4)