{"id":268,"date":"2026-01-02T03:38:33","date_gmt":"2026-01-01T19:38:33","guid":{"rendered":"https:\/\/aliens.ph\/blog\/?p=268"},"modified":"2026-01-02T03:38:33","modified_gmt":"2026-01-01T19:38:33","slug":"making-listplus-switchable-in-wwiv","status":"publish","type":"post","link":"https:\/\/aliens.ph\/blog\/2026\/01\/02\/making-listplus-switchable-in-wwiv\/","title":{"rendered":"Making ListPlus switchable in WWIV"},"content":{"rendered":"\n<p>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 <strong>bbs\/xfer.cpp<\/strong>, in the void listfiles() function.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void listfiles() {\n   if (a()->current_user_dir().subnum &lt; 0 || a()->udir.empty()) {\n     \/\/ We don't have any current directory, can not list files.\n     bout.pl(\"|#6No directories available.\");\n     return;\n   }\n \n   if (okansi()) {\n     listfiles_plus(LP_LIST_DIR);\n     return;\n   }\n<\/code><\/pre>\n\n\n\n<p>I simply commented out the lines that called <strong>listfiles_plus()<\/strong> to prevent listplus from kicking in. That wasn&#8217;t comprehensive though. Since file uploading\/downloading wasn&#8217;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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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 <strong>lp_options<\/strong>, we could use a bit there.<\/p>\n\n\n\n<p>I ended up adding a bit which I called <strong>cfl_enable<\/strong>, in <strong>sdk\/user.h<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\n\/\/ ListPlus options from lp_options.\n\/\/\nstatic constexpr uint32_t cfl_fname = 0x00000001;\nstatic constexpr uint32_t cfl_extension = 0x00000002;\nstatic constexpr uint32_t cfl_dloads = 0x00000004;\nstatic constexpr uint32_t cfl_kbytes = 0x00000008;\nstatic constexpr uint32_t cfl_date_uploaded = 0x00000010;\nstatic constexpr uint32_t cfl_file_points = 0x00000020;\nstatic constexpr uint32_t cfl_days_old = 0x00000040;\nstatic constexpr uint32_t cfl_upby = 0x00000080;\nstatic constexpr uint32_t unused_cfl_times_a_day_dloaded = 0x00000100;\nstatic constexpr uint32_t unused_cfl_days_between_dloads = 0x00000200;\nstatic constexpr uint32_t cfl_description = 0x00000400;\nstatic constexpr uint32_t cfl_header = 0x80000000;\n\n\/\/ I added this line for cfl_enable\nstatic constexpr uint32_t cfl_enable = 0x10000000;\n<\/code><\/pre>\n\n\n\n<p>At first, I was going to make this switchable in the K) ListPlus Configuration menu. That didn&#8217;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.<\/p>\n\n\n\n<p>(to be continued)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. I simply commented out the lines that called listfiles_plus() to prevent listplus from kicking in. That&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[7],"tags":[2],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry","category-wwiv","tag-wwiv"],"_links":{"self":[{"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":1,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":269,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/posts\/268\/revisions\/269"}],"wp:attachment":[{"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aliens.ph\/blog\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}