Skip to content
Snippets Groups Projects
Commit 727ad405 authored by Randy Sommerfeld's avatar Randy Sommerfeld
Browse files

More sane defaults, and load them first

parent 5ffa1bb0
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -223,10 +223,12 @@ function Read_Config_File() { ...@@ -223,10 +223,12 @@ function Read_Config_File() {
read_conf_config(file_handle); read_conf_config(file_handle);
file_handle.close(); file_handle.close();
} else { } else {
log(LOG_NOTICE, "Couldn't open configuration file! Proceeding with defaults."); log(LOG_NOTICE, "Couldn't open configuration file! Proceeding with defaults only.");
load_config_defaults();
} }
if (true_array_len(ILines) < 1)
log(LOG_WARNING, "!WARNING Nobody appears to be allowed to connect - configure in [Allow]");
Time_Config_Read = Epoch(); Time_Config_Read = Epoch();
Scan_For_Banned_Clients(); Scan_For_Banned_Clients();
...@@ -248,19 +250,14 @@ function ini_sections() { ...@@ -248,19 +250,14 @@ function ini_sections() {
} }
function ini_Info(arg, ini) { function ini_Info(arg, ini) {
ServerName = format("%s.synchro.net", system.qwk_id.toLowerCase());
if (ini.ServerName) if (ini.ServerName)
ServerName = ini.ServerName; ServerName = ini.ServerName;
ServerDesc = system.name;
if (ini.Description) if (ini.Description)
ServerDesc = ini.Description; ServerDesc = ini.Description;
Admin1 = format("%s (%s)", system.name, system.qwk_id);
if (ini.Admin1) if (ini.Admin1)
Admin1 = ini.Admin1; Admin1 = ini.Admin1;
Admin2 = system.version_notice;
if (ini.Admin2) if (ini.Admin2)
Admin2 = ini.Admin2; Admin2 = ini.Admin2;
Admin3 = format("Sysop- <sysop@%s>", system.host_name);
if (ini.Admin3) if (ini.Admin3)
Admin3 = ini.Admin3; Admin3 = ini.Admin3;
} }
...@@ -504,24 +501,8 @@ function load_config_defaults() { ...@@ -504,24 +501,8 @@ function load_config_defaults() {
Admin2 = system.version_notice; Admin2 = system.version_notice;
Admin3 = format("Sysop- <sysop@%s>", system.host_name); Admin3 = format("Sysop- <sysop@%s>", system.host_name);
/*** Y:Line *** ping freq, connect freq, max clients, max sendq bytes */ /*** Y:Line *** ping freq, connect freq, max clients, max sendq bytes */
/* Class 1: Internet users */ YLines[0] = new YLine(120,600,100,1000000);
YLines[1] = new YLine(120,0,100,1000000);
/* Class 2: BBS users */
YLines[2] = new YLine(30,0,100,1000000);
/* Class 10: IRC operators */
YLines[10] = new YLine(400,0,10,2000000);
/* Class 30: Leaf -> Hub Servers */
YLines[30] = new YLine(60,300,1,15000000);
/* Class 40: Hub -> Hub Servers */
YLines[40] = new YLine(90,60,10,20000000);
/* Class 50: Hub -> QWK Authenticator */
YLines[50] = new YLine(90,60,1,20000000);
/*** I:Line *** mask, password, hostmask, port, class */ /*** I:Line *** mask, password, hostmask, port, class */
ILines.push(new ILine("*@127.0.0.1", null, "*@*", null, 2));
ILines.push(new ILine("*@::1", null, "*@*", null, 2));
ILines.push(new ILine("*@*", null, "*@*", null, 1));
/*** O:Line *** mask, password, name, flags, class */
OLines.push(new OLine(format("*@%s", ServerName), "*", "Sysop", parse_oline_flags("OS"), 10));
/*** U:Line ***/ /*** U:Line ***/
ULines.push("services.synchro.net"); ULines.push("services.synchro.net");
ULines.push("stats.synchro.net"); ULines.push("stats.synchro.net");
...@@ -544,6 +525,8 @@ function read_ini_config(conf) { ...@@ -544,6 +525,8 @@ function read_ini_config(conf) {
var Sections = new ini_sections(); var Sections = new ini_sections();
var i, s; var i, s;
load_config_defaults();
for (i in ini) { for (i in ini) {
if (ini_false_true(i.disabled) || ini_false_true(i.Disabled)) if (ini_false_true(i.disabled) || ini_false_true(i.Disabled))
continue; continue;
...@@ -623,6 +606,8 @@ function ini_true_false(str) { ...@@ -623,6 +606,8 @@ function ini_true_false(str) {
function read_conf_config(conf) { function read_conf_config(conf) {
var conf_line, arg, i; var conf_line, arg, i;
load_config_defaults();
function fancy_split(line) { function fancy_split(line) {
var ret = []; var ret = [];
var i; var i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment