diff --git a/lib/hosting.js b/lib/hosting.js index fc2fd1e..4be3d48 100644 --- a/lib/hosting.js +++ b/lib/hosting.js @@ -132,7 +132,7 @@ exports.chooseChannel = function(team, channel, manualHostLength, preferredGame) async.waterfall([ function(callback) { - if ((!globalVars.isUsingManualChannelList[team] && globalVars.teamLastCheck[team] < moment().unix() - globalVars.teamRecheckLength) || !globalVars.teamChannels[team]) { + if (!globalVars.teamChannels[team] && !globalVars.isUsingManualChannelList[team] && globalVars.teamLastCheck[team] < moment().unix() - globalVars.teamRecheckLength) { // Used to check if the team members have changed or not since the last host (and 1+ hour has passed since the last check). recheckTeamMembers(team, function() {callback(null);}); } @@ -327,7 +327,7 @@ function checkIfChannelFullyHosted(team, channel, chosen, hostEvent, noticeEvent // Gets the online channels for the specific team. function getOnlineChannels(team, callback) { - if (!globalVars.teamChannels) { + if (!globalVars.teamChannels[team]) { twitchAPI.getTeamLiveChannels(team, function(error, errorType, response) { var onlineChannels = [];