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); }