diff --git a/botthread.c b/botthread.c index ec665dd..43fb725 100644 --- a/botthread.c +++ b/botthread.c @@ -250,7 +250,7 @@ if ((tmpChan->modes[CHAN_LIVE] == 0x1) || (tmpChan->vidClass == 7)) return(0x0); - sprintf(output,"SELECT artist,title,file,length,vid,classification,rating FROM videos WHERE rating <= %i",tmpChan->modes[CHAN_RATING]); + sprintf(output,"SELECT artist,title,file,length,vid,classification,rating FROM videos WHERE status = 0 AND rating <= %i",tmpChan->modes[CHAN_RATING]); if (tmpChan->modes[CHAN_EXCLUSIVE]) sprintf(output,"%s AND oid = %i",output,tmpChan->modes[CHAN_EXCLUSIVE]); if (tmpChan->modes[CHAN_CLASS]) @@ -471,7 +471,7 @@ /* Find A Random Song */ getRandom: if (tmpChans->modes[CHAN_RANDOM] == 0x1) { - sprintf(output,"SELECT artist,title,file,length,vid,classification,rating,count FROM videos WHERE rating <= %i",tmpChans->modes[CHAN_RATING]); + sprintf(output,"SELECT artist,title,file,length,vid,classification,rating,count FROM videos WHERE status = 0 AND rating <= %i",tmpChans->modes[CHAN_RATING]); if (tmpChans->modes[CHAN_EXCLUSIVE]) sprintf(output,"%s AND oid = %i",output,tmpChans->oid); //tmpChans->modes[CHAN_EXCLUSIVE]); if (tmpChans->modes[CHAN_CLASS]) diff --git a/nick.c b/nick.c index 1452ebc..08eef30 100644 --- a/nick.c +++ b/nick.c @@ -62,8 +62,11 @@ sSendData(userConnection,output); len = sprintf(output,"MSG:TUveD:STATUS:%s Signed On %s",user->userInfo.username,ctime(&user->signedOn)); output[len -1] = '\0'; - sSendData(userConnection,output); + + sprintf(output,"MSG:TUveD:STATUS:%s Is running %4.2f",user->userInfo.username,user->userInfo.version); + sSendData(userConnection,output); + if (user->userInfo.modes[USER_OVERLORD] == 1) { sprintf(output,"MSG:TUveD:STATUS:%s Is an Evil Overlord",user->userInfo.username); sSendData(userConnection,output); diff --git a/tuve.c b/tuve.c index 050b60a..0c09fe2 100644 --- a/tuve.c +++ b/tuve.c @@ -129,8 +129,10 @@ sSendData(userConnection,"CLIENT:1:Invalid CLIENT"); else if (atof(data) < MIN_VER) sSendData(userConnection,"CLIENT:1:You are running client version %4.2f, our current version is %4.2f. Please upgrade to get the latest features.",atof(data),MIN_VER); - else + else { sSendData(userConnection,"CLIENT:0:SUCCESSFUL"); + userConnection->userInfo.version = atof(data); + } goto Tail; } @@ -247,7 +249,7 @@ sprintf(output,"NICK:%s:%s",userConnection->userInfo.username,data); sSendData(userConnection,output); tuveSendAllInUsersChans(userConnection,output); - sprintf(output,"MSG:TUveD:STATUS:%s is now know as %s",userConnection->userInfo.username,data); + sprintf(output,"MSG:TUveD:STATUS:%s is now known as %s",userConnection->userInfo.username,data); tuveSendAllInUsersChans(userConnection,output); sprintf(userConnection->userInfo.username,data); } diff --git a/tuved.h b/tuved.h index 92bcfed..d75aef2 100644 --- a/tuved.h +++ b/tuved.h @@ -102,6 +102,7 @@ short pfailed; short status; short queue; + float version; long long uid; time_t pong; time_t idle;