Making ListPlus switchable in WWIV

While hunting down the cause of a bug in uploading files in WWIV, I ran across the ListPlus thing in the file section. On my BBS, I disabled it in code, specifically in bbs/xfer.cpp, in the void listfiles() function.

void listfiles() {
   if (a()->current_user_dir().subnum < 0 || a()->udir.empty()) {
     // We don't have any current directory, can not list files.
     bout.pl("|#6No directories available.");
     return;
   }
 
   if (okansi()) {
     listfiles_plus(LP_LIST_DIR);
     return;
   }

I simply commented out the lines that called listfiles_plus() to prevent listplus from kicking in. That wasn’t comprehensive though. Since file uploading/downloading wasn’t really working properly either, it was enough to just close the XFER section in WWIV.INI by setting CLOSE_XFER = Y. The code that called listfiles_plus() was still there.

I will be working on the WWIV file section code this year (2026) and I had started a little bit on this in late December of 2025. My initial activities had been around testing file uploading and downloading. In the process, I saw the ListPlus hack I made and thought that it needed a bit more work to actually make all calls to ListPlus switchable on or off by the user.

To make ListPlus toggleable, we need a variable on our user record to store the value in. We need just one bit. Since ListPlus itself stores some configurable stuff as bits in the user record in lp_options, we could use a bit there.

I ended up adding a bit which I called cfl_enable, in sdk/user.h.

//
// ListPlus options from lp_options.
//
static constexpr uint32_t cfl_fname = 0x00000001;
static constexpr uint32_t cfl_extension = 0x00000002;
static constexpr uint32_t cfl_dloads = 0x00000004;
static constexpr uint32_t cfl_kbytes = 0x00000008;
static constexpr uint32_t cfl_date_uploaded = 0x00000010;
static constexpr uint32_t cfl_file_points = 0x00000020;
static constexpr uint32_t cfl_days_old = 0x00000040;
static constexpr uint32_t cfl_upby = 0x00000080;
static constexpr uint32_t unused_cfl_times_a_day_dloaded = 0x00000100;
static constexpr uint32_t unused_cfl_days_between_dloads = 0x00000200;
static constexpr uint32_t cfl_description = 0x00000400;
static constexpr uint32_t cfl_header = 0x80000000;

// I added this line for cfl_enable
static constexpr uint32_t cfl_enable = 0x10000000;

At first, I was going to make this switchable in the K) ListPlus Configuration menu. That didn’t make sense though. So I decided to add the switch in the main D)efaults menu, and also in the T)ransfer section defaults menu.

(to be continued)

Leave a Reply

Only people in my network can comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.