Working proxy sockets
[KiwiIRC.git] / server / rehash.js
1 var util = require('util'),
2 events = require('events'),
3 _ = require('lodash');
4
5
6
7 function Rehash() {}
8 util.inherits(Rehash, events.EventEmitter);
9
10 Rehash.prototype.rehashAll = function () {
11 var files = [
12 './client.js',
13 './clientcommands.js',
14 //'./configuration.js',
15 './httphandler.js',
16 './irc/commands.js',
17 './irc/connection.js',
18 './weblistener.js'
19 ];
20
21 _.each(files, function (file) {
22 delete require.cache[require.resolve(file)];
23 require(file);
24 });
25
26 this.emit('rehashed', [files]);
27 };
28
29
30
31 module.exports = new Rehash();