From b0ec55541388aea8328c1440fb5762d834c5a506 Mon Sep 17 00:00:00 2001 From: mcmlxxix <> Date: Fri, 18 Jan 2013 22:07:44 +0000 Subject: [PATCH] updated interbbs docs, default to localhost if server.ini missing, default to localhost in server.ini --- xtrn/dicewarz2/dice2.js | 4 +- xtrn/dicewarz2/interbbs.doc | 77 ++++++++++++++++++++++-------------- xtrn/dicewarz2/server.ini | 2 +- xtrn/starstocks/interbbs.doc | 55 ++++++++++++++++---------- xtrn/starstocks/server.ini | 2 +- xtrn/starstocks/stars.js | 4 +- 6 files changed, 89 insertions(+), 55 deletions(-) diff --git a/xtrn/dicewarz2/dice2.js b/xtrn/dicewarz2/dice2.js index f676b086f4..0b556a9f9e 100644 --- a/xtrn/dicewarz2/dice2.js +++ b/xtrn/dicewarz2/dice2.js @@ -8,8 +8,8 @@ if(!file_exists(root + "server.ini")) { var server_file = new File(root + "server.ini"); server_file.open('r',true); //var autoUpdate=server_file.iniGetValue(null,"autoUpdate"); -var serverAddr=server_file.iniGetValue(null,"host"); -var serverPort=server_file.iniGetValue(null,"port"); +var serverAddr=server_file.iniGetValue(null,"host","localhost"); +var serverPort=server_file.iniGetValue(null,"port",10088); server_file.close(); var client=new JSONClient(serverAddr,serverPort); diff --git a/xtrn/dicewarz2/interbbs.doc b/xtrn/dicewarz2/interbbs.doc index 16eaa84153..0fe980258d 100644 --- a/xtrn/dicewarz2/interbbs.doc +++ b/xtrn/dicewarz2/interbbs.doc @@ -1,3 +1,11 @@ +*****CONNECTING A GAME TO AN INTER-BBS HOST****** + +There is a SERVER.INI file included with every inter-BBS JavaScript game. +If you wish to connect your BBS to an existing network, edit the file and +put the appropriate hostname or IP address, and the port on which the network is +operating (default: 10088) + + *****UPDATING YOUR LOCAL LIBRARIES****** Before you attempt to install the inter-BBS service, it is recommended that you @@ -8,66 +16,77 @@ with the latest files from the Synchronet CVS repository at: RECOMMENDED UPDATES: - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/layout.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/inputline.js - 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/event-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/scrollbar.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-sock.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-client.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-chat.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/frame.js - + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/layout.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/inputline.js + 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/event-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/scrollbar.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/cvs.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/frame.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/tree.js + NOTE: Replace any outdated local copies with the latest release from the links. *****SETTING UP INTER-BBS SERVICE WITH SYNCHRONET***** +If you wish to host your own inter-BBS service for others to connect to, you must edit +the file SERVICES.INI in your relative 'CTRL/' path. You must also open whichever port you +specify on your router to allow other systems to connect (and edit your local server.ini +files so that you connect to your service). + + Default SERVICES.INI text for the inter-BBS service: + + [JSON] + Port = 10088 + Options = STATIC | LOOP + Command = json-service.js + 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/json-service.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-db.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-sock.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/json-service.ini + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/json-service.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-db.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-sock.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/json-service.ini NOTE: Placing these files in their corresponding local equivalent locations will make configuration much easier. -[JSON-CHAT.JS] +[EXEC/LOAD/JSON-CHAT.JS] - This handles all inbound/outbound chat messages, and packages them for delivery. - this also contains the necessary objects to implement a chat room (windowed or fullscreen). + This handles all inbound/outbound chat messages, and packages them for delivery json client. -[JSON-DB.JS] +[EXEC/LOAD/JSON-DB.JS] This file acts as a JSON object database, which is used by JSON-SERVICE, but can be used on the client side as well. -[JSON-CLIENT.JS] +[EXEC/LOAD/JSON-CLIENT.JS] - This file is the gateway to the program's interbbs server. It contains the methods needed to lock, unlock, - read, write and delete objects from the server database. + This file is the gateway to the program's interbbs server. It contains the methods needed to + lock, unlock, read, write and delete objects from the server database. -[JSON-SERVICE.JS] +[EXEC/JSON-SERVICE.JS] - This file acts as an interbbs server. It contains the methods needed to lock, unlock, + This file acts as an socket service. It contains the methods needed to lock, unlock, read, write and delete objects from the server database, and also accepts JSON-CLIENT connections - and acts as the main source for all dynamic program data. The file contains instructions for + and acts as the main source for all dynamic program data. The file also contains instructions for setting up a server. -[JSON-SERVICE.INI] +[CTRL/JSON-SERVICE.INI] This file tells JSON-SERVICE.JS where a program's files are located. 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. + use this service to their default locations, no additional configuration should be required other + than to un-comment the lines corresponding with the games you wish to host. -[SERVER.INI] +[XTRN/<GAME_DIR>/SERVER.INI] This file should be located in the program's working directory, as it contains information for the host and port the program will be connecting to. Deleting this file will cause diff --git a/xtrn/dicewarz2/server.ini b/xtrn/dicewarz2/server.ini index f4995f8a44..81331d2cdc 100644 --- a/xtrn/dicewarz2/server.ini +++ b/xtrn/dicewarz2/server.ini @@ -1,3 +1,3 @@ -host=wlarb.synchro.net +host=localhost port=10088 autoupdate=true \ No newline at end of file diff --git a/xtrn/starstocks/interbbs.doc b/xtrn/starstocks/interbbs.doc index e12bf1824e..0fe980258d 100644 --- a/xtrn/starstocks/interbbs.doc +++ b/xtrn/starstocks/interbbs.doc @@ -1,3 +1,11 @@ +*****CONNECTING A GAME TO AN INTER-BBS HOST****** + +There is a SERVER.INI file included with every inter-BBS JavaScript game. +If you wish to connect your BBS to an existing network, edit the file and +put the appropriate hostname or IP address, and the port on which the network is +operating (default: 10088) + + *****UPDATING YOUR LOCAL LIBRARIES****** Before you attempt to install the inter-BBS service, it is recommended that you @@ -8,26 +16,33 @@ with the latest files from the Synchronet CVS repository at: RECOMMENDED UPDATES: - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/irc_protocol.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/socket_bg.js http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/layout.js http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/inputline.js 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/event-timer.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 http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/cvs.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-sock.js - http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/json-client.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/frame.js + http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/load/tree.js NOTE: Replace any outdated local copies with the latest release from the links. *****SETTING UP INTER-BBS SERVICE WITH SYNCHRONET***** +If you wish to host your own inter-BBS service for others to connect to, you must edit +the file SERVICES.INI in your relative 'CTRL/' path. You must also open whichever port you +specify on your router to allow other systems to connect (and edit your local server.ini +files so that you connect to your service). + + Default SERVICES.INI text for the inter-BBS service: + + [JSON] + Port = 10088 + Options = STATIC | LOOP + Command = json-service.js + 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: @@ -42,36 +57,36 @@ this program in inter-BBS mode, and can be downloaded from the Synchronet CVS re NOTE: Placing these files in their corresponding local equivalent locations will make configuration much easier. -[CHATENG.JS] +[EXEC/LOAD/JSON-CHAT.JS] - This handles all inbound/outbound chat messages, and packages them for delivery via the irc protocol. - this also contains the necessary objects to implement a chat room (windowed or fullscreen). + This handles all inbound/outbound chat messages, and packages them for delivery json client. -[JSON-DB.JS] +[EXEC/LOAD/JSON-DB.JS] This file acts as a JSON object database, which is used by JSON-SERVICE, but can be used on the client side as well. -[JSON-CLIENT.JS] +[EXEC/LOAD/JSON-CLIENT.JS] - This file is the gateway to the program's interbbs server. It contains the methods needed to lock, unlock, - read, write and delete objects from the server database. + This file is the gateway to the program's interbbs server. It contains the methods needed to + lock, unlock, read, write and delete objects from the server database. -[JSON-SERVICE.JS] +[EXEC/JSON-SERVICE.JS] - This file acts as an interbbs server. It contains the methods needed to lock, unlock, + This file acts as an socket service. It contains the methods needed to lock, unlock, read, write and delete objects from the server database, and also accepts JSON-CLIENT connections - and acts as the main source for all dynamic program data. The file contains instructions for + and acts as the main source for all dynamic program data. The file also contains instructions for setting up a server. -[JSON-SERVICE.INI] +[CTRL/JSON-SERVICE.INI] This file tells JSON-SERVICE.JS where a program's files are located. 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. + use this service to their default locations, no additional configuration should be required other + than to un-comment the lines corresponding with the games you wish to host. -[SERVER.INI] +[XTRN/<GAME_DIR>/SERVER.INI] This file should be located in the program's working directory, as it contains information for the host and port the program will be connecting to. Deleting this file will cause diff --git a/xtrn/starstocks/server.ini b/xtrn/starstocks/server.ini index f4995f8a44..81331d2cdc 100644 --- a/xtrn/starstocks/server.ini +++ b/xtrn/starstocks/server.ini @@ -1,3 +1,3 @@ -host=wlarb.synchro.net +host=localhost port=10088 autoupdate=true \ No newline at end of file diff --git a/xtrn/starstocks/stars.js b/xtrn/starstocks/stars.js index d841f5db68..1961e7d103 100644 --- a/xtrn/starstocks/stars.js +++ b/xtrn/starstocks/stars.js @@ -14,8 +14,8 @@ if(!file_exists(root + "server.ini")) { var server_file = new File(root + "server.ini"); server_file.open('r',true); //var autoUpdate=server_file.iniGetValue(null,"autoUpdate"); -var serverAddr=server_file.iniGetValue(null,"host"); -var serverPort=server_file.iniGetValue(null,"port"); +var serverAddr=server_file.iniGetValue(null,"host","localhost"); +var serverPort=server_file.iniGetValue(null,"port",10088); server_file.close(); var client=new JSONClient(serverAddr,serverPort); -- GitLab