From 5714b1868e06417990fad07ce669b12703324c46 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 May 2007 15:41:06 +0000 Subject: Cloaking of WHOIS didnt work quite right, fixed git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6874 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_whois.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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)) -- cgit v1.2.3