BUG INTRODUCED from a6c36a2b97f6bed5577d66474949c8ec8b32c8e8
the signal handler is essential for this bot
the script performs a kill -TERM and the application has enough time to finish the connection.
it's essential.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- 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)