diff --git a/botthread.c b/botthread.c index 0801251..b9ad1a0 100644 --- a/botthread.c +++ b/botthread.c @@ -283,7 +283,7 @@ else { mysql_data_seek(res,(random() % mysql_num_rows(res))); row = mysql_fetch_row(res); - //sprintf(output,"UPDATE media SET count = %i WHERE vid = %s",atoi(row[7])+1,row[4]); + //sprintf(output,"UPDATE videos SET count = %i WHERE vid = %s",atoi(row[7])+1,row[4]); //dbQuery(output,0); tuveBotSetSong(chan,userConnection->userInfo.username,row[0],row[1],atoi(row[3]),row[2],atoi(row[5]),atoi(row[6]),atoi(row[4])); } @@ -308,7 +308,7 @@ tid = (int)threadid; writeLog(0,"Starting Bot Thread: [%d]\n", tid); - res = dbQuery("SELECT count FROM media ORDER BY count ASC LIMIT 1",1); + res = dbQuery("SELECT count FROM videos ORDER BY count ASC LIMIT 1",1); row = mysql_fetch_row(res); if (row) playCnt = atoi(row[0]); @@ -343,7 +343,7 @@ MYSQL_ROW row; char output[256]; - sprintf(output,"SELECT artist,title,file,length,classification,rating,count FROM media WHERE vid = %i",vid); + sprintf(output,"SELECT artist,title,file,length,classification,rating,count FROM videos WHERE vid = %i",vid); res = dbQuery(output,1); @@ -353,7 +353,7 @@ } else { row = mysql_fetch_row(res); - sprintf(output,"UPDATE media SET count = %i WHERE vid = %i",atoi(row[6])+1,vid); + sprintf(output,"UPDATE videos SET count = %i WHERE vid = %i",atoi(row[6])+1,vid); dbQuery(output,0); tuveBotSetSong(chan,nick,row[0],row[1],atoi(row[3]),row[2],atoi(row[4]),atoi(row[5]),vid); } @@ -505,7 +505,7 @@ else { mysql_data_seek(res,(random() % mysql_num_rows(res))); row = mysql_fetch_row(res); - //sprintf(output,"UPDATE media SET count = %i WHERE vid = %s\n",atoi(row[7])+1,row[4]); + //sprintf(output,"UPDATE videos SET count = %i WHERE vid = %s\n",atoi(row[7])+1,row[4]); //dbQuery(output,0); tmpChans->count = MAX_COUNT; tuveBotSetSong(tmpChans->channel,"TUveD",row[0],row[1],atoi(row[3]),row[2],atoi(row[5]),atoi(row[6]),atoi(row[4])); @@ -519,7 +519,7 @@ tmpChans->comDelay = COM_DELAY; getComAgain: - sprintf(output,"SELECT artist,title,file,length,vid,classification,rating,count FROM media WHERE rating <= %i AND classification = 7 AND count <= %i",tmpChans->modes[CHAN_RATING],playCnt); + sprintf(output,"SELECT artist,title,file,length,vid,classification,rating,count FROM videos WHERE rating <= %i AND classification = 7 AND count <= %i",tmpChans->modes[CHAN_RATING],playCnt); res = dbQuery(output,1); if (res == 0x0) { @@ -534,7 +534,7 @@ else { mysql_data_seek(res,(random() % mysql_num_rows(res))); row = mysql_fetch_row(res); - sprintf(output,"UPDATE media SET count = %i WHERE vid = %s\n",atoi(row[7])+1,row[4]); + sprintf(output,"UPDATE videos SET count = %i WHERE vid = %s\n",atoi(row[7])+1,row[4]); dbQuery(output,0); tmpChans->count = MAX_COUNT; tuveBotSetSong(tmpChans->channel,"TUveD",row[0],row[1],atoi(row[3]),row[2],atoi(row[5]),atoi(row[6]),atoi(row[4])); diff --git a/tuved.h b/tuved.h index 690818a..06cef64 100644 --- a/tuved.h +++ b/tuved.h @@ -16,7 +16,7 @@ /* TUved Information */ #define VERSION "v1.93" // Current Version Of Tuved #define NUM_THREADS 1 // Number Of Threads In The Deamon -#define MYPORT 9998 // the port users will be connecting to +#define MYPORT 9999 // the port users will be connecting to #define BACKLOG 10 // how many pending connections queue will hold #define LOG_FILE "./logs/tuved.log" // Default Log File #define PING_INTERVAL 20 // Interval For Pings @@ -30,10 +30,10 @@ #define CHAN_LIVE_LENGTH 128 /* MySQL Information */ -#define MYSQL_HOST_NAME "localhost" // MySQL Server Hostname +#define MYSQL_HOST_NAME "10.3.250.13" // MySQL Server Hostname #define MYSQL_USERNAME "tuve" // MySQL Server Username #define MYSQL_PASSWORD "5558585" // MySQL Server Password -#define MYSQL_DB_NAME "biz" // MySQL Server Database Name +#define MYSQL_DB_NAME "tuve" // MySQL Server Database Name #define VIDE_PAD_TIME 2 // Video Padding To Ensure All Users Are In Sync #define MIN_VER 2.7 // Minimum Client Version