diff --git a/config.js b/defaults/config.js similarity index 100% rename from config.js rename to defaults/config.js diff --git a/src/clientManager.js b/src/clientManager.js index 9ef422ee..3ea71b71 100644 --- a/src/clientManager.js +++ b/src/clientManager.js @@ -114,6 +114,7 @@ ClientManager.prototype.addUser = function(name, password) { var user = { user: name, password: password || "", + logs: false, networks: [] }; fs.mkdirSync(path); diff --git a/src/command-line/index.js b/src/command-line/index.js index 9fe93095..a5159ef9 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -5,8 +5,6 @@ var mkdirp = require("mkdirp"); var Helper = require("../helper"); program.version(pkg.version, "-v, --version"); -program.option(""); -program.option(" --home ", "home path"); require("./start"); require("./config"); @@ -24,7 +22,7 @@ if (program.home) { var config = Helper.HOME + "/config.js"; if (!fs.existsSync(config)) { mkdirp.sync(Helper.HOME); - fs.writeFileSync(config, fs.readFileSync(__dirname + "/../../config.js")); + fs.writeFileSync(config, fs.readFileSync(__dirname + "/../../defaults/config.js")); } } diff --git a/src/command-line/start.js b/src/command-line/start.js index 7637712d..8a73ca17 100644 --- a/src/command-line/start.js +++ b/src/command-line/start.js @@ -5,6 +5,8 @@ var shout = require("../server"); var Helper = require("../helper"); program + .option("") + .option(" --home " , "home path") .option("-H, --host " , "host") .option("-P, --port " , "port") .option("-B, --bind " , "bind") diff --git a/users/example/user.json b/users/example/user.json deleted file mode 100644 index cc7c7704..00000000 --- a/users/example/user.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "user": "example", - "password": "password", - "log": false, - "networks": [{ - "name": "Freenode", - "host": "irc.freenode.net", - "port": 6697, - "tls": true, - "password": "serverpw", - "nick": "john", - "username": "john", - "realname": "John Doe", - "commands": [ - "/msg NickServ identify password", - "/msg ChanServ op #chan" - ], - "join": "#foo, #bar" - }] -}