]> 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 a634e5967cbceead16490630bb7ce67ad7d6988f..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"
 
@@ -89,7 +86,7 @@ void do_whois(InspIRCd* ServerInstance, userrec* user, userrec* dest,unsigned lo
 
 
 
-extern "C" command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
 {
        return new cmd_whois(Instance);
 }
@@ -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)
        {