diff --git a/bot.c b/bot.c index 6409897..71e8144 100644 --- a/bot.c +++ b/bot.c @@ -119,6 +119,8 @@ sWriteSocket("TOPIC %s:%s",row[0],row[7]); strcpy(tmpChan->topic,row[7]); + + tmpChan->updated = 1; } } return(0x0); @@ -138,6 +140,9 @@ if (tmpChan == 0x0) return(-1); + if (tmpChan->updated == 0x0) + return(0x0); + mode = strtok(NULL,":"); switch (mode[0]) { case 'A': diff --git a/main.c b/main.c index 3a0c62b..7e1d5d0 100644 --- a/main.c +++ b/main.c @@ -99,9 +99,9 @@ //exit(1); } else { + writeLog(0,"Got Data [%s]\n",data); botProcessData(data); } - writeLog(0,"Got Data [%s]\n",data); } /* Flush the log file */