]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Dunno why this method was static, doesnt need to be...
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 7529461d098a2064c7461816f92c3fa6b9e933b7..54117331f907ae20987ad2f9a3fca260a910ecf8 100644 (file)
@@ -14,8 +14,6 @@
 #include "inspircd.h"
 #include "configreader.h"
 #include <algorithm>
-#include <dirent.h>
-#include <dlfcn.h>
 #include "users.h"
 #include "modules.h"
 #include "wildcard.h"
 #include "socket.h"
 #include "command_parse.h"
 
+/* Directory Searching for Unix-Only */
+#ifndef WIN32
+#include <dirent.h>
+#include <dlfcn.h>
+#endif
+
 bool InspIRCd::ULine(const char* server)
 {
        if (!server)
@@ -426,7 +430,7 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user)
        {
                if (!user->muted)
                {
-                       ServerInstance->Log(DEBUG,"-> :%s %s",user->nick,buffer.c_str());
+                       ServerInstance->Log(DEBUG,"C[%d] -> :%s %s",user->GetFd(), user->nick, buffer.c_str());
                        this->ProcessCommand(user,buffer);
                }
        }
@@ -464,7 +468,7 @@ bool CommandParser::FindSym(void** v, void* h)
 {
        *v = dlsym(h, "init_command");
        const char* err = dlerror();
-       if (err)
+       if (err && !(*v))
        {
                ServerInstance->Log(SPARSE, "Error loading core command: %s\n", err);
                return false;