After a long drought, I am back to writing stuff for WWIV.
I did a little bit of Python coding here and there, with some updates to my old scripts written in Python 2 so that they will now work nicely in Python 3.
I finished my wwiv5ibbslastcall package, which consists of two Python scripts. The first one, which originally was named wwivibbslastcaller, is now xwibbslastcaller.py. The second, originally just ibbs-extract, is now ibbs-extract3. Both of these are now written in Python 3.
xwibbslastcaller.py is responsible for getting the user’s info from the BBS drop files, then posting to the appropriate SUB or ECHO with the caller’s info in rot47. This script is usually part of the LOGON command and can be added to WWIV.INI in the LOGON_CMD setting like this:
LOGON_CMD = xwibbslastcaller.py %R
The other script, ibbs-extract3, reads in configuration settings from WWIV.INI, then proceeds to read message posts from the SUB or ECHO where IBBSLASTCALLER data is posted. It reads in data from the posts and writes out a laston.txt file for each network that it reads data from.
I’ve started writing some Python functions that read in WWIVnet packets. So far, so good. I can read in basic WWIV Network packets, identify their headers and their payload. The python functions can handle multiple message packets, but currently don’t do anything besides displaying the network record header and the raw message payload. I haven’t written anything to handle short or mangled packets yet. I’m basically just writing code blocks to be able to process the network packets, perhaps manipulate them, write or rewrite network packets. The next step would be to actually process the payloads as well. For now, I probably need more sample packets, but where do I get any. Hmmm…
Instead of proceeding forward as fast as I can, I’ve decided to take a step back and relearn some basics. In particular, I’ve started reading through “Linux Systems Programming” by Robert Love to give me better grounding in writing C code for Linux.
I’ve finished the first chapters on files, open(), read(), write(), fsync(), fdatasync(), lseek() and proceeding slowly. I don’t intend to rush through this to allow myself enough time to absorb all the new information, and to make sure that I understand all the nice little details.
Parallel to this, I’m also reading “Test Driven Development Using Python.”
I updated WWIV networking software from NET37 to NET38b3. Rushfan is maintaining the official networking stack. I have some ideas for doing a complete rewrite for Linux, but am not sure if I can manage to write a portable rewrite.
The network stack of WWIV consists of several components. I’m planning to rewrite one component at a time, so that we can actually run the entire WWIV BBS + WWIV Network + WWIVToss (FTN<->WWIV) on Linux without resorting to dosemu.
The NET37/NET38 WWIV networking stuff runs mostly under DOS, so requires Linux WWIV sysops to use dosemu and some creative scripting to get it to work.
There is already a stub NETWORK.EXE replacement in the WWIV BBS project tree, which in turn calls NETWORK0.EXE, NETWORKB (Rushfan’s Binkp WWIV transport replacement) or NETWORKP.
NETWORKP (or the WWIV PPP Project component) has some parts of it that have already been replaced with a bunch of scripts which require Python to handle the transport of network files from the WWIV BBS to the hub via SMTP, and fetchmail to retrieve from the hub to the WWIV BBS via POP3. I’m currently working on replacing NETWORKP completely with a Python script to do the conversion of files from their Sx.NET format to their UUencoded format along with their mail headers. Once this is done, NETWORKP.exe can be replaced on Linux.
NETWORKB is an option, of course. But I’m all for flexibility and having alternatives. Besides, it’s something I like working on while learning in the process.