diff --git a/main.c b/main.c index 698cf82..c10ef91 100644 --- a/main.c +++ b/main.c @@ -69,6 +69,9 @@ dbInit(); srandom(time(NULL)); + + pthread_t threads[NUM_THREADS]; + rc = pthread_create(&threads[t], NULL, botCMD_Thread, (void *)t); sConnect(SERVER_HOST,SERVER_PORT); diff --git a/thread.c b/thread.c new file mode 100644 index 0000000..e9cfa38 --- /dev/null +++ b/thread.c @@ -0,0 +1,12 @@ +#include "tuvebot.h" + +void *botCMD_Thread(void *threadid) { + int tid; + + tid = (int)threadid; + writeLog(0,"Starting Bot's CMD Thread: [%d]\n", tid); + while (1) { + sleep(5); + } + pthread_exit(NULL); + } /* End tuveCMD_Thread() */ \ No newline at end of file