X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FWHOHandler.c;h=5db3db6a3d58be68ad50a402308033f61d004c6c;hp=7a8a3548ea359fa5aee74e48fc84e25e1d4ab8f5;hb=HEAD;hpb=d80ff9e6b878be4f29854f4fe99f59efeb5e6e10 diff --git a/src/WHOHandler.c b/src/WHOHandler.c index 7a8a354..5db3db6 100644 --- a/src/WHOHandler.c +++ b/src/WHOHandler.c @@ -1,4 +1,4 @@ -/* 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 @@ -23,6 +23,7 @@ #include "ClientSocket.h" #include "IPNode.h" #include "modules.h" +#include "log.h" #define WHOQUEUETYPE_ISONQUEUE 0x01 #define WHOQUEUETYPE_USERLIST 0x02 @@ -30,7 +31,7 @@ #define WHOQUEUETYPE_CHECKTYPE 0x07 #define WHOQUEUETYPE_FOUND 0x08 -#define MAXCALLBACKS 3 +#define MAXCALLBACKS 10 struct WHOQueueEntry { char type; @@ -65,7 +66,7 @@ static struct WHOQueueEntry* addWHOQueueEntry(struct ClientSocket *client) { 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; } @@ -215,7 +216,7 @@ void get_userauth(struct UserNode *user, int module_id, userauth_callback_t call 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; }