...
 
Commits (9)
......@@ -8,41 +8,3 @@
; NOTE: after making changes to this file you MUST restart services
; for the changes to take effect
[boggle]
dir=../xtrn/bublbogl/
[chickendelivery2]
dir=../xtrn/chickendelivery/
[dicewarz]
dir=../xtrn/dicewarz/
[druglord]
dir=../xtrn/druglord/
[fatfish]
dir=../xtrn/fatfish/
[lemons]
dir=../xtrn/lemons/
[startrek]
dir=../xtrn/startrek/
[synchronetris]
dir=../xtrn/synchronetris/
[syncwall2]
dir=../xtrn/syncwall/
[synkroban]
dir=../xtrn/synkroban/
[thirsty]
dir=../xtrn/thirsty/
[uberblox]
dir=../xtrn/uberblox/
[tw2]
dir=../xtrn/tw2/
\ No newline at end of file
......@@ -2,7 +2,7 @@
; Each section is a service, the [section name] is the service/protocol name (by default)
; $Id: services.ini,v 1.14 2020/03/24 06:54:17 rswindell Exp $
; $Id: services.ini,v 1.15 2020/09/07 rswindell $
; Global keys supported (in root section and/or per service section):
......@@ -113,13 +113,6 @@ Port=6667
Options=STATIC | LOOP
Command=ircd.js
; JSON inter-bbs communications server
[JSON]
Port=10088
Interface=127.0.0.1
Options=STATIC | LOOP
Command=json-service.js
[Hotline]
Port=5500
Command=hotline.js
......@@ -143,11 +136,6 @@ Options=TLS
Port=24553
Command=binkit.js
[FlashPolicy]
Port=843
Command=flashpolicyserver.js
Enabled=false
[WS]
Port=1123
Options=NO_HOST_LOOKUP
......
......@@ -69,12 +69,15 @@
// [ini:<filename.ini>[:section]]
// keys = comma-separated list of keys to add/update in .ini
// values = list of values to eval() and assign to keys[]
// Note: string values must be enclosed in quotes!
// Additionally, each section can have the following optional keys that are
// only used by this script (i.e. not written to any configuration files):
// note = note to sysop displayed before installation
// prompt = confirmation prompt (or false if no prompting)
// required = if true, this item must be installed to continue
// last = if true, this item will be the last of its type
// done = if true, no more installer items will be processed
//
// Notes:
//
......@@ -250,9 +253,10 @@ function install(ini_fname)
editor: { desc: "External Editor", struct: "xedit" }
};
var done = false;
for (var t in types) {
var list = ini_file.iniGetAllObjects("code", t + ":");
for (var i = 0; i < list.length; i++) {
for (var i = 0; i < list.length && !done; i++) {
var item = list[i];
if (item.startup_dir === undefined)
item.startup_dir = startup_dir;
......@@ -263,14 +267,53 @@ function install(ini_fname)
installed++;
else if(item.required)
return false;
if(item.last === true)
break;
done = item.done;
}
}
var list = ini_file.iniGetAllObjects("filename", "ini:");
for (var i = 0; i < list.length && !done; i++) {
var item = list[i];
var a = item.filename.split(':');
item.filename = startup_dir + a[0];
if(!file_exists(item.filename))
item.filename = file_cfgname(system.ctrl_dir, a[0]);
item.section = a[1] || null;
item.keys = item.keys.split(',');
item.values = item.values.split(',');
var prompt = "Add/update the " + (item.section || "root") + " section of " + file_getname(item.filename);
if (item.prompt !== undefined)
prompt = item.prompt;
if (prompt && !confirm(prompt)) {
if (item.required == true)
return prompt + " is required to continue";
continue;
}
var file = new File(item.filename);
if(!file.open(file.exists ? 'r+':'w+'))
return "Error " + file.error + " opening " + file.name;
var result = true;
if (options.debug)
print(JSON.stringify(item));
for(var k in item.keys) {
print("Setting " + item.keys[k] + " = " + eval(item.values[k]));
result = file.iniSetValue(item.section, item.keys[k], eval(item.values[k]));
}
file.close();
if(required && result !== true)
return false;
if(item.last === true)
break;
done = item.done;
}
var services_ini = new File(file_cfgname(system.ctrl_dir, "services.ini"));
var list = ini_file.iniGetAllObjects("protocol", "service:");
for (var i = 0; i < list.length; i++) {
for (var i = 0; i < list.length && !done; i++) {
var item = list[i];
var prompt = "Install/enable the " + item.protocol + " service in " + services_ini.name;
var prompt = "Install/enable the " + item.protocol + " service in " + file_getname(services_ini.name);
if (item.prompt !== undefined)
prompt = item.prompt;
if (prompt && !confirm(prompt)) {
......@@ -301,41 +344,13 @@ function install(ini_fname)
services_ini.close();
if(required && result !== true)
return false;
}
var list = ini_file.iniGetAllObjects("filename", "ini:");
for (var i = 0; i < list.length; i++) {
var item = list[i];
var a = item.filename.split(':');
item.filename = file_cfgname(system.ctrl_dir, a[0]);
item.section = a[1] || null;
item.keys = item.keys.split(',');
item.values = item.values.split(',');
var prompt = "Add/update the " + (item.section || "root") + " section of " + item.filename;
if (item.prompt !== undefined)
prompt = item.prompt;
if (prompt && !confirm(prompt)) {
if (item.required == true)
return prompt + " is required to continue";
continue;
}
var file = new File(item.filename);
if(!file.open(file.exists ? 'r+':'w+'))
return "Error " + file.error + " opening " + file.name;
var result = true;
if (options.debug)
print(JSON.stringify(item));
for(var k in item.keys) {
print("Setting " + item.keys[k] + " = " + eval(item.values[k]));
result = file.iniSetValue(item.section, item.keys[k], eval(item.values[k]));
}
file.close();
if(required && result !== true)
return false;
if(item.last === true)
break;
done = item.done;
}
var list = ini_file.iniGetAllObjects("cmd", "exec:");
for (var i = 0; i < list.length; i++) {
for (var i = 0; i < list.length && !done; i++) {
var item = list[i];
var js_args = item.cmd.split(/\s+/);
var js_file = js_args.shift();
......@@ -364,10 +379,13 @@ function install(ini_fname)
,[js_file, item.startup_dir, {}].concat(js_args));
if (result !== 0 && item.required)
return "Error " + result + " executing " + item.cmd;
if(item.last === true)
return true;
done = item.done;
}
var list = ini_file.iniGetAllObjects("str", "eval:");
for (var i = 0; i < list.length; i++) {
for (var i = 0; i < list.length && !done; i++) {
var item = list[i];
if (!item.cmd)
item.cmd = item.str; // the str can't contain [], so allow cmd to override
......@@ -383,6 +401,9 @@ function install(ini_fname)
if (item.required == true)
return "Truthful evaluation of '" + item.cmd + "' is required to continue";
}
if(item.last === true)
return true;
done = item.done;
}
if (installed) {
......
......@@ -58,8 +58,8 @@ Name: "enable_web"; Description: "Enable Web Server (HTTP protocol)"; GroupDescr
Name: "enable_svcs"; Description: "Enable Synchronet Services (Finger, Gopher, NNTP, IRC, IMAP, etc.)"; GroupDescription: {#services_group}
Name: "enable_ntsvcs"; Description: "Enable Synchronet NT services"; GroupDescription: {#ntsvcs_group}; Flags: unchecked
Name: "enable_sexpots"; Description: "Enable POTS (dial-up modem) support service"; GroupDescription: {#ntsvcs_group}; Flags: unchecked
name: "web_runemaster"; Description: "Enable Legacy/Runemaster Web Interface"; GroupDescription: {#webui_group}; Flags: exclusive
name: "web_echicken"; Description: "Enable echicken's Web Interface (v4)"; GroupDescription: {#webui_group}; Flags: exclusive unchecked
name: "web_echicken"; Description: "Enable echicken's Web Interface (v4)"; GroupDescription: {#webui_group}; Flags: exclusive
name: "web_runemaster"; Description: "Enable Legacy/Runemaster Web Interface"; GroupDescription: {#webui_group}; Flags: unchecked exclusive
[Files]
Source: "src\sbbs3\ctrl\sbbsctrl.exe"; DestDir: "{app}\exec"; Flags: ignoreversion
......@@ -134,6 +134,7 @@ Filename: "{app}\ctrl\sbbs.ini"; Section: "FTP"; Key: "AutoStart"; String:
Filename: "{app}\ctrl\sbbs.ini"; Section: "Web"; Key: "AutoStart"; String: "false"; Tasks: not enable_web
Filename: "{app}\ctrl\sbbs.ini"; Section: "Services"; Key: "AutoStart"; String: "false"; Tasks: not enable_svcs
Filename: "{app}\ctrl\sbbs.ini"; Section: "BBS"; Key: "Options"; String: "XTRN_MINIMIZED | ALLOW_RLOGIN | ALLOW_SSH | NO_DOS"; Check: IsWin64
Filename: "{app}\ctrl\sbbs.ini"; Section: "Web"; Key: "RootDirectory"; String: "../web/root"; Tasks: web_runemaster
Filename: "{app}\ctrl\sbbs.ini"; Section: "Web"; Key: "RootDirectory"; String: "../webv4/root"; Tasks: web_echicken
[Dirs]
......
......@@ -240,7 +240,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender)
,tz_str[i]
);
else
strcpy(str,tz_str[i]);
SAFECOPY(str,tz_str[i]);
TimeZoneComboBox->Items->Add(str);
}
sprintf(str,"Other (%s)",smb_zonestr(scfg.sys_timezone,NULL));
......@@ -284,13 +284,13 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender)
MainForm->SaveIniSettings(Sender);
// Write CNF files
strcpy(scfg.sys_name,SystemNameEdit->Text.c_str());
strcpy(scfg.sys_id,QWKIDEdit->Text.c_str());
strcpy(scfg.sys_location,SystemLocationEdit->Text.c_str());
strcpy(scfg.sys_op,SysopNameEdit->Text.c_str());
strcpy(scfg.sys_pass,SystemPasswordEdit->Text.c_str());
strcpy(scfg.sys_inetaddr,InternetAddressComboBox->Text.c_str());
strcpy(scfg.qnet_tagline,QNetTaglineEdit->Text.c_str());
SAFECOPY(scfg.sys_name,SystemNameEdit->Text.c_str());
SAFECOPY(scfg.sys_id,QWKIDEdit->Text.c_str());
SAFECOPY(scfg.sys_location,SystemLocationEdit->Text.c_str());
SAFECOPY(scfg.sys_op,SysopNameEdit->Text.c_str());
SAFECOPY(scfg.sys_pass,SystemPasswordEdit->Text.c_str());
SAFECOPY(scfg.sys_inetaddr,InternetAddressComboBox->Text.c_str());
SAFECOPY(scfg.qnet_tagline,QNetTaglineEdit->Text.c_str());
scfg.sys_nodes=NodesUpDown->Position;
if(TimeZoneComboBox->ItemIndex>=0
&& TimeZoneComboBox->ItemIndex<=sizeof(tz_val)/sizeof(tz_val[0]))
......@@ -424,7 +424,7 @@ void __fastcall TConfigWizard::WizNotebookPageChanged(TObject *Sender)
char bbsname[41];
char qwkid[9];
int len=0;
strcpy(bbsname,SystemNameEdit->Text.UpperCase().c_str());
SAFECOPY(bbsname,SystemNameEdit->Text.UpperCase().c_str());
for(char*p=bbsname;*p && len<8;p++) {
if(strchr(ILLEGAL_QWKID_CHARS,*p))
continue;
......
......@@ -3361,17 +3361,17 @@ void __fastcall TMainForm::RestoreTrayMenuItemClick(TObject *Sender)
//---------------------------------------------------------------------------
void __fastcall TMainForm::BBSConfigWizardMenuItemClick(TObject *Sender)
{
TConfigWizard* ConfigWizard;
static TConfigWizard* ConfigWizard;
static inside;
if(inside) return;
inside=true;
Application->CreateForm(__classid(TConfigWizard), &ConfigWizard);
if(ConfigWizard == NULL)
Application->CreateForm(__classid(TConfigWizard), &ConfigWizard);
if(ConfigWizard->ShowModal()==mrOk) {
SaveSettings(Sender);
// ReloadConfigExecute(Sender); /* unnecessary since refresh_cfg() is already called */
}
delete ConfigWizard;
inside=false;
}
......
......@@ -3,8 +3,13 @@ Desc: Browse and view text files, ANSI & ASCII art
By: echicken -at- bbs.electronicchicken.com
Cats: Main
Subs: ANSI, JavaScript
Inst: $Id: install-xtrn.ini,v 1.2 2020/04/25 02:38:58 rswindell Exp $
Inst: 2020/09/07
[prog:ANSIVIEW]
cmd = ?ansiview
settings = XTRN_MULTIUSER
[ini:settings.ini:electronic chicken bbs]
prompt = Link online ANSI archive from electronic chicken bbs
keys = description,module,cache,cachettl
values = 'An online archive of ANSI and ASCII artwork','ecbbs.js',true,86400
......@@ -3,15 +3,21 @@ Desc: You are a chicken on a mission.
By: echicken -at- bbs.electronicchicken.com
Cats: Games
Subs: Platfomer, JavaScript
Inst: $Id: install-xtrn.ini,v 1.1 2020/04/17 07:56:36 rswindell Exp $
Inst: 2020/09/07
[prog:CHICKEN]
cmd = ?chickendelivery.js
settings = XTRN_MULTIUSER
required = true
[ini:server.ini]
prompt = Share data with electronic chicken bbs
keys = host
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:chicken]
keys=dir
values=startup_dir
\ No newline at end of file
[ini:json-service.ini:chickendelivery2]
keys = dir
values = startup_dir
\ No newline at end of file
host=bbs.electronicchicken.com
host=localhost
port=10088
autoupdate=true
......@@ -3,13 +3,19 @@ Desc: A Pac-Man knock-off for Synchronet BBS
By: echicken -at- bbs.electronicchicken.com
Cats: Games
Subs: Classic, Clone, JavaScript
Inst: $Id: install-xtrn.ini,v 1.1 2020/04/17 08:09:04 rswindell Exp $
Inst: 2020/09/07
[prog:GOOBLE]
cmd = ?gooble.js
settings = XTRN_MULTIUSER
required = true
[ini:server.ini]
prompt = Share data with electronic chicken bbs
keys = host
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:gooble2]
......
host=localhost
port=10088
......@@ -9,6 +9,12 @@ cmd = ?startrek.js
settings = XTRN_MULTIUSER
required = true
[ini:server.ini]
prompt = Share data with electronic chicken bbs
keys = host
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:startrek]
......
Name: SyncWall
Desc: Inter-BBS ANSI graffiti wall for Synchronet BBS
By: echicken
Cats: Communication, Messaging
Cats: Main, Communications, Messaging
Subs: Wall, Graffiti, InterBBS, JavaScript
Inst: $Id: install-xtrn.ini,v 1.2 2020/04/17 09:27:15 rswindell Exp $
Inst: 2020/09/07
[prog:SYNCWALL]
cmd = ?syncwall.js
settings = XTRN_MULTIUSER
required = true
[ini:server.ini]
prompt = Share data with electronic chicken bbs
keys = host
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:syncwall]
keys=dir
values=startup_dir
\ No newline at end of file
[ini:json-service.ini:syncwall2]
keys = dir
values = startup_dir
\ No newline at end of file
; $Id: install-xtrn.ini,v 1.2 2020/04/17 09:23:05 rswindell Exp $
Name: Thirstyville
Desc: Inspired by the classic door game "Lemonade"
By: echicken -at- bbs.electronicchicken.com
Cats: Games
Subs: Trade, JavaScript
Inst: $Id: install-xtrn.ini,v 1.2 2020/04/17 09:23:05 rswindell Exp $
Inst: 2020/09/07
[prog:THIRSTY]
cmd = ?thirsty.js
settings = XTRN_MULTIUSER
required = true
[ini:game.ini]
prompt = Share data with electronic chicken bbs
keys = server
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:thirsty]
keys=dir
values=startup_dir
keys = dir
values = startup_dir
......@@ -10,6 +10,12 @@ cmd = ?wordem.js
settings = XTRN_MULTIUSER
required = true
[ini:server.ini]
prompt = Share data with electronic chicken bbs
keys = host
values = 'bbs.electronicchicken.com'
done = true
!include install-json-service.ini
[ini:json-service.ini:wordem]
......