diff --git a/bot.c b/bot.c index b21e509..28bbd6d 100644 --- a/bot.c +++ b/bot.c @@ -13,7 +13,7 @@ botChanList_t *tmpChan = 0x0; for (tmpChan = chans;tmpChan != 0x0;tmpChan = tmpChan->next) { - if (strcasecmp(tmpChan->channel,channel)) + if (!strcasecmp(tmpChan->channel,channel)) return(tmpChan); } return(0x0); @@ -24,7 +24,7 @@ tmpChan = botFindChan(channel); - if (tmpChan) + if (tmpChan != 0x0) return(tmpChan); writeLog(2,"ADDING CHANNEL: %s\n",channel); diff --git a/thread.c b/thread.c index c82dd59..4e3c514 100644 --- a/thread.c +++ b/thread.c @@ -37,6 +37,7 @@ /* 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);