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