diff --git a/exec/init-fidonet.ini b/exec/init-fidonet.ini index e3c33868ba902c1398a9fb6d6bd9ca7c47cde2fc..eee467b4e128ee7fdb2428564814f63d288c9ed7 100644 --- a/exec/init-fidonet.ini +++ b/exec/init-fidonet.ini @@ -10,6 +10,7 @@ ; name = Name of the network, usually the same as the 5D domain, <= 8 chars ; desc = Short description of the network ; info = URL to information about the network +; pack = URL to info pack file ; coord = Name of the zone/network coordinator ; email = Internet email address of the zone/network coordinator ; fido = FidoNet address of the zone/network coordinator (for NetMail) @@ -46,11 +47,24 @@ desc = Australasia [zone:4] name = FidoNet desc = Latin America (except Puerto Rico) - + +[zone:11] +name = WWIVnet +desc = WWIVnet +info = https://www.wwivbbs.org/docs/network/wwivnet.html +coord = Mark Hofmann +email = mark@weather-station.org +addr = 11:1/100 +host = bbs.weather-station.org +port = 24555 +echolist = https://raw.githubusercontent.com/wwivbbs/wwivnet/master/wwivnet/wwivnet.na +areatag_prefix = WWIV_ + [zone:21] name = fsxNet desc = Fun, Simple and eXperimental network info = http://fsxnet.nz/ +pack = https://github.com/fsxnet/infopack/archive/master.zip coord = Paul Hayton email = avon@bbs.nz addr = 21:1/100 @@ -76,32 +90,34 @@ areatitle_prefix = AmigaNet: [zone:40] name = CyberNet desc = Stock, Trading, Cybersecurity, OS, Technology, Hacking, Crypto -info = http://www.thebytexchange.com/cybernet/ +info = telnet://bbs.thebytexchange.com:23 coord = Chad Adams email = nugax@thebytexchange.com addr = 40:1/1@cybernet fido = 1:19/37 host = hub.cybernetbbs.net -echolist = http://thebytexchange.com/cybernet/cybernet.na +echolist = areatag_prefix = CN_ [zone:44] name = DoRENET desc = BBS modifications, coding, ansi/asci etc info = https://www.dreamlandbbs.org/dorenet/ +pack = https://www.dreamlandbbs.org/wp-content/uploads/2020/04/dorenet.zip coord = Dream Master addr = 44:100/0 fido = 1:218/530 host = bbs.dreamlandbbs.org handles = true echolist = DORENET.NA -areatag_prefix = DN_ +areatag_prefix = DN_ areatag_exclude = netmail [zone:46] name = Agoranet desc = The Official Network of ACiD Productions -info = ftp://pharcyde.org/agoranet/AGN_INFO/agoranet.zip +info = +pack = ftp://pharcyde.org/agoranet/AGN_INFO/agoranet.zip coord = Nicholas Boel email = accessd@pharcyde.org addr = 46:1/100 @@ -129,6 +145,7 @@ areatag_prefix = CNT_ name = SciNet desc = Active network for the BBS scene info = https://scinet-ftn.org/ +pack = https://scinet-ftn.org/sciinfo.zip coord = Frank Linhares email = scinet@diskshop.ca addr = 77:1/100 @@ -138,22 +155,61 @@ echolist = https://scinet-ftn.org/scinet.na areatag_prefix = areatitle_prefix = SciNet: +[zone:256] +name = DevNet +desc = developer oriented network +info = http://www.digitaldistortionbbs.com, Also available as QWK. See pack. +pack = ftp://digitaldistortionbbs.com/bbs/INFOPAKS/DevNet.zip +coord = Tony Langdon +email = vk3jed@vkradio.com +addr = 256:8/100 +host = bridge.vkradio.com +echolist = devnet.na +areatag_prefix = DEV_ + [zone:432] name = VKRadio desc = hobbyist radio communication oriented network -info = https://vkradio.com/vkradio.zip +info = https://vkradio.com/vkradio.zip +pack = https://vkradio.com/vkradio.zip coord = Tony Langdon email = vk3jed@vkradio.com addr = 432:1/100 fido = 3:633/410 dns = ftn.vkradio.com +host = bridge.vkradio.com echolist = https://vkradio.com/vkradio.na areatag_prefix = VK_ +[zone:440] +name = MusicNet +desc = music oriented network +info = http://www.digitaldistortionbbs.com, Also available as QWK. See pack. +pack = ftp://digitaldistortionbbs.com/bbs/INFOPAKS/MusicNet.zip +coord = Tony Langdon +email = vk3jed@vkradio.com +addr = 440:1/100 +host = bridge.vkradio.com +echolist = musicnet.na +areatag_prefix = MUS_ + +[zone:316] +name = Whisper +desc = Family-Oriented Bulletin Board Message/File Network +info = http://www.cr1mson.org/whispernet.html +pack = http://www.cr1mson.org/uploads/1/4/5/3/14535704/whispnet.zip +coord = Jon Justvig +email = jonathanjustvig@gmail.com +addr = 316:36/1 +host = vintagebbsing.com +echolist = wenmbone.na +areatag_prefix = WHISP_ + [zone:618] -name = Micronet +name = Micronet desc = laid-back, friendly and comfortable mail info = https://minftn.net/ +pack = http://minftn.net/mininfo.zip coord = Sean Dennis email = zc@minftn.net fido = 1:18/200 @@ -162,3 +218,15 @@ addr = 618:618/2 host = phoenix.bnbbbs.net echolist = micronet.na areatag_prefix = MIN_ + +[zone:1337] +name = tqwNet +desc = A network for having fun and international friendships +info = https://https://www.erb.pw/ +pack = https://www.erb.pw/tqwinfo.zip +coord = MeaTLoTioN +email = ml@erb.pw +addr = 1337:3/100 +host = hub.ca.erb.pw +echolist = tqwnet.na +areatag_prefix = TQW_ diff --git a/exec/init-fidonet.js b/exec/init-fidonet.js index a075d131ea60bd0825531e0cee4c5864d013f8fb..102921d5abe0e73dafccd92e90bcb94949e231ca 100644 --- a/exec/init-fidonet.js +++ b/exec/init-fidonet.js @@ -22,7 +22,7 @@ "use strict"; -const REVISION = "$Revision: 1.29 $".split(' ')[1]; +const REVISION = "$Revision: 1.30 $".split(' ')[1]; require('sbbsdefs.js', 'SUB_NAME'); var netname; var netdns; @@ -42,7 +42,7 @@ print("************************************************************************* var network_list = {}; var file = new File(js.exec_dir + "init-fidonet.ini"); -if (file.open("r")) { +if(file.open("r")) { var list = file.iniGetSections("zone:", "zone"); for(var i in list) network_list[list[i].substr(5)] = file.iniGetObject(list[i]); @@ -59,15 +59,15 @@ function aborted() function exclude_strings(list, patterns, flags) { patterns = [].concat(patterns); - if (flags === undefined) + if(flags === undefined) flags = 'i'; return list.reduce(function (a, c) { var matched = patterns.some(function (e) { - if (typeof e == 'string') + if(typeof e == 'string') e = new RegExp(e, flags); return c.match(e); - }); - if (!matched) + }); + if(!matched) a.push(c); return a; }, []); @@ -150,11 +150,13 @@ function send_app_netmail(destaddr) body_text += "\r\n"; body_text += "My system is " + system.name + " at " + system.inet_addr + ".\r\n"; body_text += "\r\n"; - body_text += "I am using Synchronet-" + system.platform + " v" + system.full_version + body_text += "I am using Synchronet-" + system.platform + " v" + system.full_version + " with SBBSecho and BinkIT.\r\n"; body_text += "\r\n"; body_text += "My requested AreaFix password is: '" + link.AreaFixPwd + "'\r\n"; body_text += "My requested BinkP Session password is: '" + link.SessionPwd + "'\r\n"; + if(link.TicFilePwd) + body_text += "My requested TIC Password is: '" + link.TicFilePwd + "'\r\n"; body_text += "\r\n"; body_text += "I will be using 'Type-2+' (FSC-39) packets with no password.\r\n"; body_text += "Uncompressed or PKZIP-archived EchoMail bundles will work fine.\r\n"; @@ -187,13 +189,13 @@ function lookup_network(info) if(result) return result; } - + var file = new File("sbbsecho.ini"); - if (!file.open("r")) { + if(!file.open("r")) { alert("Error " + file.error + " opening " + file.name); return false; } - + if(typeof info == "number") { // zone var dns; var domain_list = file.iniGetSections("domain:"); @@ -230,12 +232,56 @@ function lookup_network(info) return result; } -function get_linked_node(addr) +function get_domain(zone) { var file = new File("sbbsecho.ini"); - if (!file.open("r")) + if(!file.open("r")) { + alert("Error " + file.error + " opening " + file.name); + return false; + } + + var domain_list = file.iniGetSections("domain:"); + if(domain_list) { + var zonemap = {}; + for(var i = 0; i < domain_list.length && !result; i++) { + var section = domain_list[i]; + var netname = section.substr(7) + var zones = file.iniGetValue(section, "Zones"); + if(!zones) + continue; + if(typeof zones == 'number') { + if(zone == zones) { + return netname; + } + continue; + } + zones = zones.split(','); + for(var j = 0; j < zones.length; j++) { + if(zone == zones[j]) { + return netname; + } + } + } + file.close(); + return result; + } + return ""; +} + +function get_linked_node(addr, domain) +{ + var file = new File("sbbsecho.ini"); + if(!file.open("r")) return false; - var result = file.iniGetObject("node:" + addr); + var result; + if(domain) { + result = file.iniGetObject("node:" + addr + "@" + domain); + if (!result) { + result = file.iniGetObject("node:" + addr); + } + } else { + result = file.iniGetObject("node:" + addr); + } file.close(); return result; } @@ -243,14 +289,14 @@ function get_linked_node(addr) function get_binkp_sysop() { var file = new File("sbbsecho.ini"); - if (!file.open("r")) + if(!file.open("r")) return false; var result = file.iniGetValue("Binkp", "Sysop"); file.close(); return result; } -function update_sbbsecho_ini(hub, link, echolist_fname, areamgr) +function update_sbbsecho_ini(hub, link, domain, echolist_fname, areamgr) { function makepath(path) { @@ -295,15 +341,36 @@ function update_sbbsecho_ini(hub, link, echolist_fname, areamgr) if(!binkp) binkp = {}; binkp.sysop = sysop; if(!file.iniSetObject("binkp", binkp)) { - return "Error" + file.error + " writign to " + file.name; + return "Error" + file.error + " writing to " + file.name; } + + var prefnode; var section = "node:" + fidoaddr.to_str(hub); - if(!file.iniGetObject(section) - || confirm("Overwrite hub [" + section + "] configuration in " + file.name)) { - if(!file.iniSetObject(section, link)) { - return "Error " + file.error + " writing to " + file.name; + + if(domain) { + if(file.iniGetObject(section)) { + if(confirm("Migrate " + section + " to " + section + "@" + domain)) { + if(!file.iniSetObject(section + "@" + domain, link)) { + return "Error " + file.error + " writing to " + file.name; + } else { + file.iniRemoveSection(section); + } + } + } else { + if(!file.iniGetObject(section) || confirm("Overwrite hub [" + section + "@" + domain + "] configuration in " + file.name)) { + if(!file.iniSetObject(section + "@" + domain, link)) { + return "Error " + file.error + " writing to " + file.name; + } + } + } + } else { + if(!file.iniGetObject(section) || confirm("Overwrite hub [" + section + "] configuration in " + file.name)) { + if(!file.iniSetObject(section, link)) { + return "Error " + file.error + " writing to " + file.name; + } } } + var section = "node:" + hub.zone + ":ALL"; if(confirm("Route all zone " + hub.zone + " netmail through your hub")) { if(!file.iniSetObject(section, @@ -343,7 +410,6 @@ else if(netname) { netzone = lookup_network(netname); network = network_list[netzone]; } - if(!netzone) { for(var zone in network_list) { var desc = ""; @@ -358,7 +424,8 @@ if(!netzone) { email = " <" + network_list[zone].email + ">"; if(network_list[zone].fido) email += " " + network_list[zone].fido; - print(" coordinator: " + (network_list[zone].coord || "") + email); + // removed because screen is scrolling so much with so many networks + //print(" coordinator: " + (network_list[zone].coord || "") + email); } } var which; @@ -377,10 +444,13 @@ if(network) else network = {}; + +var domain = get_domain(netzone); + if(netzone <= 6) netname = "FidoNet"; else { - while((!netname || netname.indexOf(' ') >= 0 || netname.length > 8 + while((!netname || netname.indexOf(' ') >= 0 || netname.length > 8 || !confirm("Network name is '" + netname + "'")) && !aborted()) { var str = prompt("Network name (no spaces or illegal filename chars) [" + netname + "]"); if(str) @@ -391,7 +461,11 @@ if(netname) { print("Network name: " + netname); print("Network zone: " + netzone); print("Network info: " + network.info); - print("Network coordinator: " + network.coord + print("Network domain: " + domain); + if (network.pack) { + print("Network pack: " + network.pack); + } + print("Network coordinator: " + network.coord + (network.email ? (" <" + network.email + ">") : "") + (network.fido ? (" " + network.fido) : "")); if(network.also) @@ -403,7 +477,7 @@ if(netname) { print("Reading Message Area configuration file: msgs.cnf"); var cnflib = load({}, "cnflib.js"); var msgs_cnf = cnflib.read("msgs.cnf"); -if (!msgs_cnf) { +if(!msgs_cnf) { alert("Failed to read msgs.cnf"); exit(1); } @@ -432,7 +506,7 @@ while(((isNaN(hub.zone) || hub.zone < 1) hub = fidoaddr.parse(prompt("Your hub's address (zone:net/node)")); } -var link = get_linked_node(fidoaddr.to_str(hub)); +var link = get_linked_node(fidoaddr.to_str(hub), domain); if(!link) link = {}; @@ -477,9 +551,9 @@ while(!confirm("Your node address is " + fidoaddr.to_str(your)) && !aborted()) { your.net = NaN; your.node = NaN; while((isNaN(your.zone) || your.zone < 1) && !aborted()) - your.zone = parseInt(prompt("Your zone number (e.g. 1 for FidoNet North America)")); + your.zone = parseInt(prompt("Your zone number (e.g. " + hub.zone + ")")); while((isNaN(your.net) || your.net < 1) && !aborted()) - your.net = parseInt(prompt("Your network number (i.e. normally the same as your hub)")); + your.net = parseInt(prompt("Your network number (e.g. " + hub.net + ")")); while((isNaN(your.node) || your.node < 1) && !aborted()) your.node = parseInt(prompt("Your node number (e.g. 9999 for temporary node)")); while((isNaN(your.point)) && !aborted()) @@ -502,11 +576,13 @@ while((!link.AreaFixPwd || !confirm("Your AreaFix Password is '" + link.AreaFixP link.AreaFixPwd = prompt("Your AreaFix (a.k.a. Area Manager) Password (case in-sensitive)"); while((!link.SessionPwd || !confirm("Your BinkP Session Password is '" + link.SessionPwd + "'")) && !aborted()) link.SessionPwd = prompt("Your BinkP Session Password (case sensitive)"); +while(((!link.TicFilePwd && (link.TicFilePwd !== "")) || !confirm("Your TIC File Password is '" + (link.TicFilePwd ? link.TicFilePwd : "(not set)") + "'")) && !aborted()) + link.TicFilePwd = prompt("Your TIC File Password (case sensitive) (optional)"); /***********************************************/ /* SEND NODE NUMBER REQUEST NETMAIL (Internet) */ /***********************************************/ -if(your.node === 9999 && network.email && network.email.indexOf('@') > 0 +if(your.node === 9999 && network.email && network.email.indexOf('@') > 0 && confirm("Send a node number application to " + network.email)) { var result = send_app_netmail(network.email); if(typeof result !== 'boolean') { @@ -517,7 +593,7 @@ if(your.node === 9999 && network.email && network.email.indexOf('@') > 0 exit(0); if(confirm("Come back when you have your permanently-assigned node address")) { if(confirm("Save changes to FidoNet configuration file: sbbsecho.ini")) { - var result = update_sbbsecho_ini(hub, link); + var result = update_sbbsecho_ini(hub, link, domain); if (result != true) { alert(result); exit(1); @@ -545,12 +621,12 @@ if(!msg_area.grp[netname] && confirm("Create " + netname + " message group in SCFG->Message Areas")) { print("Adding Message Group: " + netname); msgs_cnf.grp.push( { - "name": netname, - "description": netname, - "ars": "", - "code_prefix": network.areatag_prefix === undefined - ? (netname.toUpperCase() + "_") : network.areatag_prefix - }); + "name": netname, + "description": netname, + "ars": "", + "code_prefix": network.areatag_prefix === undefined + ? (netname.toUpperCase() + "_") : network.areatag_prefix + }); } if(confirm("Save Changes to Message Area configuration file: msgs.cnf")) { if(!cnflib.write("msgs.cnf", undefined, msgs_cnf)) { @@ -564,11 +640,12 @@ if(confirm("Save Changes to Message Area configuration file: msgs.cnf")) { /* DOWNLOAD ECHOLIST */ /*********************/ var echolist_fname = file_getname(network.echolist); -if(network.echolist +load("http.js"); +if(network.echolist && (network.echolist.indexOf("http://") == 0 || network.echolist.indexOf("https://") == 0) && confirm("Download " + netname + " EchoList: " + file_getname(network.echolist))) { var echolist_url = network.echolist; - load("http.js"); + while(!aborted()) { while((!echolist_url || !confirm("Download from: " + echolist_url)) && !aborted()) { echolist_url = prompt("Echolist URL"); @@ -590,7 +667,7 @@ if(network.echolist continue; } if(http_request.response_code == 200) { - print("Downloaded " + echolist_url + " to " + file.name); + print("Downloaded " + echolist_url + " to " + system.ctrl_dir + file.name); file.write(contents); file.close(); break; @@ -601,14 +678,66 @@ if(network.echolist if(!confirm("Try again")) break; } +} else if (network.pack + && (network.pack.indexOf("http://") == 0 || network.pack.indexOf("https://") == 0) + && confirm("Download " + netname + " Info Pack: " + network.pack)) { + while(!aborted()) { + var packdlfilename = file_getname(network.pack) + var file = new File(packdlfilename); + if(!file.open("w")) { + alert("Error " + file.error + " opening " + file.name); + exit(1); + } + var http_request = new HTTPRequest(); + try { + var contents = http_request.Get(network.pack); + } catch(e) { + alert(e); + file.close(); + file_remove(system.ctrl_dir + file.name); + if(!confirm("Try again")) + break; + continue; + } + if(http_request.response_code == 200) { + print("Downloaded " + network.pack + " to " + system.ctrl_dir + file.name); + file.write(contents); + file.close(); + + // try to extract on linux, + if (system.platform == 'Linux') { + if (system.exec("unzip -CLo " + file_getname(network.pack) + " " + echolist_fname) !== 0) { + print("Please extract " + network.echolist + " from " + file.name + " into " + system.ctrl_dir); + } + } else if (system.platform == 'Win32') { + print("Please extract " + network.echolist + " from " + file.name + " into " + system.ctrl_dir); + } + + break; + } + file.close(); + file_remove(file.name); + alert("Error " + http_request.response_code + " downloading " + network.pack); + if(!confirm("Try again")) + break; + } } while(echolist_fname && !file_getcase(echolist_fname) && !aborted()) { alert(system.ctrl_dir + echolist_fname + " does not exist"); - if(!confirm("Install " + netname + " EchoList: " + echolist_fname)) - break; - prompt("Download and extract " + echolist_fname + " now... Press enter to continue"); + if ((network.echolist.indexOf("http://") == -1) && (network.echolist.indexOf("https://") == -1) + && (network.pack)) { + if (!confirm("Please extract the " + echolist_fname + " file from the pack " + file_getname(network.pack) + " into " + system.ctrl_dir + ". Continue?")) { + break; + } + } else { + if (!confirm("Please place " + echolist_fname + " into " + system.ctrl_dir + ". Continue?")) { + break; + } + } + + prompt(echolist_fname + " not found. Please put file into ctrl dir and press Enter."); } -echolist_fname = file_getcase(echolist_fname) +echolist_fname = file_getcase(system.ctrl_dir + echolist_fname) if(echolist_fname && file_size(echolist_fname) > 0) { if(network.areatag_exclude) { print("Removing " + network.areatag_exclude + " from " + echolist_fname); @@ -628,11 +757,11 @@ if(echolist_fname && file_size(echolist_fname) > 0) { if(!network.handles) misc |= SUB_NAME; system.exec(system.exec_dir + "scfg" - + " -import=" + echolist_fname + + " -import=" + echolist_fname + " -g" + netname + " -faddr=" + fidoaddr.to_str(your) + " -misc=" + misc - ); + ); } } @@ -640,7 +769,7 @@ if(echolist_fname && file_size(echolist_fname) > 0) { /* UPDATE SBBSECHO.INI */ /***********************/ if(confirm("Save changes to FidoNet configuration file: sbbsecho.ini")) { - var result = update_sbbsecho_ini(hub, link, echolist_fname, network.areamgr); + var result = update_sbbsecho_ini(hub, link, domain, echolist_fname, network.areamgr); if (result != true) { alert(result); exit(1); @@ -682,7 +811,7 @@ if(your.node === 9999) { } if(aborted() || confirm("Come back when you have a permanently-assigned node address")) exit(0); - } + } } /************************/ @@ -701,12 +830,12 @@ if(your.node !== 9999 lines[i] = lines[i].split(/\s+/)[0]; } if(!msgbase.save_msg({ - to: network.areamgr || "AreaFix", - to_net_addr: fidoaddr.to_str(hub), - from: sysop, - from_ext: 1, - subject: link.AreaFixPwd - }, /* body text: */ lines.join('\r\n'))) { + to: network.areamgr || "AreaFix", + to_net_addr: fidoaddr.to_str(hub), + from: sysop, + from_ext: 1, + subject: link.AreaFixPwd + }, /* body text: */ lines.join('\r\n'))) { alert("Error saving message: " + msgbase.last_error); exit(1); }