diff --git a/main.c b/main.c index 65d6474..21f88ed 100644 --- a/main.c +++ b/main.c @@ -103,7 +103,6 @@ } writeLog(0,"Got Data [%s]\n",data); } - writeLog(0,"TimeOut\n"); /* Flush the log file */ fflush(logFile); diff --git a/thread.c b/thread.c index d3a7965..54112df 100644 --- a/thread.c +++ b/thread.c @@ -3,7 +3,7 @@ void *botCMD_Thread(void *threadid) { int tid = 0x0; - int i = 0; + unsigned int i = 0; int tmpVal = 0; short lC = 0x0; char qryStr[256]; @@ -14,7 +14,8 @@ tid = (int)threadid; writeLog(0,"Starting Bot's CMD Thread: [%d]\n", tid); while (1) { - if (connected == 0) { + writeLog(0,"THREAD LOOPED\n"); + if (connected == 0) { sleep(5); if (joinChan == 1) { joinChan = 0; @@ -32,14 +33,14 @@ /* Set Access Level */ tmpVal = atoi(row[1]); if (tmpVal > 0) - sWriteSocket("MSG %s:.tv mode +A %i"row[0],tmpVal); + sWriteSocket("MSG %s:.tv mode +A %i",row[0],tmpVal); else sWriteSocket("MSG %s:.tv mode -A",row[0]); /* Set Classification */ tmpVal = atoi(row[2]); if (tmpVal > 0) - sWriteSocket("MSG %s:.tv mode +C %i"row[0],tmpVal); + sWriteSocket("MSG %s:.tv mode +C %i",row[0],tmpVal); else sWriteSocket("MSG %s:.tv mode -C",row[0]); sprintf(qryStr,"UPDATE channels SET updated = 0 WHERE channel = '%s'",row[0]);