Move config.js
This commit is contained in:
parent
37bc92336f
commit
377e778f5d
@ -114,6 +114,7 @@ ClientManager.prototype.addUser = function(name, password) {
|
|||||||
var user = {
|
var user = {
|
||||||
user: name,
|
user: name,
|
||||||
password: password || "",
|
password: password || "",
|
||||||
|
logs: false,
|
||||||
networks: []
|
networks: []
|
||||||
};
|
};
|
||||||
fs.mkdirSync(path);
|
fs.mkdirSync(path);
|
||||||
|
@ -5,8 +5,6 @@ var mkdirp = require("mkdirp");
|
|||||||
var Helper = require("../helper");
|
var Helper = require("../helper");
|
||||||
|
|
||||||
program.version(pkg.version, "-v, --version");
|
program.version(pkg.version, "-v, --version");
|
||||||
program.option("");
|
|
||||||
program.option(" --home <path>", "home path");
|
|
||||||
|
|
||||||
require("./start");
|
require("./start");
|
||||||
require("./config");
|
require("./config");
|
||||||
@ -24,7 +22,7 @@ if (program.home) {
|
|||||||
var config = Helper.HOME + "/config.js";
|
var config = Helper.HOME + "/config.js";
|
||||||
if (!fs.existsSync(config)) {
|
if (!fs.existsSync(config)) {
|
||||||
mkdirp.sync(Helper.HOME);
|
mkdirp.sync(Helper.HOME);
|
||||||
fs.writeFileSync(config, fs.readFileSync(__dirname + "/../../config.js"));
|
fs.writeFileSync(config, fs.readFileSync(__dirname + "/../../defaults/config.js"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ var shout = require("../server");
|
|||||||
var Helper = require("../helper");
|
var Helper = require("../helper");
|
||||||
|
|
||||||
program
|
program
|
||||||
|
.option("")
|
||||||
|
.option(" --home <path>" , "home path")
|
||||||
.option("-H, --host <ip>" , "host")
|
.option("-H, --host <ip>" , "host")
|
||||||
.option("-P, --port <port>" , "port")
|
.option("-P, --port <port>" , "port")
|
||||||
.option("-B, --bind <ip>" , "bind")
|
.option("-B, --bind <ip>" , "bind")
|
||||||
|
@ -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"
|
|
||||||
}]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user