diff --git a/botthread.c b/botthread.c index 4813ef3..dbc1aaf 100644 --- a/botthread.c +++ b/botthread.c @@ -21,6 +21,7 @@ MYSQL_RES *res = 0x0; MYSQL_ROW row; short dM = 0x0; + char dMS[2] = {'-','+'}; unsigned int i = 0x0; if (data == 0x0) @@ -33,6 +34,12 @@ sprintf(output,"MSG:TUveD:%s:%s\n",chan,cmdData); tuveSendAllInChan(chan,0x0,output); } + else if (strcasecmp(cmd,"pause") == 0x0) { + tuveSendAllInChan(chan,0x0,"PAUSE"); + } + else if (strcasecmp(cmd,"resume") == 0x0) { + tuveSendAllInChan(chan,0x0,"RESUME\n"); + } else if (strcasecmp(cmd,"skip") == 0x0) { if (cmdData != 0x0) tmpChan = findChan(cmdData); @@ -48,17 +55,16 @@ tmp = strtok_r(cmdData," ",&tok_last); tmp2 = strtok_r(NULL,"\n",&tok_last); if ((tmp != 0x0) & (tmp2 != 0x0)) { - sprintf(output,"SELECT username FROM users WHERE username = '%s' AND pass = '%s'",tmp,tmp2); + sprintf(output,"SELECT username FROM users WHERE username = '%s' AND password = '%s'",tmp,tmp2); res = dbQuery(output); if (res == 0x0) { sSendData(userConnection,"MSG:TUveD:STATUS:Sorry I'm Having MySQL Troubles.\n"); } else if (mysql_num_rows(res) == 1) { - //sprintf(output,); sSendData(userConnection,"MSG:TUveD:%s:You have successfully logged in.\n",chan); sprintf(output,"EMOTE:%s:STATUS:Is now an Evil Overlord!\n",userConnection->userInfo.username); tuveSendAllInUsersChans(userConnection,output); - userConnection->userInfo.mode = 1; + userConnection->userInfo.modes[USER_OVERLORD] = 1; } else { //sprintf(output,); @@ -71,7 +77,7 @@ else if (strcasecmp(cmd,"mode") == 0x0) { tmpChan = findChan(chan); - if (userConnection->userInfo.mode != 1) { + if (tuveFindChanLevel(chan,userConnection,0) != 1) { sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to set channel mode\n"); return(0x0); } @@ -91,6 +97,25 @@ for (i = 1;i < strlen(modeString);i++) { switch(modeString[i]) { + case '-': + dM = 0; + break; + case '+': + dM = 1; + break; + case 'o': + case 'O': + tmp = strtok_r(NULL," ",&tok_last); + if (tmp != 0x0) { + if (tuveChanOp(chan,tmp,dM) == 0x0) { + sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cO %s\n",chan,userConnection->userInfo.username,dMS[dM],tmp); + tuveSendAllInChan(chan,0x0,output); + } + } + else { + sSendData(userConnection,"MSG:TUveD:STATUS:Missing +O Opperators\n"); + } + break; case 'a': case 'A': tmp = strtok_r(NULL," ",&tok_last); @@ -109,10 +134,18 @@ tuveSendAllInChan(chan,0x0,output); } break; + case 'e': + case 'E': + tmpChan->modes[CHAN_EXCLUSIVE] = dM; + sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cExclusive\n",chan,userConnection->userInfo.username,dMS[dM]); + tuveSendAllInChan(chan,0x0,output); + sprintf(output,"MODE:%s:E:%i\n",tmpChan->channel,dM); + tuveSendAllInChan(chan,0x0,output); + break; case 'r': case 'R': tmpChan->modes[CHAN_RANDOM] = dM; - sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cRandom\n",chan,userConnection->userInfo.username,modeString[0]); + sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cRandom\n",chan,userConnection->userInfo.username,dMS[dM]); tuveSendAllInChan(chan,0x0,output); sprintf(output,"MODE:%s:R:%i\n",tmpChan->channel,dM); tuveSendAllInChan(chan,0x0,output); @@ -120,7 +153,7 @@ case 'q': case 'Q': tmpChan->modes[CHAN_QUEUE] = dM; - sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cQueue\n",chan,userConnection->userInfo.username,modeString[0]); + sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cQueue\n",chan,userConnection->userInfo.username,dMS[dM]); tuveSendAllInChan(chan,0x0,output); sprintf(output,"MODE:%s:Q:%i\n",tmpChan->channel,dM); tuveSendAllInChan(chan,0x0,output); @@ -140,7 +173,7 @@ } else { tmpChan->modes[CHAN_TIME] = dM; - sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cTime Limit\n",chan,userConnection->userInfo.username,modeString[0]); + sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cTime Limit\n",chan,userConnection->userInfo.username,dMS[dM]); tuveSendAllInChan(chan,0x0,output); sprintf(output,"MODE:%s:T:%i\n",tmpChan->channel,dM); tuveSendAllInChan(chan,0x0,output); @@ -156,7 +189,7 @@ } } else if (strcasecmp(cmd,"random") == 0x0) { - if (userConnection->userInfo.mode != 1) { + if (userConnection->userInfo.modes[USER_OVERLORD] != 1) { sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to play a random song.\n"); return(0x0); } @@ -165,7 +198,7 @@ if (tmpChan->modes[CHAN_LIVE] == 0x1) return(0x0); - sprintf(output,"SELECT artist,title,file,length,vid FROM videos WHERE rating <= %i AND class = %i",tmpChan->modes[CHAN_RATING],tmpChan->modes[CHAN_CLASS]); + sprintf(output,"SELECT artist,title,file,length,vid,classification,rating FROM videos WHERE rating <= %i AND classification = %i",tmpChan->modes[CHAN_RATING],tmpChan->modes[CHAN_CLASS]); res = dbQuery(output); if ((res == 0x0) || (mysql_num_rows(res) == 0x0)) { sprintf(output,"MSG:TUveD:%s:Sorry I'm Have SQL Troubles Today.\n",chan); @@ -174,7 +207,7 @@ else { mysql_data_seek(res,(random() % mysql_num_rows(res))); row = mysql_fetch_row(res); - tuveBotSetSong(chan,userConnection->userInfo.username,row[0],row[1],atoi(row[3]),row[2],atoi(row[4])); + tuveBotSetSong(chan,userConnection->userInfo.username,row[0],row[1],atoi(row[3]),row[2],atoi(row[5]),atoi(row[6]),atoi(row[4])); } } @@ -256,7 +289,7 @@ /* Find A Random Song */ getRandom: if (tmpChans->modes[CHAN_RANDOM] == 0x1) { - sprintf(output,"SELECT artist,title,file,length,vid FROM videos WHERE rating <= %i AND class = %i",tmpChans->modes[CHAN_RATING],tmpChans->modes[CHAN_CLASS]); + sprintf(output,"SELECT artist,title,file,length,vid,classification,rating FROM videos WHERE rating <= %i AND classification = %i",tmpChans->modes[CHAN_RATING],tmpChans->modes[CHAN_CLASS]); res = dbQuery(output); if ((res == 0x0) || (mysql_num_rows(res) == 0x0)) { sprintf(output,"MSG:TUveD:%s:Sorry I'm Have SQL Troubles Today.\n",tmpChans->channel); @@ -266,7 +299,7 @@ mysql_data_seek(res,(random() % mysql_num_rows(res))); row = mysql_fetch_row(res); tmpChans->count = -1; - tuveBotSetSong(tmpChans->channel,"TUveD",row[0],row[1],atoi(row[3]),row[2],atoi(row[4])); + tuveBotSetSong(tmpChans->channel,"TUveD",row[0],row[1],atoi(row[3]),row[2],atoi(row[5]),atoi(row[6]),atoi(row[4])); } } /* End Of Finding A Random Song */ @@ -289,7 +322,8 @@ MYSQL_ROW row; char output[256]; - sprintf(output,"SELECT artist,title,file,length FROM videos WHERE vid = %i",vid); + sprintf(output,"SELECT artist,title,file,length,classification,rating FROM videos WHERE vid = %i",vid); + res = dbQuery(output); if ((res == 0x0) || (mysql_num_rows(res) == 0x0)) { @@ -298,13 +332,13 @@ } else { row = mysql_fetch_row(res); - tuveBotSetSong(chan,nick,row[0],row[1],atoi(row[3]),row[2],vid); + tuveBotSetSong(chan,nick,row[0],row[1],atoi(row[3]),row[2],atoi(row[4]),atoi(row[5]),vid); } return(0x0); } int -tuveBotSetSong(char *channel,char *nick,char *artist,char *title,int length,char *file,int vid) { +tuveBotSetSong(char *channel,char *nick,char *artist,char *title,int length,char *file,int class,int rating,int vid) { tuveChanList_t *tmpChan; char output[1024]; @@ -320,6 +354,11 @@ return(0x0); } } + if (tmpChan->modes[CHAN_RATING] < rating) + return(0x0); + + if ((tmpChan->modes[CHAN_CLASS] != class) && (tmpChan->modes[CHAN_CLASS] != 0x0)) + return(0x0); min = length / 60; sec = length % 60; diff --git a/channel.c b/channel.c index f5ada7d..076d6de 100644 --- a/channel.c +++ b/channel.c @@ -121,10 +121,10 @@ } } - if (tuveAddChan(channel,userConnection) != 0x0) return(0x1); + if (tuveAddChanToUser(channel,userConnection) != 0x0) return(0x1); /* Send JOIN to all users in the channel */ - sprintf(output,"JOIN:%s:%s\n",channel,userConnection->userInfo.username); + sprintf(output,"JOIN:%s:%s:%lld\n",channel,userConnection->userInfo.username,userConnection->userInfo.uid); tuveSendAllInChan(channel,userConnection,output); tmpChan = findChan(channel); @@ -174,13 +174,13 @@ return(0x0); } -int tuveAddChan(const char *channel,myConnections_t *userConnection) { +int tuveAddChanToUser(const char *channel,myConnections_t *userConnection) { tuveUserChans_t *tmpChan = 0x0; if (userConnection->userInfo.chans == 0x0) { userConnection->userInfo.chans = (tuveUserChans_t *)calloc(1,sizeof(tuveUserChans_t)); - userConnection->userInfo.chans->prev = 0x0; - userConnection->userInfo.chans->next = 0x0; + userConnection->userInfo.chans->prev = 0x0; + userConnection->userInfo.chans->next = 0x0; sprintf(userConnection->userInfo.chans->channel,channel); } else { @@ -274,10 +274,11 @@ int tuveAddToChanList(const char *channel,myConnections_t *userConnection) { tuveChanList_t *tmpChannel = 0x0; - tuveUserList_t *tmpUsers = 0x0; + tuveUserList_t *tmpUser = 0x0; int deltaTime, day, hour, min, sec; char output[1024]; + char nick[MAX_USER_LEN + 1]; //mji char topicTime[1024]; tmpChannel = findChan(channel); @@ -285,50 +286,56 @@ // tmpChannel is okay to be null here if (tmpChannel == 0x0) { - writeLog(2,"Channel %s does not exist adding to list\n",channel); + writeLog(2,"Channel %s does not exist creating now.\n",channel); tmpChannel = addChan(channel); } - for (tmpUsers = tmpChannel->users;tmpUsers != 0x0;tmpUsers = tmpUsers->next) { - if (!strcasecmp(tmpUsers->user->userInfo.username,userConnection->userInfo.username)) { + for (tmpUser = tmpChannel->users;tmpUser != 0x0;tmpUser = tmpUser->next) { + if (!strcasecmp(tmpUser->user->userInfo.username,userConnection->userInfo.username)) { writeLog(2,"User: %s already in channel %s\n",userConnection->userInfo.username,channel); return(0x0); } } - tmpUsers = (tuveUserList_t *)calloc(1,sizeof(tuveUserList_t)); + tmpUser = (tuveUserList_t *)calloc(1,sizeof(tuveUserList_t)); - tmpUsers->user = userConnection; - tmpUsers->prev = 0x0; + tmpUser->user = userConnection; + tmpUser->prev = 0x0; pthread_mutex_lock(&chanMutex); if (tmpChannel->users == 0x0) { - tmpUsers->next = 0x0; - tmpChannel->users = tmpUsers; + tmpUser->next = 0x0; + tmpUser->chanLevel = 0x1; + tmpChannel->users = tmpUser; } else { - tmpUsers->next = tmpChannel->users; - tmpChannel->users->prev = tmpUsers; - tmpChannel->users = tmpUsers; + tmpUser->next = tmpChannel->users; + tmpUser->chanLevel = 0x0; + tmpChannel->users->prev = tmpUser; + tmpChannel->users = tmpUser; } if (tmpChannel->nextUser == 0x0) { - tmpChannel->nextUser = tmpUsers; + tmpChannel->nextUser = tmpUser; tmpChannel->count = 0x0; } tmpChannel->userCount++; memset(output,0x0,256); - //sprintf(output,"JOIN:%s:@TUveBOT",tmpChannel->channel); /* Send the new user the channel list */ - for (tmpUsers = tmpChannel->users;tmpUsers != 0x0;tmpUsers = tmpUsers->next) { - if (strlen(output) > 0) - sprintf(output,"%s:%s",output,tmpUsers->user->userInfo.username); + for (tmpUser = tmpChannel->users;tmpUser != 0x0;tmpUser = tmpUser->next) { + if (tmpUser->chanLevel == 0) + strcpy(nick,tmpUser->user->userInfo.username); else - sprintf(output,"JOIN:%s:%s",tmpChannel->channel,tmpUsers->user->userInfo.username); + sprintf(nick,"&%s",tmpUser->user->userInfo.username); + + if (strlen(output) > 0) + sprintf(output,"%s:%s:%lld",output,nick,tmpUser->user->userInfo.uid); //tmpUser->user->userInfo.username); + else + sprintf(output,"JOIN:%s:%s:%lld",tmpChannel->channel,nick,tmpUser->user->userInfo.uid); //tmpUser->user->userInfo.username); } if (strlen(output) > 0) { @@ -562,7 +569,7 @@ return(0x0); } -int tuveBan(const char *channel,const char *nick,int length) { +int tuveBan(myConnections_t *byConnection,const char *channel,const char *nick,int length) { char output[1024]; tuveChanList_t *tmpChannel = 0x0; myConnections_t *userConnection = 0x0; @@ -571,10 +578,15 @@ tmpChannel = findChan(channel); if (tmpChannel == 0x0) { - writeLog(1,"findchan Failed: Ban\n"); + writeLog(1,"findChan Failed: Ban\n"); return(0x1); } + if (tuveFindChanLevel(channel,byConnection,0) < 1) { + sSendData(byConnection,"MSG:TUveD:STATUS:You do not have permission to ban.\n"); + return(0x0); + } + userConnection = findNick(nick); if (userConnection == 0x0) { @@ -660,8 +672,8 @@ } myConnections_t *findNickOnChan(const char *nick,const char *channel) { - tuveChanList_t *tmpChannel = 0x0; - tuveUserList_t *tmpUser = 0x0; + tuveChanList_t *tmpChannel = 0x0; + tuveUserList_t *tmpUser = 0x0; tmpChannel = findChan(channel); if (tmpChannel == 0x0) @@ -673,3 +685,42 @@ } return(0x0); } + +int tuveFindChanLevel(const char *channel,myConnections_t *userConnection,int eo) { + tuveChanList_t *tmpChannel = 0x0; + tuveUserList_t *tmpUser = 0x0; + + if ((userConnection->userInfo.modes[USER_OVERLORD] == 1) && (eo != 1)) + return(0x1); + + tmpChannel = findChan(channel); + if (tmpChannel == 0x0) + return(0x0); + + for (tmpUser = tmpChannel->users;tmpUser != 0x0;tmpUser = tmpUser->next) { + if (tmpUser->user == userConnection) + return(tmpUser->chanLevel); + } + return(-1); + } + +int tuveChanOp(const char *channel,const char *nick,int level) { + tuveChanList_t *tmpChannel = 0x0; + tuveUserList_t *tmpUser = 0x0; + char output[512]; + + tmpChannel = findChan(channel); + if (tmpChannel == 0x0) + return(0x1); + + writeLog(3,"Looking for %s on %s\n",nick,channel); + for (tmpUser = tmpChannel->users;tmpUser != 0x0;tmpUser = tmpUser->next) { + if (!strcasecmp(tmpUser->user->userInfo.username,nick)) { + tmpUser->chanLevel = level; + sprintf(output,"MODE:%s:O:%i:%s\n",tmpChannel->channel,level,tmpUser->user->userInfo.username); + tuveSendAllInChan(channel,0x0,output); + return(0x0); + } + } + return(0x1); + } diff --git a/nick.c b/nick.c index 79f94ac..6913ad3 100644 --- a/nick.c +++ b/nick.c @@ -44,6 +44,7 @@ myConnections_t *user = 0x0; tuveUserChans_t *chans = 0x0; char output[256]; + char channel[MAX_CHAN_LEN + 1]; if (strlen(nick) > MAX_USER_LEN) return(0x0); @@ -60,7 +61,7 @@ sSendData(userConnection,output); sprintf(output,"MSG:TUveD:STATUS:%s Signed On %s",user->userInfo.username,ctime(&user->signedOn)); sSendData(userConnection,output); - if (user->userInfo.mode == 1) { + if (user->userInfo.modes[USER_OVERLORD] == 1) { sprintf(output,"MSG:TUveD:STATUS:%s Is an Evil Overlord\n",user->userInfo.username); sSendData(userConnection,output); } @@ -72,10 +73,16 @@ if (user->userInfo.chans != 0x0) { memset(output,0x0,256); for (chans = user->userInfo.chans;chans != 0x0;chans = chans->next) { - if (strlen(output) == 0) - sprintf(output,"MSG:TUveD:STATUS:%s Is on channels %s",user->userInfo.username,chans->channel); + + if (tuveFindChanLevel(chans->channel,user,1) == 0) + strcpy(channel,chans->channel); else - sprintf(output,"%s,%s",output,chans->channel); + sprintf(channel,"&%s",chans->channel); + + if (strlen(output) == 0) + sprintf(output,"MSG:TUveD:STATUS:%s Is on channel(s) %s",user->userInfo.username,channel); + else + sprintf(output,"%s,%s",output,channel); } sprintf(output,"%s\n",output); sSendData(userConnection,output); diff --git a/tuve.c b/tuve.c index 8e0ac0d..298f901 100644 --- a/tuve.c +++ b/tuve.c @@ -134,11 +134,19 @@ if (data != 0x0) { chan = strtok_r(data,":",&tok_last); msg = strtok_r(NULL,"\n",&tok_last); + + if (msg == 0x0) + return(0x0); + if (chan[0] != '#') { - tmpConnection = findNick(chan); - if (tmpConnection != 0x0) { - sprintf(output,"MSG:%s:PRIVMSG:%s\n",userConnection->userInfo.username,msg); - sSendData(tmpConnection,output); + if ((strlen(msg) > 2) && (msg[0] == '.' && msg[1] == 't' && msg[2] == 'v')) + tuveBotCMD(userConnection,chan,msg+3); + else { + tmpConnection = findNick(chan); + if (tmpConnection != 0x0) { + sprintf(output,"MSG:%s:PRIVMSG:%s\n",userConnection->userInfo.username,msg); + sSendData(tmpConnection,output); + } } } else if (tuveVerifyBan(chan,userConnection->userInfo.username) == 0x1) { @@ -205,7 +213,7 @@ else if (strcasecmp(cmd,"KICK") == 0x0) { tok_last = 0x0; - if (userConnection->userInfo.mode != 1) { + if (userConnection->userInfo.modes[USER_OVERLORD] != 1) { sSendData(userConnection,"MSG:TUveD:KICK:You do not have permission to kick!\n"); } else { @@ -257,22 +265,19 @@ tuveStatus(userConnection); } else if (strcasecmp(cmd,"BAN") == 0x0) { - if (userConnection->userInfo.mode != 1) { - sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to ban.\n"); - } - else if (data != 0x0) { + if (data != 0x0) { tok_last = 0x0; chan = strtok_r(data,":",&tok_last); nick = strtok_r(NULL,":",&tok_last); msg = strtok_r(NULL,"\n",&tok_last); if (msg != 0x0) - tuveBan(chan,nick,atoi(msg)); - else - tuveBan(chan,nick,600); + tuveBan(userConnection,chan,nick,atoi(msg)); + else + tuveBan(userConnection,chan,nick,600); } } else if (strcasecmp(cmd,"UNBAN") == 0x0) { - if (userConnection->userInfo.mode != 1) { + if (userConnection->userInfo.modes[USER_OVERLORD] != 1) { sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to unban.\n"); } else if (data != 0x0) { diff --git a/tuved.h b/tuved.h index dad5f20..4dc1d93 100644 --- a/tuved.h +++ b/tuved.h @@ -22,7 +22,8 @@ #define MAX_COUNT 2 #define MAX_TOPIC_LEN 128 #define MAX_CHAN_LEN 32 -#define MAX_USER_LEN 32 +#define MAX_USER_LEN 32 +#define MAX_USER_AWAYMSG 128 #define VERSION "v0.40" #define MYSQL_HOST_NAME "ubuse.ubixos.com" #define MYSQL_USERNAME "tuve" @@ -30,22 +31,29 @@ #define MYSQL_DB_NAME "tuve" #define VIDE_PAD_TIME 2 // Time Added To Video End To Ensure All Are In Sync +/* User Defs */ +#define USER_MODES 2 // Count Of User Modes +#define USER_OVERLORD 0 // User Is An Overlord +#define USER_AWAY 1 // User Is Away + #define CHAN_MAX_BANS 30 #define CHAN_LIVE_LENGTH 128 /* Cannel Modes */ -#define CHAN_MODES 6 // Count Of Channel Modes +#define CHAN_MODES 7 // Count Of Channel Modes #define CHAN_RANDOM 0 // Random Videos #define CHAN_QUEUE 1 // Users Queues #define CHAN_TIME 2 // Video Time Limit #define CHAN_RATING 3 // Video Parental Rating #define CHAN_CLASS 4 // Video Classs #define CHAN_LIVE 5 // Channel Is In Live Stream Mode +#define CHAN_EXCLUSIVE 6 // Channel Is In Exclusive Mode typedef struct tuveUserList { struct tuveUserList *prev; struct tuveUserList *next; struct myConnections *user; + short chanLevel; } tuveUserList_t; typedef struct tuveChanList { @@ -81,12 +89,13 @@ short ident; short pfailed; short status; - short mode; short queue; long long uid; time_t pong; time_t idle; + char modes[USER_MODES]; char username[MAX_USER_LEN]; + char awayMsg[MAX_USER_AWAYMSG]; tuveUserChans_t *chans; } tuveUser_t; @@ -141,9 +150,11 @@ int tuveChanResume(const char *channel); // Resumes Streaming In A Channel int tuveChanLive(const char *channel,const char *stream); // Starts Live Mode In A Channel int tuveChanJoin(const char *channel,myConnections_t *userConnection); // Joins A Users To A Channel -int tuveAddChan(const char *channel,myConnections_t *userConnection); +int tuveAddChanToUser(const char *channel,myConnections_t *userConnection); // Adds Chan To User int tuveAddToChanList(const char *channel,myConnections_t *userConnection); int tuveSendAllInChan(const char *channel,myConnections_t *userConnection,char *output); +int tuveFindChanLevel(const char *channel,myConnections_t *userConnection,int eo); // Returns Users Channel Level +int tuveChanOp(const char *channel,const char *nick,int level); // Sets Channel Opperator Status int tuveDelUserChans(myConnections_t *userConnection,char *msg); int tuveRemoveFromChanList(const char *channel,myConnections_t *userConnection); int tuveSetTopic(myConnections_t *userConnection,char *chan,char *topic); @@ -151,7 +162,7 @@ int tuveDelChan(const char *channel,myConnections_t *userConnection); int tuveKick(myConnections_t *byConnection,char *chan,char *nick,char *msg); tuveChanList_t *findChan(const char *); -int tuveBan(const char *channel,const char *nick,int length); +int tuveBan(myConnections_t *byConnection,const char *channel,const char *nick,int length); int tuveUnBan(const char *channel,const char *nick); int tuveVerifyBan(const char *channel,const char *nick); myConnections_t *findNickOnChan(const char *nick,const char *channel); @@ -162,7 +173,7 @@ /* Bot Functions */ void *tuveBotThread(void *threadid); int tuveBotCMD(myConnections_t *userConnection,char *chan,char *data); -int tuveBotSetSong(char *channel,char *nick,char *artist,char *title,int length,char *file,int vid); +int tuveBotSetSong(char *channel,char *nick,char *artist,char *title,int length,char *file,int class,int rating,int vid); int tuveBotSetVideo(char *chan,char *nick,int vid); /* * End Bot Functions