From f15d73c316623f394c3de72959de382f413cbd96 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 10 May 2007 19:01:28 +0000 Subject: 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 --- src/cmd_whois.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/cmd_whois.cpp') 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) { -- cgit v1.2.3