summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-10 16:57:22 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-10 16:57:22 +0000
commite8a950b2cf8e56026ff38383a05ce9c19d4d4257 (patch)
treef3bb0cf236cfd5c192095949e24f3d2feacf5b8e
parente272cc53d316d6ed2f7358fe8b40b786b9111e6b (diff)
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
-rw-r--r--src/cmd_whois.cpp24
1 files 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]);