Always go through the Helper object to load config

This commit is contained in:
Shell Turner 2014-10-01 17:59:35 +02:00
parent b91276c7da
commit 7e4534afa9
4 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,4 @@
var _ = require("lodash"); var _ = require("lodash");
var config = require("../config");
var Chan = require("./models/chan"); var Chan = require("./models/chan");
var crypto = require("crypto"); var crypto = require("crypto");
var log = require("./log"); var log = require("./log");
@ -8,6 +7,8 @@ var Msg = require("./models/msg");
var Network = require("./models/network"); var Network = require("./models/network");
var slate = require("slate-irc"); var slate = require("slate-irc");
var tls = require("tls"); var tls = require("tls");
var Helper = require("./helper");
var config = Helper.getConfig();
module.exports = Client; module.exports = Client;

View File

@ -1,7 +1,8 @@
var config = require("../../config");
var ClientManager = new require("../clientManager"); var ClientManager = new require("../clientManager");
var program = require("commander"); var program = require("commander");
var shout = require("../server"); var shout = require("../server");
var Helper = require("../helper");
var config = Helper.getConfig();
program program
.option("-H, --host <ip>", "host") .option("-H, --host <ip>", "host")

View File

@ -1,8 +1,8 @@
var config = require("../config");
var fs = require("fs"); var fs = require("fs");
var mkdirp = require("mkdirp"); var mkdirp = require("mkdirp");
var moment = require("moment"); var moment = require("moment");
var Helper = require("./helper"); var Helper = require("./helper");
var config = Helper.getConfig();
module.exports = { module.exports = {
write: function(user, network, chan, msg) { write: function(user, network, chan, msg) {

View File

@ -2,11 +2,11 @@ var _ = require("lodash");
var bcrypt = require("bcrypt"); var bcrypt = require("bcrypt");
var Client = require("./client"); var Client = require("./client");
var ClientManager = require("./clientManager"); var ClientManager = require("./clientManager");
var config = require("../config");
var express = require("express"); var express = require("express");
var fs = require("fs"); var fs = require("fs");
var io = require("socket.io"); var io = require("socket.io");
var Helper = require("./helper"); var Helper = require("./helper");
var config = Helper.getConfig();
var sockets = null; var sockets = null;
var manager = new ClientManager(); var manager = new ClientManager();