summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 15:41:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 15:41:06 +0000
commit5714b1868e06417990fad07ce669b12703324c46 (patch)
tree30906723a28cf5d47650de328d11520d3b43aac4 /src
parentfa6c93d94c0441e94e9c32be95468d463ac6cf84 (diff)
Cloaking of WHOIS didnt work quite right, fixed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6874 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_whois.cpp10
1 files changed, 8 insertions, 2 deletions
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))