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 config = require("../config");
var Chan = require("./models/chan");
var crypto = require("crypto");
var log = require("./log");
@ -8,6 +7,8 @@ var Msg = require("./models/msg");
var Network = require("./models/network");
var slate = require("slate-irc");
var tls = require("tls");
var Helper = require("./helper");
var config = Helper.getConfig();
module.exports = Client;

View File

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

View File

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

View File

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