From d1ee1892082b65129614057bf5b64d53fa4994e6 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 15 Aug 2015 15:41:40 +0100 Subject: [PATCH] fixed cap error and requires list --- lib/channel.js | 2 ++ lib/list.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/channel.js b/lib/channel.js index 197eddfb9..ff39ba3b5 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -1,3 +1,5 @@ +var List = require("./list.js").List; + exports.Channel = function(name, server, type, id, isPrivate){ if(!type){ //there's no second argument diff --git a/lib/list.js b/lib/list.js index 56fc808a0..cc403ab6e 100644 --- a/lib/list.js +++ b/lib/list.js @@ -21,7 +21,7 @@ exports.List.prototype.add = function( child ) { function addChild(child){ - if(self.length() > cap){ + if(self.length() > self.cap){ self.splice(0, 1); }