2014-10-17 02:21:06 +00:00
|
|
|
/* jslint node: true */
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var fs = require('fs');
|
|
|
|
var paths = require('path');
|
|
|
|
var miscUtil = require('./misc_util.js');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
defaultPath : function() {
|
|
|
|
var base = miscUtil.resolvePath('~/');
|
|
|
|
if(base) {
|
|
|
|
return paths.join(base, '.enigmabbs', 'config.json');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
initFromFile : function(path, cb) {
|
|
|
|
var data = fs.readFileSync(path, 'utf8');
|
|
|
|
this.config = JSON.parse(data);
|
|
|
|
},
|
|
|
|
|
|
|
|
createDefault : function() {
|
|
|
|
this.config = {
|
|
|
|
bbsName : 'Another Fine ENiGMA½ BBS',
|
|
|
|
|
2014-10-30 04:23:44 +00:00
|
|
|
// :TODO: probably replace this with 'firstMenu' or somthing once that's available
|
2014-10-31 04:59:21 +00:00
|
|
|
entryMod : 'matrix',
|
2014-10-30 04:23:44 +00:00
|
|
|
|
|
|
|
preLoginTheme : '*',
|
2014-10-17 02:21:06 +00:00
|
|
|
|
2015-04-15 04:27:07 +00:00
|
|
|
users : {
|
|
|
|
usernameMin : 2,
|
|
|
|
usernameMax : 22,
|
|
|
|
passwordMin : 6,
|
2015-04-16 04:46:45 +00:00
|
|
|
requireActivation : true, // require SysOp activation?
|
|
|
|
defaultTheme : 'NU-MAYA',
|
2015-04-15 04:27:07 +00:00
|
|
|
},
|
|
|
|
|
2014-10-17 02:21:06 +00:00
|
|
|
paths : {
|
|
|
|
mods : paths.join(__dirname, './../mods/'),
|
|
|
|
servers : paths.join(__dirname, './servers/'),
|
|
|
|
art : paths.join(__dirname, './../mods/art/'),
|
2014-10-29 11:30:20 +00:00
|
|
|
themes : paths.join(__dirname, './../mods/art/themes/'),
|
2014-10-17 02:21:06 +00:00
|
|
|
logs : paths.join(__dirname, './../logs/'), // :TODO: set up based on system, e.g. /var/logs/enigmabbs or such
|
2014-10-20 05:30:44 +00:00
|
|
|
db : paths.join(__dirname, './../db/'),
|
2014-10-17 02:21:06 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
servers : {
|
|
|
|
telnet : {
|
|
|
|
port : 8888,
|
|
|
|
enabled : true,
|
|
|
|
},
|
|
|
|
ssh : {
|
|
|
|
port : 8889,
|
2015-03-23 04:52:04 +00:00
|
|
|
enabled : true,
|
2014-10-17 02:21:06 +00:00
|
|
|
rsaPrivateKey : paths.join(__dirname, './../misc/default_key.rsa'),
|
|
|
|
dsaPrivateKey : paths.join(__dirname, './../misc/default_key.dsa'),
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|