-/* WHOHandler.c - NeonServ v5.5
+/* WHOHandler.c - NeonServ v5.6
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
#include "ClientSocket.h"
#include "IPNode.h"
#include "modules.h"
+#include "log.h"
#define WHOQUEUETYPE_ISONQUEUE 0x01
#define WHOQUEUETYPE_USERLIST 0x02
struct WHOQueueEntry *entry = malloc(sizeof(*entry));
if (!entry)
{
- perror("malloc() failed");
+ printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
DESYNCHRONIZE(whohandler_sync);
return NULL;
}
callback(bot, user->nick, NULL, data);
return;
}
- if((user->flags & (USERFLAG_ISAUTHED | USERFLAG_ISIRCOP | USERFLAG_ISBOT | USERFLAG_ISSERVER)) || (time(0) - user->last_who) <= REWHO_TIMEOUT) {
+ if((user->flags & (USERFLAG_ISAUTHED | USERFLAG_ISSERVER)) || (time(0) - user->last_who) <= REWHO_TIMEOUT) {
callback(bot, user->nick, user, data);
return;
}