diff --git a/channel.c b/channel.c index aa2df9c..5e3ae85 100644 --- a/channel.c +++ b/channel.c @@ -64,7 +64,7 @@ return(0x1); } /* End tuveChanPart(); */ -int tuveChanLive(const char *channel,const char *stream) { +int tuveChanLive(const char *channel,const char *stream,const char *location) { tuveChanList_t *tmpChan = 0x0; char output[256]; @@ -80,7 +80,8 @@ tmpChan->modes[CHAN_LIVE] = 0x1; - sprintf(output,"CURPOS:%s:-1:%s:Live Stream:0:0",tmpChan->channel,stream); + //sprintf(output,"CURPOS:%s:-1:%s:Live Stream:0:0",tmpChan->channel,stream); + sprintf(output,"LIVE:%s:%s",location,stream); tuveSendAllInChan(channel,0x0,output); return(0x0); } /* End int tuveChanLive(channel,stream) */ @@ -132,7 +133,8 @@ assert(tmpChan); if (tmpChan->modes[CHAN_LIVE] == 1) { - sSendData(userConnection,"CURPOS:%s:-1:%s:Live Stream:0:0",tmpChan->channel,tmpChan->liveStream); + //sSendData(userConnection,"CURPOS:%s:-1:%s:Live Stream:0:0",tmpChan->channel,tmpChan->liveStream); + sSendData(userConnection,"LIVE:1:%s\n",tmpChan->liveStream); } else { sSendData(userConnection,"CURPOS:%s:%i:%s:%s:%i:%i",tmpChan->channel,tmpChan->videoTime - (tmpChan->videoEnd - (time(NULL) + VIDE_PAD_TIME)),tmpChan->videoFile,tmpChan->videoTitle,tmpChan->videoTime,tmpChan->vid); diff --git a/tuve.c b/tuve.c index 2143a34..6e50c85 100644 --- a/tuve.c +++ b/tuve.c @@ -331,13 +331,15 @@ if (data != 0x0) { tok_last = 0x0; chan = strtok_r(data,":",&tok_last); - msg = strtok_r(NULL,"\n",&tok_last); + msg = strtok_r(NULL,":",&tok_last); + nick = strtok_r(NULL,"\n",&tok_last); if (msg[0] == '0') { + tuveSendAllInChan(chan,0x0,"LIVE:0:DONE"); if (tuveChanResume(chan) == 0x1) sSendData(userConnection,"MSG:TUveD:STATUS:Sorry Invalid Live Parameters"); } else { - if (tuveChanLive(chan,msg) == 0x1) + if (tuveChanLive(chan,msg,nick) == 0x1) sSendData(userConnection,"MSG:TUveD:STATUS:Sorry Invalid Live Parameters."); } } diff --git a/tuved.h b/tuved.h index 9a853c4..f00a8a2 100644 --- a/tuved.h +++ b/tuved.h @@ -160,7 +160,7 @@ int tuveChanList(myConnections_t *userConnection); // Sends Channel List To Provided Users int tuveChanPart(const char *channel,myConnections_t *userConnection); // Parts A User From A Channel 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 tuveChanLive(const char *channel,const char *stream,const char *location); // Starts Live Mode In A Channel int tuveChanJoin(const char *channel,myConnections_t *userConnection); // Joins A Users To A Channel int tuveAddChanToUser(const char *channel,myConnections_t *userConnection); // Adds Chan To User int tuveAddToChanList(const char *channel,myConnections_t *userConnection);