src/main.c
changeset 47 a689b6a8e6ed
parent 33 56571d34d754
child 49 59b09b0aeb96
equal deleted inserted replaced
46:08ad49ca1b4e 47:a689b6a8e6ed
    90         if (uc.topic)
    90         if (uc.topic)
    91             fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic);
    91             fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic);
    92     }
    92     }
    93 
    93 
    94     while (!feof (message.stream)) {
    94     while (!feof (message.stream)) {
    95         fgets (buf, sizeof (buf), message.stream);
    95         if (fgets (buf, sizeof (buf), message.stream) == NULL)
       
    96             break;
    96 
    97 
    97         if (!active)            /* the bot was killed with SIGTERM */
    98         if (!active)            /* the bot was killed with SIGTERM */
    98             break;
    99             break;
    99 
   100 
   100         if ((command = irc_parsemessage (buf, &message))) {
   101         if ((command = irc_parsemessage (buf, &message))) {