diff --git a/botthread.c b/botthread.c index 2ecba77..a1df256 100644 --- a/botthread.c +++ b/botthread.c @@ -250,11 +250,12 @@ tid = (int)threadid; writeLog(0,"Starting Bot Thread: [%d]\n", tid); - +/* res = dbQuery("SELECT count FROM videos ORDER BY count ASC LIMIT 1",1); row = mysql_fetch_row(res); playCnt = atoi(row[0]); mysql_free_result(res); +*/ while (1) { sleep(5); @@ -422,12 +423,14 @@ //sprintf(output,"SELECT artist,title,file,length,vid,classification,rating,count FROM videos WHERE rating <= %i AND classification = %i AND count <= %i",tmpChans->modes[CHAN_RATING],tmpChans->modes[CHAN_CLASS],playCnt); res = dbQuery(output,1); if (res == 0x0) { - sprintf(output,"MSG:TUveD:%s:Sorry I'm Have SQL Troubles Today.",tmpChans->channel); + sprintf(output,"MSG:TUveD:%s:Sorry I'm Having SQL Troubles Today.",tmpChans->channel); tuveSendAllInChan(tmpChans->channel,0x0,output); } else if (mysql_num_rows(res) == 0x0) { - playCnt++; - goto getRandom; + sprintf(output,"MSG:TUveD:%s:Sorry Videos Matching The Channels Settings.",tmpChans->channel); + tuveSendAllInChan(tmpChans->channel,0x0,output); + //playCnt++; + //goto getRandom; } else { mysql_data_seek(res,(random() % mysql_num_rows(res)));