Skip to content
Snippets Groups Projects
Commit 03e387fe authored by echicken's avatar echicken
Browse files

Don't crap out if server.ini is missing, just use some default settings. (Bug...

Don't crap out if server.ini is missing, just use some default settings.  (Bug reported by 'Binary' Bob Swindle.)
parent 5a0cb4a9
Branches
Tags
No related merge requests found
......@@ -65,11 +65,18 @@ var init = function() {
fieldFrame.load(js.exec_dir + "starfield.bin", 80, 24);
timer = new Timer();
var f = new File(js.exec_dir + "server.ini");
f.open("r");
serverIni = f.iniGetObject();
f.close();
if(file_exists(js.exec_dir + "server.ini")) {
var f = new File(js.exec_dir + "server.ini");
f.open("r");
serverIni = f.iniGetObject();
f.close();
} else {
serverIni = {
'host' : 'localhost',
'port' : 10088
};
}
frame.open();
statusFrame.top();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment