From a50015867bd76151acac7e00661955d046e2a9ab Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 16 Jun 2014 15:13:43 +0200 Subject: [PATCH] Remove 'messages' from config --- client/index.html | 2 +- config.js | 1 - lib/models/chan.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/index.html b/client/index.html index 51ccfa97..6fc386f7 100644 --- a/client/index.html +++ b/client/index.html @@ -79,7 +79,7 @@
- {{#equal <%= messages %> messages.length}} + {{#equal 100 messages.length}} diff --git a/config.js b/config.js index 46c4a4e9..3bffbdf7 100644 --- a/config.js +++ b/config.js @@ -5,7 +5,6 @@ module.exports = { nick: "shout-user", realname: "http://github.com/erming/shout", }, - messages: 100, networks: [{ host: "irc.freenode.org", port: 6667, diff --git a/lib/models/chan.js b/lib/models/chan.js index 7a6d3205..45145398 100644 --- a/lib/models/chan.js +++ b/lib/models/chan.js @@ -45,6 +45,6 @@ Chan.prototype.sortUsers = function() { Chan.prototype.toJSON = function() { var clone = _.clone(this); clone.count = clone.messages.length; - clone.messages = clone.messages.slice(-1 * (config.messages || 0)); + clone.messages = clone.messages.slice(-100); return clone; };