Skip to content
Snippets Groups Projects
Select Git revision
  • dd_msg_reader_list_personal_email_in_reverse_choose_msg_fix
  • dailybuild_linux-x64
  • dailybuild_win32
  • master default protected
  • sqlite
  • rip_abstraction
  • dailybuild_macos-armv8
  • dd_file_lister_filanem_in_desc_color
  • mode7
  • dd_msg_reader_are_you_there_warning_improvement
  • c23-playing
  • syncterm-1.3
  • syncterm-1.2
  • test-build
  • hide_remote_connection_with_telgate
  • 638-can-t-control-c-during-a-file-search
  • add_body_to_pager_email
  • mingw32-build
  • cryptlib-3.4.7
  • ree/mastermind
  • sbbs320d
  • syncterm-1.6
  • syncterm-1.5
  • syncterm-1.4
  • sbbs320b
  • syncterm-1.3
  • syncterm-1.2
  • syncterm-1.2rc6
  • syncterm-1.2rc5
  • push
  • syncterm-1.2rc4
  • syncterm-1.2rc2
  • syncterm-1.2rc1
  • sbbs319b
  • sbbs318b
  • goodbuild_linux-x64_Sep-01-2020
  • goodbuild_win32_Sep-01-2020
  • goodbuild_linux-x64_Aug-31-2020
  • goodbuild_win32_Aug-31-2020
  • goodbuild_win32_Aug-30-2020
40 results

echoareas.js

Blame
  • echoareas.js 1.26 KiB
    // $Id: echoareas.js,v 1.1 2018/02/21 04:23:09 rswindell Exp $
    
    // Displays (in areas.bbs format) all the FTN-linked sub-boards with their
    // configured "GroupHub" (from sbbsecho.ini -> [node:*] -> GroupHub).
    // Requires that you're using SBBSecho v3.x and configured one or more hubs in
    // EchoCfg->Linked Nodes.
    
    // To use this script to generate an area file, just redirect the output, e.g.
    // jsexec echoareas > /sbbs/data/areas.bbs
    
    // Warning the above example will *overwrite* your existing areas.bbs file
    // if you have one, so use with caution.
    
    // Thanks to Nelgin (endofthelinebbs.com) for the idea for this script.
    
    load('sbbsdefs.js');
    
    var ini = new File(file_cfgname(system.ctrl_dir, "sbbsecho.ini"));
    if(!ini.open("r")) {
    	alert("Error " + ini.error + " opening " + ini.name);
    	exit(1);
    }
    var node = ini.iniGetAllObjects("addr", "node:");
    ini.close();
    
    var t = time();
    var sub;
    for(sub in msg_area.sub) {
    	if(!(msg_area.sub[sub].settings & SUB_FIDO))
    		continue;
    	printf("%-16s %-35s ", sub, msg_area.sub[sub].name.replace(' ', '_').toUpperCase());
    	for(var n in node)
    		if(node[n].GroupHub
    			&& node[n].GroupHub.toLowerCase() == msg_area.sub[sub].grp_name.toLowerCase())
    			printf("%s ", node[n].addr);	// there *should* be only one hub per area
    	print();	// end-of-line
    }