]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Fix typos found by Zaba. Thanks.
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 444e6f78b232ca29ef7b73934d9f00c074a0c8dd..ab935559d9be0374bc972ad0e9a017eae8ff45ba 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)
@@ -323,12 +327,12 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
                        {
                                if (!user->IsModeSet(cm->second->flags_needed))
                                {
-                                       user->WriteServ("481 %s :Permission Denied- You do not have the required operator privileges",user->nick);
+                                       user->WriteServ("481 %s :Permission Denied - You do not have the required operator privileges",user->nick);
                                        return;
                                }
                                if (!user->HasPermission(command))
                                {
-                                       user->WriteServ("481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
+                                       user->WriteServ("481 %s :Permission Denied - Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
                                        return;
                                }
                        }
@@ -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;