From 435e79167fd306a2f55c731a1d9bca739cc47aba Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sun, 6 Sep 2020 16:57:05 -0700
Subject: [PATCH] Add -force and -share options, handle missing protocol
 property.

---
 exec/sbbslist.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/exec/sbbslist.js b/exec/sbbslist.js
index 10f2d286ca..8108135694 100644
--- a/exec/sbbslist.js
+++ b/exec/sbbslist.js
@@ -736,8 +736,8 @@ function verify_bbs(bbs)
     for(i in bbs.service) {
         if(js.terminated)
             break;
-        var protocol = bbs.service[i].protocol.toLowerCase();
-        if(protocol != "telnet" && protocol != "rlogin")
+        var protocol = bbs.service[i].protocol;
+        if(!protocol || (protocol.toLowerCase() != "telnet" && protocol.toLowerCase() != "rlogin"))
             continue;
         bbs.entry.autoverify.attempts++;
         var result = verify_terminal_service(bbs.service[i]);
@@ -2327,6 +2327,9 @@ function main()
 			case "-exclude":
 				exclude.push(val);
 				break;
+			case "-force":
+				export_freq = 0;
+				break;
 			case "-format":
 				if(val === undefined || val === '?' || !val.length) {
 					print("Supported list formats:");
@@ -2578,6 +2581,9 @@ function main()
 						break;
 				}
 				break;
+			case "share":
+				print(lfexpand(JSON.stringify(lib.share_list(list, optval[cmd] == "qwk"), null, 1)));
+				break;
 			case "add":
 				if(lib.system_exists(list, system.name)) {
 					alert("System '" + system.name + "' already exists");
-- 
GitLab