Hi everyone
I wanted to script some of my BBS logins and routine visits(log in, page past the bulletins, check mail, log off), so i added a small Lua scripting layer to SyncTERM 1.9. Its working well for me and i thought others might find it usefull.
What it does:
send/expect scripting in Lua 5.4:expect("Login:, sendln(bbs/user),
with timeouts and if/then on whichever prompt showed up
background triggers, e.g. answer every "--More--" automaticly
plain text, Lua pattern, or PCRE regex matching
a recorder: Alt-R, use the BBS, Alt-R again and you get a script you can replay (passwords are not saved to the file)
run a script with -x on the command line, from a new "Script" field on a directory entry, or with Alt-S while connected
The script runs inside the terminal's main loop, so the screen and keyboard stay live while its waiting and you can take over any time. Without a script, nothing changes.
Source patches and a Linux build are here:
https://github.com/Heisenberg61/syncterm-lua
The first commit is the stock 1.9 source tarball, so the diff against it shows the whole change. Its mostly one new file (script.c) plus small hooks in term.c, bbslist.c, menu.c and the makefiles, and it builds without Lua via WITHOUT_LUA=1.
I tested it with a script that can play through a full game of Lord 4.6 hands off.. but its a little buggy so far
Its only been tested on Linux, but it _SHOULD_ compile and run on windows.
To be clear, this is an unofficial fork. Please send any problems with it to
me not to Deuce
Thanks
---
þ Synchronet þ Kalgoorlie Retro BBS, Kalgoolrie, WA