--- a/src/irc.c
+++ b/src/irc.c
@@ -17,6 +17,7 @@
#include <pwd.h>
+#include <compat.h>
#include <irc.h>
#define VERSION_STRING "MCBOT on GNU/LINUX"
@@ -147,10 +148,12 @@
char *token;
char *ptr;
- if (garbage_collector != NULL)
+ if (garbage_collector != NULL) {
free (garbage_collector);
+ garbage_collector = NULL;
+ }
- if ((theLine = strdup (line)) == NULL)
+ if ((theLine = compat_strdup (line)) == NULL)
return "ENOMEM";
else
garbage_collector = theLine;
@@ -323,6 +326,7 @@
return command;
case 401: /* NO SUCH NICK/CHANNEL */
case 403: /* THAT CHANNEL DOESN'T EXIST */
+ case 412: /* NO TEXT TO SEND */
case 441: /* THEY AREN'T ON THIS CHANNEL */
return command;
case 474: