diff --git a/botthread.c b/botthread.c index ed44259..f3e4ac3 100644 --- a/botthread.c +++ b/botthread.c @@ -10,18 +10,20 @@ char output[512]; char *cmd = 0x0; char *cmdData = 0x0; + tuveChanList_t *tmpChan = 0x0; cmd = strtok(data," "); cmdData = strtok(NULL,"\n"); - if (strcasecmp(cmd,"setvid") == 0x0) { - sprintf(output,"CURPOS:1:%s\n",cmdData); - tuveSendAllInChan(chan,0x0,output); - } - else if (strcasecmp(cmd,"echo") == 0x0) { + if (strcasecmp(cmd,"echo") == 0x0) { sprintf(output,"CHANMSG:TUveBOT:%s:%s\n",chan,cmdData); tuveSendAllInChan(chan,0x0,output); } + else if (strcasecmp(cmd,"skip") == 0x0) { + tmpChan = findChan(cmdData); + if (tmpChan != 0x0) + tmpChan->songEnd = 0x0; + } return(0x0); } @@ -87,7 +89,7 @@ tuveChanList_t *tmpChan; char output[1024]; - sprintf(output,"CURPOS:1:%s:%s\n",file,title); + sprintf(output,"CURPOS:0:%s:%s\n",file,title); writeLog(0,"[%s][%s]\n",output,chan); tuveSendAllInChan(chan,0x0,output); sprintf(output,"CHANMSG:@TUveBOT:%s:Now Playing %s @ %sSeconds Long\n",chan,title,playTime);