diff --git a/acp.js b/acp.js index 659ed9e1..d1424a0e 100644 --- a/acp.js +++ b/acp.js @@ -118,8 +118,6 @@ module.exports = function (Server) { var all = Server.channels; for(var c in all) { var chan = all[c]; - if(!chan) - continue; chans.push({ name: chan.name, diff --git a/api.js b/api.js index 672a0016..89f80006 100644 --- a/api.js +++ b/api.js @@ -162,7 +162,7 @@ module.exports = function (Server) { for(var key in Server.channels) { clist.push(Server.channels[key].name); } - handleChannelData({channel: clist.join(",")}, req, res); + this.handleChannelData({channel: clist.join(",")}, req, res); }, handleLogin: function (params, req, res) { diff --git a/server.js b/server.js index 96f68158..63c208b1 100644 --- a/server.js +++ b/server.js @@ -34,14 +34,14 @@ var Server = { channels: [], channelLoaded: function (name) { for(var i in this.channels) { - if(this.channels[i].name == name) + if(this.channels[i].name.toLowerCase() == name.toLowerCase()) return true; } return false; }, getChannel: function (name) { for(var i in this.channels) { - if(this.channels[i].name == name) + if(this.channels[i].name.toLowerCase() == name.toLowerCase()) return this.channels[i]; } @@ -54,7 +54,7 @@ var Server = { chan.saveDump(); chan.playlist.die(); for(var i in this.channels) { - if(this.channels[i].name == chan.name) { + if(this.channels[i].name.toLowerCase() == chan.name.toLowerCase()) { this.channels.splice(i, 1); break; }