diff --git a/xtrn/starstocks/interbbs.doc b/xtrn/starstocks/interbbs.doc new file mode 100644 index 0000000000000000000000000000000000000000..7e555f538c85e8aebb662701e60d0266728a56a4 --- /dev/null +++ b/xtrn/starstocks/interbbs.doc @@ -0,0 +1,100 @@ +*****UPDATING YOUR LOCAL LIBRARIES****** + +Before you attempt to install the inter-BBS service, it is recommended that you +update your relative 'EXEC/' and 'EXEC/LOAD/' paths (typically '/SBBS/EXEC' and '/SBBS/EXEC/LOAD') +with the latest files from the Synchronet CVS repository at: + + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/ + + RECOMMENDED UPDATES: + + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/funclib.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/calendar.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/timer.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/clock.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/msgwndw.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/scrollbar.js + + NOTE: Replace any outdated local copies with the latest release from the links. + +*****SETTING UP INTER-BBS SERVICE WITH SYNCHRONET***** + +The inter-BBS features of this program require that the appropriate services be configured, +and that all of your files are up to date. The following files are needed to operate +this program in inter-BBS mode, and can be downloaded from the Synchronet CVS repository at: + + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/ + + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/commservice.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/commclient.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/chateng.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/filesync.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/filesync.ini + + NOTE: Placing these files in their corresponding local equivalent locations + will make configuration much easier. + +[COMMSERVICE.JS] + + This is a static service that must be included in /ctrl/services.ini in order to + accept connections and relay information to and from the main hub. It is critical + for this to be set up properly, for the programs that depend on it will not function + properly without it. + + This file must be placed in your relative 'EXEC/' or 'MODS/' path (typically '/SBBS/EXEC/'). + Once the file is in place, you must add the following to your 'CTRL/SERVICES.INI' file: + + [Commserv] + Port=10088 + MaxClients=20 + Options=STATIC + Command=commservice.js thebrokenbubble.com 10088 + + NOTE: there are two arguments on the command line that tell the service the address and + port of the main hub, which by default is the Broken Bubble BBS, on port 10088. If + you wish to act as your own hub (e.g. start your own league), simple remove both + arguments from the command line, and direct league nodes to add your URL and port + to their SERVICES.INI file. If your system operates on multiple machines and you wish + to share data between local nodes ONLY, setting up this service as a hub makes + this possible as well. + + NOTE: You should also double check to make sure that your services are running + +[COMMCLIENT.JS] + + This is the dedicated client that connects to the inter-BBS service. This file handles + the transmission of data to and from the service, as well as managing file synchronization + for the client (this program). This file is critical for the successful operation of this program + in inter-BBS mode. + + The file must be placed in your relative 'EXEC/LOAD/' or 'MODS/LOAD/' path (typically '/SBBS/EXEC/LOAD/'). + There is no further setup required for this to work (unless you changed the default 'Port' setting for the service + in SERVICES.INI). + +[CHATENG.JS] + + This handles all inbound/outbound chat messages, and packages them for delivery via the client and service. + this also contains the necessary objects to implement a chat room (windowed or fullscreen). + + NOTE: while this particular program may not have chat features, the service itself still may + require this file to be present. + +[FILESYNC.JS] + + This works in conjunction with the service, handling file synchronization requests from clients + and routing them, if necessary, to the main hub. File synchronization for inter-BBS programs will not + function if this file is missing. + + The file must be placed in your relative 'EXEC/LOAD/' or 'MODS/LOAD/' path (typically '/SBBS/EXEC/LOAD/'). + There is no further setup required for this to work. + +[FILESYNC.INI] + + This file tells FILESYNC.JS and COMMCLIENT.JS where to store/retrieve inbound/outbound transfers + coming from the client and the service. + + This file is critical for the service to operate properly. If you have installed the programs that + use this service to their default locations, no additional configuration should be required. + +Please report any bugs, issues or questions to: mcmlxxix at bbs dot thebrokenbubble dot com + diff --git a/xtrn/starstocks/stars.js b/xtrn/starstocks/stars.js index 722a92682b3da18073a5c2aed453acbea04be3cd..57bde0ff2a2be8d40e4e7c0a271e20982da73c7a 100644 --- a/xtrn/starstocks/stars.js +++ b/xtrn/starstocks/stars.js @@ -11,13 +11,15 @@ load("sbbsdefs.js"); load("commclient.js"); load("funclib.js"); load("graphic.js"); + var root_dir; try { barfitty.barf(barf); } catch(e) { root_dir = e.fileName; } root_dir = root_dir.replace(/[^\/\\]*$/,''); //######################### INITIALIZE PROGRAM VARIABLES ######################### - var stream= new ServiceConnection("starstocks"); + var interbbs= argv[0]; + var stream= interbbs?new ServiceConnection("starstocks"):false; const root= root_dir; const cfgname= "stars.cfg"; const high_score_file= "scores.dat"; @@ -31,7 +33,6 @@ root_dir = root_dir.replace(/[^\/\\]*$/,''); var difficulty= 1; var min_difficult= 20; var max_difficult= 35; - var interbbs= true; //######################### DO NOT CHANGE THIS SECTION ########################## var scores= []; @@ -47,7 +48,7 @@ root_dir = root_dir.replace(/[^\/\\]*$/,''); starcolor= star= scolor=""; - getFiles(high_score_file); + if(interbbs) getFiles(high_score_file); loadSettings(); loadHighScores(); partial_company=partial_company; @@ -58,7 +59,7 @@ root_dir = root_dir.replace(/[^\/\\]*$/,''); var max_normal= max_stars; var game; gameMenu(); - sendFiles(high_score_file); + if(interbbs) sendFiles(high_score_file); quit(); //########################## MAIN FUNCTIONS ###################################