Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fix bug with new streamers.
Browse files Browse the repository at this point in the history
  • Loading branch information
roncli committed Nov 16, 2016
1 parent 2914fa9 commit fc69210
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sixgaming.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SixGaming.start = function(_irc, _discord, _twitch) {
results._total = 0; results._total = 0;
} }


// Concate streams and continue getting more streams if necessary. // Concat streams and continue getting more streams if necessary.
streams = streams.concat(results.streams); streams = streams.concat(results.streams);
if (results._total > offset + 100) { if (results._total > offset + 100) {
getStreams(offset + 100); getStreams(offset + 100);
Expand Down Expand Up @@ -715,8 +715,7 @@ SixGaming.ircMessages = {
"update streamer set code = 0, validated = 1 where streamer = @streamer;delete from host where streamer = @streamer", "update streamer set code = 0, validated = 1 where streamer = @streamer;delete from host where streamer = @streamer",
{streamer: {type: db.VARCHAR(50), value: from}}, {streamer: {type: db.VARCHAR(50), value: from}},
function(err, data) { function(err, data) {
var serverChannels = ["six-gaming-info", "live-stream-announcements", "general", "podcast", "podcasters", "sixbotgg"], var users, user, hostIndex;
users, user, hostIndex;


if (err) { if (err) {
SixGaming.ircQueue("Sorry, " + from + ", but the server is currently down. Try later, or get a hold of roncli for fixing."); SixGaming.ircQueue("Sorry, " + from + ", but the server is currently down. Try later, or get a hold of roncli for fixing.");
Expand All @@ -725,7 +724,8 @@ SixGaming.ircMessages = {


users = discord.users.findAll("username", username); users = discord.users.findAll("username", username);
if (users.length !== 0) { if (users.length !== 0) {
user = users.find("discriminator", discriminator); console.log(users[0]);
user = users.find((u) => u.discriminator === discriminator);
} }
if (user) { if (user) {
sixDiscord.member(user).addRole(streamersRole); sixDiscord.member(user).addRole(streamersRole);
Expand Down

0 comments on commit fc69210

Please sign in to comment.