diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 19:01:28 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 19:01:28 +0000 |
commit | f15d73c316623f394c3de72959de382f413cbd96 (patch) | |
tree | 51b03e684bba306ad31ce6d7ecf335d7bd9f1819 | |
parent | 940db85761c02ff46b0281f20c823137c59a650a (diff) |
Patch by djGrrr to WHOIS to fix up another potential information leak, now remote and local whois work the same way really :P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6966 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/cmd_whois.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index 6d342ecfc..7fab00905 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -102,7 +102,19 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0)) return CMD_SUCCESS; - dest = ServerInstance->FindNick(parameters[0]); + + /* + * If 2 paramters are specified (/whois nick nick), ignore the first one like spanningtree + * does, and use the second one, otherwise, use the only paramter. -- djGrrr + */ + if (pcnt > 1) + { + dest = ServerInstance->FindNick(parameters[1]); + } + else + { + dest = ServerInstance->FindNick(parameters[0]); + } if (dest) { |