diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 16:44:51 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 16:44:51 +0000 |
commit | e272cc53d316d6ed2f7358fe8b40b786b9111e6b (patch) | |
tree | 36ee9ebb0a9610a0e41c7c52e6977f4ed6db5cd3 /src | |
parent | edd33ce033eedbc0a94aa1585c831368d32bf3ac (diff) |
Clarify some of the comments here..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6961 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_whois.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index 7f538c048..d21c86202 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -108,8 +108,11 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) { /* * Determine whether to show idletime. We show it if: - * If user is local and hidewhois is turned off, or pcnt > 1 (remote whois), - * and param[0] == param[1]. -- w00t + * If user is local and hidewhois is turned off, or + * param[0] == param[1]. + * + * 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) { @@ -120,9 +123,9 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) * 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; } |