]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_who.cpp
m_testcommand deletes its command handler manually, no modules should do this. Will...
[user/henk/code/inspircd.git] / src / cmd_who.cpp
index de504faf253d12a6a92144ca71732751d64c059e..31e8030f5d0fc470396fdaf95e8c098f8c7ea3a1 100644 (file)
@@ -11,6 +11,7 @@
  * ---------------------------------------------------
  */
 
+#include "inspircd.h"
 #include "configreader.h"
 #include "users.h"
 #include "modules.h"
@@ -110,7 +111,7 @@ bool cmd_who::whomatch(userrec* user, const char* matchtext)
 
 
 
-extern "C" command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
 {
        return new cmd_who(Instance);
 }
@@ -311,7 +312,7 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
                }
        }
        /* Send the results out */
-       if ((whoresults.size() <= (size_t)ServerInstance->Config->MaxWhoResults) || opt_unlimit)
+       if ((ServerInstance->Config->MaxWhoResults && (whoresults.size() <= (size_t)ServerInstance->Config->MaxWhoResults)) || opt_unlimit)
        {
                for (std::vector<std::string>::const_iterator n = whoresults.begin(); n != whoresults.end(); n++)
                        user->WriteServ(*n);