diff --git a/bot.c b/bot.c index cc74241..b21e509 100644 --- a/bot.c +++ b/bot.c @@ -22,10 +22,12 @@ botChanList_t *botAddChan(char *channel) { botChanList_t *tmpChan = 0x0; - tmpChan = findChan(channel); + tmpChan = botFindChan(channel); if (tmpChan) return(tmpChan); + + writeLog(2,"ADDING CHANNEL: %s\n",channel); tmpChan = (botChanList_t *)malloc(sizeof(botChanList_t)); @@ -33,7 +35,7 @@ tmpChan->next = 0x0; tmpChan->prev = 0x0; tmpChan->updated = 0x0; - bzero(tmpChans->modes,CHAN_MODES); + bzero(tmpChan->modes,CHAN_MODES); if (chans == 0x0) chans = tmpChan; @@ -50,7 +52,7 @@ MYSQL_ROW row; unsigned int i = 0x0; int tmpVal = 0; - botChanList_t *tmpChan = 0x0' + botChanList_t *tmpChan = 0x0; res = dbQuery("SELECT channel,rating,classification,random,queue,exclusive,time,topic FROM channels",1); diff --git a/thread.c b/thread.c index 71fa244..c82dd59 100644 --- a/thread.c +++ b/thread.c @@ -78,7 +78,7 @@ /* Set Exclusive */ tmpVal = row[5][0]; if (tmpChan->modes[CHAN_EXCLUSIVE] != tmpVal) { - if (tmpVale == '1') + if (tmpVal == '1') sWriteSocket("MSG %s:.tv mode +E",row[0]); else sWriteSocket("MSG %s:.tv mode -E",row[0]); @@ -95,9 +95,9 @@ tmpChan->modes[CHAN_TIME] = tmpVal; } - if (strcmp(tmpChans->topic,row[7])) { + if (strcmp(tmpChan->topic,row[7])) { sWriteSocket("TOPIC %s:%s",row[0],row[7]); - strcpy(tmpChans->topic,row[7]); + strcpy(tmpChan->topic,row[7]); } sprintf(qryStr,"UPDATE channels SET updated = 0 WHERE channel = '%s'",row[0]); diff --git a/tuvebot.h b/tuvebot.h index 9c0f993..8c291a5 100644 --- a/tuvebot.h +++ b/tuvebot.h @@ -43,8 +43,8 @@ #define CHAN_EXCLUSIVE 6 // Channel Is In Exclusive Mode typedef struct botChanList { - struct tuveChanList *prev; - struct tuveChanList *next; + struct botChanList *prev; + struct botChanList *next; char modes[CHAN_MODES]; char topic[MAX_TOPIC_LEN]; char channel[MAX_CHAN_LEN]; @@ -58,7 +58,6 @@ int recLen; char data[1024]; char host[128]; - tuveUser_t userInfo; time_t signedOn; } myConnections_t; @@ -96,7 +95,6 @@ int tuveSendAllInUsersChans(myConnections_t *userConnection,char *output); int tuveDelChan(const char *channel,myConnections_t *userConnection); int tuveKick(char *by,char *chan,char *nick,char *msg); -tuveChanList_t *findChan(const char *); int tuveBan(const char *channel,const char *nick); int tuveUnBan(const char *channel,const char *nick); int tuveVerifyBan(const char *channel,const char *nick);