diff --git a/botthread.c b/botthread.c index 0dfd8fe..626390f 100644 --- a/botthread.c +++ b/botthread.c @@ -331,7 +331,6 @@ int nextSong() { char output[1024]; tuveChanList_t *tmpChans; - tuveUserList_t *tmpUser; MYSQL_RES *res = 0x0; MYSQL_ROW row; time_t curTime; @@ -344,8 +343,7 @@ for (tmpChans = channels;tmpChans != 0x0;tmpChans = tmpChans->next) { if ((tmpChans->modes[CHAN_LIVE] == 0x0) && (tmpChans->videoEnd < curTime)) { /* Set point to starting user */ - - tmpUser = tmpChans->nextUser; + findUser: if (tmpChans->modes[CHAN_QUEUE] == 0x0) /* If Channel Has Queues Disabled Jump Right To Random */ @@ -362,6 +360,9 @@ /* Make sure we didn't go beyond the list */ if (tmpChans->nextUser == 0x0) tmpChans->nextUser = tmpChans->users; + + if (tmpChans->nextUser == 0x0) + goto sE; if (tmpChans->nextUser->user->userInfo.queue == 0x1) goto gotUser; @@ -403,7 +404,9 @@ tmpChans->count = MAX_COUNT; goto findUser; } + sE: + asm("nop"); } }