]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/whois.cpp
Run configure -update on all svn/git changes
[user/henk/code/inspircd.git] / src / whois.cpp
index 341c8389f3b667bfde08386fa7ede3075bbba4da..fc24d0c8231463f2d3485492ccf960a93dbbe3b8 100644 (file)
@@ -21,17 +21,17 @@ 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())
+               user->SplitChanList(dest,cl);
+       if (IS_OPER(user) && ServerInstance->Config->OperSpyWhois)
        {
-               if (cl.length() > 400)
+               std::string scl = dest->ChannelList(user, true);
+               if (scl.length())
                {
-                       user->SplitChanList(dest,cl);
-               }
-               else
-               {
-                       this->SendWhoisLine(user, dest, 319, "%s %s :%s",user->nick.c_str(), dest->nick.c_str(), cl.c_str());
+                       this->SendWhoisLine(user, dest, 336, "%s %s :is on private/secret channels:",user->nick.c_str(), dest->nick.c_str());
+                       user->SplitChanList(dest,scl);
                }
        }
        if (user != dest && *this->Config->HideWhoisServer && !user->HasPrivPermission("servers/auspex"))