From 2cb8c4fc10a3468f9937edbb6b0344494a68d2ef Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 12 Dec 2013 23:49:40 +0000 Subject: [PATCH] this is what you get for not modulating properly you shit --- modules/web/web.js | 4 +++- run.js | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/web/web.js b/modules/web/web.js index 267ebb0..b7e47b4 100644 --- a/modules/web/web.js +++ b/modules/web/web.js @@ -82,7 +82,7 @@ var webInterface = function(dbot) { _.extend(one, { 'name': dbot.config.name, 'user': req.user, - 'modules': this.indexLinks + 'routes': this.indexLinks }); resp.render(this.module + '/' + view, one, two); }).bind(this); @@ -106,6 +106,8 @@ var webInterface = function(dbot) { } }.bind(this)); + this.reloadPages(); + this.app.get('/', function(req, res) { res.render('index', { 'name': dbot.config.name, diff --git a/run.js b/run.js index 5367d5d..f1a1683 100644 --- a/run.js +++ b/run.js @@ -306,7 +306,6 @@ DBot.prototype.reloadModules = function() { }.bind(this)); process.nextTick(function() { - if(_.has(this.modules, 'web')) this.modules.web.reloadPages(); _.each(this.modules, function(module, name) { if(module.onLoad) { try {