More fixes

This commit is contained in:
calzoneman 2013-07-16 12:12:00 -04:00
parent 8b05e6ebcc
commit 9b7ebde551
3 changed files with 4 additions and 6 deletions

2
acp.js
View File

@ -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,

2
api.js
View File

@ -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) {

View File

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