]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_whois.cpp
Fixed an issue that could cause empty parameters in module commands to not be sent...
[user/henk/code/inspircd.git] / src / cmd_whois.cpp
index 897ec60ac262d313a9b09591538a078c094e0a58..b6f85e01c015024d932089e4f864611226548b46 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "configreader.h"
-#include "users.h"
-#include "modules.h"
 #include "commands/cmd_whois.h"
 #include "hashcomp.h"
 
@@ -111,7 +108,10 @@ CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user)
        if (pcnt > 1)
                userindex = 1;
 
-       dest = ServerInstance->FindNick(parameters[userindex]);
+       if (IS_LOCAL(user))
+               dest = ServerInstance->FindNickOnly(parameters[userindex]);
+       else
+               dest = ServerInstance->FindNick(parameters[userindex]);
 
        if (dest)
        {