summaryrefslogtreecommitdiff
path: root/src/whois.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-18 17:07:13 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-18 17:07:13 +0000
commita068c47d71e9a922b145b7552b3a64d638c92171 (patch)
treeb78e21ea491683cd2238c49f02aced889f488260 /src/whois.cpp
parent792d6d6725c7d80d223f5cccd9ee0c5b07229e9a (diff)
Separate spy channels [jackmcbarn]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11747 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/whois.cpp')
-rw-r--r--src/whois.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/whois.cpp b/src/whois.cpp
index 341c8389f..b967fac25 100644
--- a/src/whois.cpp
+++ b/src/whois.cpp
@@ -21,7 +21,7 @@ void InspIRCd::DoWhois(User* user, User* dest,unsigned long signon, unsigned lon
this->SendWhoisLine(user, dest, 378, "%s %s :is connecting from %s@%s %s", user->nick.c_str(), dest->nick.c_str(), dest->ident.c_str(), dest->host.c_str(), dest->GetIPString());
}
- std::string cl = dest->ChannelList(user);
+ std::string cl = dest->ChannelList(user, false);
if (cl.length())
{
@@ -34,6 +34,22 @@ void InspIRCd::DoWhois(User* user, User* dest,unsigned long signon, unsigned lon
this->SendWhoisLine(user, dest, 319, "%s %s :%s",user->nick.c_str(), dest->nick.c_str(), cl.c_str());
}
}
+ if (IS_OPER(user) && ServerInstance->Config->OperSpyWhois)
+ {
+ std::string scl = dest->ChannelList(user, true);
+ if (scl.length())
+ {
+ this->SendWhoisLine(user, dest, 336, "%s %s :is on private/secret channels:",user->nick.c_str(), dest->nick.c_str());
+ if (scl.length() > 400)
+ {
+ user->SplitChanList(dest,scl);
+ }
+ else
+ {
+ this->SendWhoisLine(user, dest, 319, "%s %s :%s",user->nick.c_str(), dest->nick.c_str(), scl.c_str());
+ }
+ }
+ }
if (user != dest && *this->Config->HideWhoisServer && !user->HasPrivPermission("servers/auspex"))
{
this->SendWhoisLine(user, dest, 312, "%s %s %s :%s",user->nick.c_str(), dest->nick.c_str(), this->Config->HideWhoisServer, this->Config->Network);