From e8a950b2cf8e56026ff38383a05ce9c19d4d4257 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 10 May 2007 16:57:22 +0000 Subject: [PATCH] I got very confused here.. let's fix this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6962 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_whois.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index d21c86202..d86360df6 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -107,29 +107,17 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) if (dest) { /* - * Determine whether to show idletime. We show it if: - * If user is local and hidewhois is turned off, or - * param[0] == param[1]. + * Determine whether to show idletime. We show it if hidewhois is turned off. + * spanningtree deals with 2 param whois, and remote users, so this is all we need to do. * * The assumption here (not a huge one) is that cmd_whois is only ever invoked * remotely! Keep that in mind! -- w00t */ - if ((IS_LOCAL(dest) && !*ServerInstance->Config->HideWhoisServer) || pcnt > 1) + if (!*ServerInstance->Config->HideWhoisServer) { - if (pcnt > 1) - { - /* - * if it looks like a remote whois, make sure it is one. - * this stops things like /whois foo bar to get foo's - * idletime without a proper remote request. -- w00t - */ - if (!strcmp(parameters[0], parameters[1])) - { - /* this really is safe, we're only called for local users .. */ - idle = abs((dest->idle_lastmsg)-ServerInstance->Time()); - signon = dest->signon; - } - } + /* this really is safe, we're only called for local users .. */ + idle = abs((dest->idle_lastmsg)-ServerInstance->Time()); + signon = dest->signon; } do_whois(this->ServerInstance, user,dest,signon,idle,parameters[0]); -- 2.39.5