diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -93,10 +93,7 @@ fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic); } - while (!feof (message.stream)) { - if (fgets (buf, sizeof (buf), message.stream) == NULL) - break; - + while (fgets (buf, sizeof (buf), message.stream) != NULL) { if (!active) /* the bot was killed with SIGTERM */ break;