changeset 17 | 9a32b5242320 |
parent 16 | 33245bf7873a |
child 18 | 4435146391ae |
--- a/src/main.c +++ b/src/main.c @@ -94,10 +94,9 @@ while (!feof (message.stream)) { *buf = '\0'; + fgets (buf, 512, message.stream); - if (active) /* SIGPROC */ - fgets (buf, 512, message.stream); - else + if (!active) /* the bot was killed with SIGTERM */ break; if ((command = irc_parsemessage (buf, &message))) { @@ -117,7 +116,6 @@ /* * cleanup */ - if (uc.nick) free (uc.nick); if (uc.pass)