diff --git a/bot.c b/bot.c index 90321f3..cd72eeb 100644 --- a/bot.c +++ b/bot.c @@ -199,7 +199,8 @@ break; case 'T': tmpVal = atoi(strtok(NULL,":")); - tmpVal = atoi(strtok(NULL,"\n")); + if (tmpVal != 0x0) + tmpVal = atoi(strtok(NULL,"\n")); if (tmpChan->modes[CHAN_TIME] != tmpVal) { tmpChan->modes[CHAN_TIME] = tmpVal; sprintf(qryStr,"UPDATE channels SET time = %i WHERE channel = '%s'",tmpVal,tmpChan->channel);