summaryrefslogtreecommitdiff
path: root/src/cmd_whois.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 14:50:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 14:50:34 +0000
commit49e69fa6f5609cf87daac502fc10727fc5fe3fa5 (patch)
tree93ae94e2d4b6ef0d17f3c89c8ed6df360545dbe9 /src/cmd_whois.cpp
parentdda4418282c661196ddc70b16a9b0f77dff0fafd (diff)
Apply visibility state to whois, next stop, /who
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6869 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_whois.cpp')
-rw-r--r--src/cmd_whois.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp
index 192e2822c..9be4a68ca 100644
--- a/src/cmd_whois.cpp
+++ b/src/cmd_whois.cpp
@@ -21,7 +21,7 @@
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)
+ if ((dest->registered == REG_ALL) && ((dest->Visibility && !dest->Visibility->VisibleTo(user))))
{
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))
@@ -92,6 +92,7 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user)
return CMD_SUCCESS;
dest = ServerInstance->FindNick(parameters[0]);
+
if (dest)
{
do_whois(this->ServerInstance, user,dest,0,0,parameters[0]);