diff --git a/bot.c b/bot.c index cd72eeb..183226c 100644 --- a/bot.c +++ b/bot.c @@ -218,8 +218,6 @@ char *chan = 0x0; char *song = 0x0; - writeLog(0,"TESTING"); - if (data == 0x0) return(-1); diff --git a/main.c b/main.c index da6a927..1ded48b 100644 --- a/main.c +++ b/main.c @@ -101,7 +101,7 @@ //exit(1); } else { - writeLog(0,"Got Data [%s]\n",data); + //writeLog(0,"Got Data [%s]\n",data); botProcessData(data); } } @@ -166,10 +166,18 @@ if (data == 0x0) { data = data2; data2 = strtok_r(NULL,"\n",&data_tok); - } + } + + cmd = data; - cmd = strtok_r(data,":",&str_tok); - cmdData = strtok_r(NULL,"\n",&str_tok); + if (strstr(cmd,":")) { + cmd = strtok_r(data,":",&tok_last); + cmddata = strtok_r(NULL,"\n",&tok_last); + tok_last = 0x0; + writeLog(3,"DATA: (%s)CMD: [%s], Data: [%s]\n",data,cmd,cmddata); + } + else + writeLog(3,"DATA: (%s)CMD: [%s]\n",data,cmd); if (cmd == 0x0) return(0x0); diff --git a/thread.c b/thread.c index fadf43d..ea361ef 100644 --- a/thread.c +++ b/thread.c @@ -37,7 +37,6 @@ /* Set Access Level */ tmpVal = atoi(row[1]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_RATING],tmpVal); if (tmpChan->modes[CHAN_RATING] != tmpVal) { if (tmpVal > 0) sWriteSocket("MSG %s:.tv mode +A %i",row[0],tmpVal); @@ -48,7 +47,6 @@ /* Set Classification */ tmpVal = atoi(row[2]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_CLASS],tmpVal); if (tmpChan->modes[CHAN_CLASS] != tmpVal) { if (tmpVal > 0) sWriteSocket("MSG %s:.tv mode +C %i",row[0],tmpVal); @@ -59,7 +57,6 @@ /* Set Random */ tmpVal = atoi(row[3]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_RANDOM],tmpVal); if (tmpChan->modes[CHAN_RANDOM] != tmpVal) { if (tmpVal == 1) sWriteSocket("MSG %s:.tv mode +R",row[0]); @@ -70,7 +67,6 @@ /* Set Queue */ tmpVal = atoi(row[4]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_QUEUE],tmpVal); if (tmpChan->modes[CHAN_QUEUE] != tmpVal) { if (tmpVal == 1) sWriteSocket("MSG %s:.tv mode +Q",row[0]); @@ -81,7 +77,6 @@ /* Set Exclusive */ tmpVal = atoi(row[5]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_EXCLUSIVE],tmpVal); if (tmpChan->modes[CHAN_EXCLUSIVE] != tmpVal) { if (tmpVal == 1) sWriteSocket("MSG %s:.tv mode +E",row[0]); @@ -92,7 +87,6 @@ /* Set Time */ tmpVal = atoi(row[6]); - writeLog(0,"TMP [%i][%i]",tmpChan->modes[CHAN_TIME],tmpVal); if (tmpChan->modes[CHAN_TIME] != tmpVal) { if (tmpVal > 0) sWriteSocket("MSG %s:.tv mode +T %i",row[0],tmpVal);