wwivbbs / wwiv

WWIV BBS Software v5
http://www.wwivbbs.org
Other
181 stars 71 forks source link

oneliners.bas not saving one liners on linux #1621

Open the-godfather-007 opened 7 months ago

the-godfather-007 commented 7 months ago

Using Linux Mint / Ubuntu. The provided oneliners.bas does not save one liners when added to the logon event within WWIV.INI. It is set up as @oneliners.bas within WWIV.ini and have scripts turned on in wwivconfig, while also have tried package file on, and package OS on (or set to YES). **Update also tested on Raspberry Pi Bookshelf / Buster / Debian and does not work their either. Could be outdated .bas, however I see it working on other 5.9 windows versions so thought I'd put it here.

Would like the ability to use basic text files for read/write using basic scripting if not already available for things such as creating one liner mods with obvious restrictions from displaying real name and passwords. If this exists, it would be helpful to see an example of a how to read/write to a text or even data file within Linux using WWIV basic scripting for reference and for other mod ideas.

Tied to this, someone requested the ability to save to a text file for purpose of having the script post to an FTN sub such as FSX_BOT or FSX_DAT, and I'd like to add the ability to post to a WWIVnet native base also, such as an experimental sub one can subscribe to. This would allow for interBBS one liners and or last callers for those of us whom may or may not have FTN's on our WWIV BBSes. Being able to code write lines to a text file, with user data such as alias, last call, gold earned, etc. can then be pushed to another BBS or used with a webhook to discord.

Being "new again" to WWIV, I'd like to see an example as to how one can create logon/logoff events to include multiple scripts, command line instructions for .sh or .bat files, multiple .bas scripts, extra ansi files being displayed, extra text written (clear screens and pauses,) all occurring within one logon process file. I would assume it's a .bas file however new to them.

wwiv commented 3 months ago

Thanks for the report - The oneliners.bas script uses "wwiv.data.save" to save the data, it'll be in a JSON file under the data/ directory. Allowing the script to write and then push to a message base is an intersting idea, I think there's an issue here already for the message api to be opened up (I started on it once, but kept hitting some issues making it harder than I expected).

As for why oneliners isn't saving, I'll have to check it out could be a permissions issue, look in data/ and subdirs for for new JSON files. Mine is a file called this: ONELINERS.script.json

With the following content:

{
    "data": [
        {
            "type": 0,
            "s": "|15Liner? Innat what you put on your cupboard shelves?"
        },
        {
            "type": 0,
            "s": "|11Hey your one liner is working?!  Mine on linux won't save :("
        }
    ]
}
granitepenguin commented 3 months ago

I see the same thing on debian running 5.9.0.3697

the file on mine is oneliners.script.json. maybe an uppercase issue has crept in when saving. It's reading it fine.

the-godfather-007 commented 2 months ago

These are the only .json files within my /wwiv/data directory

-rwxrwxrwx 1 ghost ghost 2605 Jun 1 21:01 autoval.json -rwxrwxrwx 1 ghost ghost 709 Jan 6 10:51 bbslist.json -rwxrwxrwx 1 ghost ghost 1290 Jun 2 17:11 chains.json -rwxrwxrwx 1 ghost ghost 631 Jan 20 05:59 conference.json -rwxrwxrwx 1 ghost ghost 2156 Jan 20 05:57 dirs.json -rwxrwxrwx 1 ghost ghost 613 Feb 24 08:21 gfiles.json -rwxrwxrwx 1 ghost ghost 28613 Jul 2 2023 menu_commands.json -rwxrwxrwx 1 ghost ghost 360 Feb 25 07:28 networks.json -rwxrwxrwx 1 ghost ghost 72757 Jun 1 21:01 sl.json -rwxrwxrwx 1 ghost ghost 10956 Feb 25 07:35 subs.json -rw-r--r-- 1 ghost ghost 23 Feb 3 23:37 wwivd.autoblock.json -rwxrwxrwx 1 ghost ghost 1582 Jun 1 21:01 wwivd.json

the-godfather-007 commented 2 months ago

Error code I can see via local only, maybe this will help? Error: Line 95, Col 6 Code 27, Abort Code 6 Name/Handle....... SysOp #1
Message: Incomplete structuInternet Address.. None. Last0IP-Address...XXXX.XXX.XXX.XXX Failure exiting script: 'oneliners' error code

      However it does this over telnet and ssh as well, I just don't see this error so maybe unrelated as this is my "test machine" i'm using at the moment.
wwiv commented 2 months ago

which version of wwiv?

wwiv commented 2 months ago

I wonder if you are running into https://github.com/paladin-t/my_basic/issues/59