From: brain Date: Fri, 4 May 2007 15:41:06 +0000 (+0000) Subject: Cloaking of WHOIS didnt work quite right, fixed X-Git-Tag: v2.0.23~5530 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=5714b1868e06417990fad07ce669b12703324c46;p=user%2Fhenk%2Fcode%2Finspircd.git Cloaking of WHOIS didnt work quite right, fixed git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6874 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index 9be4a68ca..4b7c3807d 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -20,8 +20,14 @@ void do_whois(InspIRCd* ServerInstance, userrec* user, userrec* dest,unsigned long signon, unsigned long idle, const char* nick) { - /* check if the user is registered first, can't whois unknown connections */ - if ((dest->registered == REG_ALL) && ((dest->Visibility && !dest->Visibility->VisibleTo(user)))) + if (dest->Visibility && !dest->Visibility->VisibleTo(user)) + { + ServerInstance->SendWhoisLine(user, dest, 401, "%s %s :No such nick/channel",user->nick, *nick ? nick : "*"); + ServerInstance->SendWhoisLine(user, dest, 318, "%s %s :End of /WHOIS list.",user->nick, *nick ? nick : "*"); + return; + } + + if (dest->registered == REG_ALL) { ServerInstance->SendWhoisLine(user, dest, 311, "%s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname); if ((user == dest) || (*user->oper))