#include "modcmd.h"
#include "ModeNode.h"
#include "IRCEvents.h"
+#include "tools.h"
+#include "log.h"
static struct ChanNode **chanList;
struct ChanNode *chan = malloc(sizeof(*chan));
if (!chan)
{
- perror("malloc() failed");
+ printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
return NULL;
}
strcpy(chan->name, name);