diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 14:50:34 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 14:50:34 +0000 |
commit | 49e69fa6f5609cf87daac502fc10727fc5fe3fa5 (patch) | |
tree | 93ae94e2d4b6ef0d17f3c89c8ed6df360545dbe9 /src | |
parent | dda4418282c661196ddc70b16a9b0f77dff0fafd (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')
-rw-r--r-- | src/cmd_whois.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 2 |
2 files changed, 4 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]); diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 397a7c0b0..4b4cdff8e 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -632,7 +632,9 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> ¶m unsigned long signon = atoi(params[1].c_str()); unsigned long idle = atoi(params[2].c_str()); if ((who_to_send_to) && (IS_LOCAL(who_to_send_to))) + { do_whois(this->Instance, who_to_send_to, u, signon, idle, nick_whoised.c_str()); + } } else { |