Move config.js

This commit is contained in:
Mattias Erming 2014-10-14 21:10:09 +02:00
parent 37bc92336f
commit 377e778f5d
5 changed files with 4 additions and 23 deletions

View File

@ -114,6 +114,7 @@ ClientManager.prototype.addUser = function(name, password) {
var user = {
user: name,
password: password || "",
logs: false,
networks: []
};
fs.mkdirSync(path);

View File

@ -5,8 +5,6 @@ var mkdirp = require("mkdirp");
var Helper = require("../helper");
program.version(pkg.version, "-v, --version");
program.option("");
program.option(" --home <path>", "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"));
}
}

View File

@ -5,6 +5,8 @@ var shout = require("../server");
var Helper = require("../helper");
program
.option("")
.option(" --home <path>" , "home path")
.option("-H, --host <ip>" , "host")
.option("-P, --port <port>" , "port")
.option("-B, --bind <ip>" , "bind")

View File

@ -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"
}]
}